1- -- Downloaded from: https://github.com/Billoxinogen18/ar_backend/blob/6cfc633fc995510afa71f887a5c7d1fd6b568f61/neon_dump.sql
1+ -- Downloaded from: https://github.com/Billoxinogen18/ar_backend/blob/6cfc633fc995510afa71f887a5c7d1fd6b568f61/neon_dump.sql and updated ALTER TABLE AND DROP statements with IF EXISTS
22--
33-- PostgreSQL database dump
44--
@@ -18,83 +18,83 @@ SET xmloption = content;
1818SET client_min_messages = warning;
1919SET row_security = off;
2020
21- ALTER TABLE ONLY public .users DROP CONSTRAINT users_referrer_wallet_address_fkey;
22- ALTER TABLE ONLY public .user_usdt_withdrawals DROP CONSTRAINT user_usdt_withdrawals_user_wallet_address_fkey;
23- ALTER TABLE ONLY public .user_task_completions DROP CONSTRAINT user_task_completions_user_wallet_address_fkey;
24- ALTER TABLE ONLY public .user_task_completions DROP CONSTRAINT user_task_completions_task_id_fkey;
25- ALTER TABLE ONLY public .user_stakes DROP CONSTRAINT user_stakes_user_wallet_address_fkey;
26- ALTER TABLE ONLY public .user_stakes DROP CONSTRAINT user_stakes_staking_plan_id_fkey;
27- ALTER TABLE ONLY public .referral_rewards DROP CONSTRAINT referral_rewards_stake_id_fkey;
28- ALTER TABLE ONLY public .referral_rewards DROP CONSTRAINT referral_rewards_referrer_wallet_address_fkey;
29- ALTER TABLE ONLY public .referral_rewards DROP CONSTRAINT referral_rewards_referred_wallet_address_fkey;
30- ALTER TABLE ONLY public .coinflip_history DROP CONSTRAINT coinflip_history_user_wallet_address_fkey;
31- DROP TRIGGER users_before_insert_set_referral_code ON public .users ;
32- DROP INDEX public .idx_users_referrer ;
33- DROP INDEX public .idx_users_referral_code ;
34- DROP INDEX public .idx_user_usdt_withdrawals_user ;
35- DROP INDEX public .idx_user_usdt_withdrawals_status ;
36- DROP INDEX public .idx_user_task_completions_user_task ;
37- DROP INDEX public .idx_user_task_completions_status ;
38- DROP INDEX public .idx_user_stakes_wallet_address ;
39- DROP INDEX public .idx_user_stakes_status ;
40- DROP INDEX public .idx_referral_rewards_status ;
41- DROP INDEX public .idx_referral_rewards_referrer ;
42- DROP INDEX public .idx_coinflip_history_user ;
43- DROP INDEX public .idx_announcements_active_pinned_published ;
44- DROP INDEX neon_auth .users_sync_deleted_at_idx ;
45- ALTER TABLE ONLY public .users DROP CONSTRAINT users_telegram_id_key;
46- ALTER TABLE ONLY public .users DROP CONSTRAINT users_referral_code_key;
47- ALTER TABLE ONLY public .users DROP CONSTRAINT users_pkey;
48- ALTER TABLE ONLY public .user_usdt_withdrawals DROP CONSTRAINT user_usdt_withdrawals_pkey1;
49- ALTER TABLE ONLY public .user_arix_withdrawals DROP CONSTRAINT user_usdt_withdrawals_pkey;
50- ALTER TABLE ONLY public .user_usdt_withdrawals DROP CONSTRAINT user_usdt_withdrawals_onchain_tx_hash_key1;
51- ALTER TABLE ONLY public .user_arix_withdrawals DROP CONSTRAINT user_usdt_withdrawals_onchain_tx_hash_key;
52- ALTER TABLE ONLY public .user_task_completions DROP CONSTRAINT user_task_completions_pkey;
53- ALTER TABLE ONLY public .user_stakes DROP CONSTRAINT user_stakes_pkey;
54- ALTER TABLE ONLY public .user_stakes DROP CONSTRAINT user_stakes_onchain_unstake_tx_hash_key;
55- ALTER TABLE ONLY public .user_stakes DROP CONSTRAINT user_stakes_onchain_stake_tx_hash_key;
56- ALTER TABLE ONLY public .tasks DROP CONSTRAINT tasks_task_key_key;
57- ALTER TABLE ONLY public .tasks DROP CONSTRAINT tasks_pkey;
58- ALTER TABLE ONLY public .staking_plans DROP CONSTRAINT staking_plans_plan_key_key;
59- ALTER TABLE ONLY public .staking_plans DROP CONSTRAINT staking_plans_pkey;
60- ALTER TABLE ONLY public .referral_rewards DROP CONSTRAINT referral_rewards_pkey;
61- ALTER TABLE ONLY public .crash_rounds DROP CONSTRAINT crash_rounds_pkey;
62- ALTER TABLE ONLY public .coinflip_history DROP CONSTRAINT coinflip_history_pkey;
63- ALTER TABLE ONLY public .announcements DROP CONSTRAINT announcements_pkey;
64- ALTER TABLE ONLY neon_auth .users_sync DROP CONSTRAINT users_sync_pkey;
65- ALTER TABLE public .user_usdt_withdrawals ALTER COLUMN withdrawal_id DROP DEFAULT;
66- ALTER TABLE public .user_task_completions ALTER COLUMN completion_id DROP DEFAULT;
67- ALTER TABLE public .user_arix_withdrawals ALTER COLUMN withdrawal_id DROP DEFAULT;
68- ALTER TABLE public .tasks ALTER COLUMN task_id DROP DEFAULT;
69- ALTER TABLE public .staking_plans ALTER COLUMN plan_id DROP DEFAULT;
70- ALTER TABLE public .referral_rewards ALTER COLUMN reward_id DROP DEFAULT;
71- ALTER TABLE public .crash_rounds ALTER COLUMN id DROP DEFAULT;
72- ALTER TABLE public .coinflip_history ALTER COLUMN game_id DROP DEFAULT;
73- ALTER TABLE public .announcements ALTER COLUMN announcement_id DROP DEFAULT;
74- DROP TABLE public .users ;
75- DROP SEQUENCE public .user_usdt_withdrawals_withdrawal_id_seq1 ;
76- DROP SEQUENCE public .user_usdt_withdrawals_withdrawal_id_seq ;
77- DROP TABLE public .user_usdt_withdrawals ;
78- DROP SEQUENCE public .user_task_completions_completion_id_seq ;
79- DROP TABLE public .user_task_completions ;
80- DROP TABLE public .user_stakes ;
81- DROP TABLE public .user_arix_withdrawals ;
82- DROP SEQUENCE public .tasks_task_id_seq ;
83- DROP TABLE public .tasks ;
84- DROP SEQUENCE public .staking_plans_plan_id_seq ;
85- DROP TABLE public .staking_plans ;
86- DROP SEQUENCE public .referral_rewards_reward_id_seq ;
87- DROP TABLE public .referral_rewards ;
88- DROP SEQUENCE public .crash_rounds_id_seq ;
89- DROP TABLE public .crash_rounds ;
90- DROP SEQUENCE public .coinflip_history_game_id_seq ;
91- DROP TABLE public .coinflip_history ;
92- DROP SEQUENCE public .announcements_announcement_id_seq ;
93- DROP TABLE public .announcements ;
94- DROP TABLE neon_auth .users_sync ;
95- DROP FUNCTION public .set_referral_code ();
96- DROP FUNCTION public .generate_referral_code ();
97- DROP SCHEMA neon_auth;
21+ ALTER TABLE IF EXISTS ONLY public .users DROP CONSTRAINT users_referrer_wallet_address_fkey;
22+ ALTER TABLE IF EXISTS ONLY public .user_usdt_withdrawals DROP CONSTRAINT user_usdt_withdrawals_user_wallet_address_fkey;
23+ ALTER TABLE IF EXISTS ONLY public .user_task_completions DROP CONSTRAINT user_task_completions_user_wallet_address_fkey;
24+ ALTER TABLE IF EXISTS ONLY public .user_task_completions DROP CONSTRAINT user_task_completions_task_id_fkey;
25+ ALTER TABLE IF EXISTS ONLY public .user_stakes DROP CONSTRAINT user_stakes_user_wallet_address_fkey;
26+ ALTER TABLE IF EXISTS ONLY public .user_stakes DROP CONSTRAINT user_stakes_staking_plan_id_fkey;
27+ ALTER TABLE IF EXISTS ONLY public .referral_rewards DROP CONSTRAINT referral_rewards_stake_id_fkey;
28+ ALTER TABLE IF EXISTS ONLY public .referral_rewards DROP CONSTRAINT referral_rewards_referrer_wallet_address_fkey;
29+ ALTER TABLE IF EXISTS ONLY public .referral_rewards DROP CONSTRAINT referral_rewards_referred_wallet_address_fkey;
30+ ALTER TABLE IF EXISTS ONLY public .coinflip_history DROP CONSTRAINT coinflip_history_user_wallet_address_fkey;
31+ DROP TRIGGER IF EXISTS users_before_insert_set_referral_code ON public .users ;
32+ DROP INDEX IF EXISTS public .idx_users_referrer ;
33+ DROP INDEX IF EXISTS public .idx_users_referral_code ;
34+ DROP INDEX IF EXISTS public .idx_user_usdt_withdrawals_user ;
35+ DROP INDEX IF EXISTS public .idx_user_usdt_withdrawals_status ;
36+ DROP INDEX IF EXISTS public .idx_user_task_completions_user_task ;
37+ DROP INDEX IF EXISTS public .idx_user_task_completions_status ;
38+ DROP INDEX IF EXISTS public .idx_user_stakes_wallet_address ;
39+ DROP INDEX IF EXISTS public .idx_user_stakes_status ;
40+ DROP INDEX IF EXISTS public .idx_referral_rewards_status ;
41+ DROP INDEX IF EXISTS public .idx_referral_rewards_referrer ;
42+ DROP INDEX IF EXISTS public .idx_coinflip_history_user ;
43+ DROP INDEX IF EXISTS public .idx_announcements_active_pinned_published ;
44+ DROP INDEX IF EXISTS neon_auth .users_sync_deleted_at_idx ;
45+ ALTER TABLE IF EXISTS ONLY public .users DROP CONSTRAINT users_telegram_id_key;
46+ ALTER TABLE IF EXISTS ONLY public .users DROP CONSTRAINT users_referral_code_key;
47+ ALTER TABLE IF EXISTS ONLY public .users DROP CONSTRAINT users_pkey;
48+ ALTER TABLE IF EXISTS ONLY public .user_usdt_withdrawals DROP CONSTRAINT user_usdt_withdrawals_pkey1;
49+ ALTER TABLE IF EXISTS ONLY public .user_arix_withdrawals DROP CONSTRAINT user_usdt_withdrawals_pkey;
50+ ALTER TABLE IF EXISTS ONLY public .user_usdt_withdrawals DROP CONSTRAINT user_usdt_withdrawals_onchain_tx_hash_key1;
51+ ALTER TABLE IF EXISTS ONLY public .user_arix_withdrawals DROP CONSTRAINT user_usdt_withdrawals_onchain_tx_hash_key;
52+ ALTER TABLE IF EXISTS ONLY public .user_task_completions DROP CONSTRAINT user_task_completions_pkey;
53+ ALTER TABLE IF EXISTS ONLY public .user_stakes DROP CONSTRAINT user_stakes_pkey;
54+ ALTER TABLE IF EXISTS ONLY public .user_stakes DROP CONSTRAINT user_stakes_onchain_unstake_tx_hash_key;
55+ ALTER TABLE IF EXISTS ONLY public .user_stakes DROP CONSTRAINT user_stakes_onchain_stake_tx_hash_key;
56+ ALTER TABLE IF EXISTS ONLY public .tasks DROP CONSTRAINT tasks_task_key_key;
57+ ALTER TABLE IF EXISTS ONLY public .tasks DROP CONSTRAINT tasks_pkey;
58+ ALTER TABLE IF EXISTS ONLY public .staking_plans DROP CONSTRAINT staking_plans_plan_key_key;
59+ ALTER TABLE IF EXISTS ONLY public .staking_plans DROP CONSTRAINT staking_plans_pkey;
60+ ALTER TABLE IF EXISTS ONLY public .referral_rewards DROP CONSTRAINT referral_rewards_pkey;
61+ ALTER TABLE IF EXISTS ONLY public .crash_rounds DROP CONSTRAINT crash_rounds_pkey;
62+ ALTER TABLE IF EXISTS ONLY public .coinflip_history DROP CONSTRAINT coinflip_history_pkey;
63+ ALTER TABLE IF EXISTS ONLY public .announcements DROP CONSTRAINT announcements_pkey;
64+ ALTER TABLE IF EXISTS ONLY neon_auth .users_sync DROP CONSTRAINT users_sync_pkey;
65+ ALTER TABLE IF EXISTS public .user_usdt_withdrawals ALTER COLUMN withdrawal_id DROP DEFAULT;
66+ ALTER TABLE IF EXISTS public .user_task_completions ALTER COLUMN completion_id DROP DEFAULT;
67+ ALTER TABLE IF EXISTS public .user_arix_withdrawals ALTER COLUMN withdrawal_id DROP DEFAULT;
68+ ALTER TABLE IF EXISTS public .tasks ALTER COLUMN task_id DROP DEFAULT;
69+ ALTER TABLE IF EXISTS public .staking_plans ALTER COLUMN plan_id DROP DEFAULT;
70+ ALTER TABLE IF EXISTS public .referral_rewards ALTER COLUMN reward_id DROP DEFAULT;
71+ ALTER TABLE IF EXISTS public .crash_rounds ALTER COLUMN id DROP DEFAULT;
72+ ALTER TABLE IF EXISTS public .coinflip_history ALTER COLUMN game_id DROP DEFAULT;
73+ ALTER TABLE IF EXISTS public .announcements ALTER COLUMN announcement_id DROP DEFAULT;
74+ DROP TABLE IF EXISTS public .users ;
75+ DROP SEQUENCE IF EXISTS public .user_usdt_withdrawals_withdrawal_id_seq1 ;
76+ DROP SEQUENCE IF EXISTS public .user_usdt_withdrawals_withdrawal_id_seq ;
77+ DROP TABLE IF EXISTS public .user_usdt_withdrawals ;
78+ DROP SEQUENCE IF EXISTS public .user_task_completions_completion_id_seq ;
79+ DROP TABLE IF EXISTS public .user_task_completions ;
80+ DROP TABLE IF EXISTS public .user_stakes ;
81+ DROP TABLE IF EXISTS public .user_arix_withdrawals ;
82+ DROP SEQUENCE IF EXISTS public .tasks_task_id_seq ;
83+ DROP TABLE IF EXISTS public .tasks ;
84+ DROP SEQUENCE IF EXISTS public .staking_plans_plan_id_seq ;
85+ DROP TABLE IF EXISTS public .staking_plans ;
86+ DROP SEQUENCE IF EXISTS public .referral_rewards_reward_id_seq ;
87+ DROP TABLE IF EXISTS public .referral_rewards ;
88+ DROP SEQUENCE IF EXISTS public .crash_rounds_id_seq ;
89+ DROP TABLE IF EXISTS public .crash_rounds ;
90+ DROP SEQUENCE IF EXISTS public .coinflip_history_game_id_seq ;
91+ DROP TABLE IF EXISTS public .coinflip_history ;
92+ DROP SEQUENCE IF EXISTS public .announcements_announcement_id_seq ;
93+ DROP TABLE IF EXISTS public .announcements ;
94+ DROP TABLE IF EXISTS neon_auth .users_sync ;
95+ DROP FUNCTION IF EXISTS public .set_referral_code ();
96+ DROP FUNCTION IF EXISTS public .generate_referral_code ();
97+ DROP SCHEMA IF EXISTS neon_auth;
9898--
9999-- Name: neon_auth; Type: SCHEMA; Schema: -; Owner: -
100100--
0 commit comments