diff --git a/schema.sql b/schema.sql index 18eaf00c4..cd702b8a3 100644 --- a/schema.sql +++ b/schema.sql @@ -499,6 +499,41 @@ CREATE TABLE public.commentvotes ( ); +-- +-- Name: currency_logs; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.currency_logs ( + id integer NOT NULL, + user_id integer NOT NULL, + created_utc integer NOT NULL, + currency character varying(9) NOT NULL, + amount integer NOT NULL, + reason character varying(1000) NOT NULL, + balance integer NOT NULL +); + + +-- +-- Name: currency_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.currency_logs_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: currency_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.currency_logs_id_seq OWNED BY public.currency_logs.id; + + -- -- Name: emojis; Type: TABLE; Schema: public; Owner: - -- @@ -1122,6 +1157,13 @@ ALTER TABLE ONLY public.casino_games ALTER COLUMN id SET DEFAULT nextval('public ALTER TABLE ONLY public.comments ALTER COLUMN id SET DEFAULT nextval('public.comments_id_seq'::regclass); +-- +-- Name: currency_logs id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.currency_logs ALTER COLUMN id SET DEFAULT nextval('public.currency_logs_id_seq'::regclass); + + -- -- Name: hat_defs id; Type: DEFAULT; Schema: public; Owner: - -- @@ -1283,6 +1325,14 @@ ALTER TABLE ONLY public.commentvotes ADD CONSTRAINT commentvotes_pkey PRIMARY KEY (comment_id, user_id); +-- +-- Name: currency_logs currency_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.currency_logs + ADD CONSTRAINT currency_logs_pkey PRIMARY KEY (id); + + -- -- Name: banneddomains domain_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -1780,6 +1830,13 @@ CREATE INDEX commentvotes_user_id_vote_type_idx ON public.commentvotes USING btr CREATE INDEX creport_user_idx ON public.commentreports USING btree (user_id); +-- +-- Name: currency_logs_index; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX currency_logs_index ON public.currency_logs USING btree (user_id); + + -- -- Name: emoji_kind; Type: INDEX; Schema: public; Owner: - -- @@ -2553,6 +2610,14 @@ ALTER TABLE ONLY public.commentvotes ADD CONSTRAINT commentvote_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id); +-- +-- Name: currency_logs currency_logs_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.currency_logs + ADD CONSTRAINT currency_logs_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id); + + -- -- Name: emojis emoji_author_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --