Remove new schema changes from file and replace account ids for lottery system

master
Outrun Colors, LLC 2022-05-29 22:17:31 -05:00
parent 9f384bf548
commit ef7da60432
2 changed files with 3 additions and 23 deletions

View File

@ -1021,10 +1021,8 @@ if SITE_NAME == 'rDrama':
LOTTERY_TICKET_COST = 12
LOTTERY_SINK_RATE = 3
LOTTERY_ROYALTY_RATE = 1
LOTTERY_ROYALTY_ACCOUNT_ID = 9
# LOTTERY_ROYALTY_ACCOUNT_ID = 8239 # (McCoxmaul)
LOTTERY_MANAGER_ACCOUNT_ID = 3
# LOTTERY_MANAGER_ACCOUNT_ID = 11651 (Lottershe)
LOTTERY_ROYALTY_ACCOUNT_ID = 8239 # (McCoxmaul)
LOTTERY_MANAGER_ACCOUNT_ID = 11651 # (Lottershe)
else:
LOTTERY_ENABLED = False
LOTTERY_TICKET_COST = 0

View File

@ -1848,22 +1848,4 @@ ALTER TABLE ONLY public.votes
--
ALTER TABLE ONLY public.votes
ADD CONSTRAINT vote_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
CREATE TABLE public.lotteries (
id SERIAL PRIMARY KEY,
is_active boolean DEFAULT false NOT NULL,
ends_at integer DEFAULT 0 NOT NULL,
prize integer DEFAULT 0 NOT NULL,
tickets_sold integer DEFAULT 0 NOT NULL,
winner_id integer DEFAULT null NULL
);
ALTER TABLE ONLY public.lotteries
ADD CONSTRAINT fk_winner FOREIGN KEY (winner_id) REFERENCES public.users(id);
ALTER TABLE ONLY public.users
ADD currently_held_lottery_tickets integer DEFAULT 0 NOT NULL,
ADD total_held_lottery_tickets integer DEFAULT 0 NOT NULL,
ADD total_lottery_winnings integer DEFAULT 0 NOT NULL;
ADD CONSTRAINT vote_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);