From 92ad430a4050731b373638209f5ae8e67cb83ce8 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 5 Feb 2022 22:00:02 +0000 Subject: [PATCH 4/4] sneed --- schema.sql | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/schema.sql b/schema.sql index af4eade7b..36290bd3c 100644 --- a/schema.sql +++ b/schema.sql @@ -492,6 +492,16 @@ CREATE SEQUENCE public.modactions_id_seq ALTER SEQUENCE public.modactions_id_seq OWNED BY public.modactions.id; +-- +-- Name: mods; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.mods ( + user_id integer NOT NULL, + sub character varying(20) NOT NULL +); + + -- -- Name: notifications; Type: TABLE; Schema: public; Owner: - -- @@ -652,6 +662,17 @@ CREATE SEQUENCE public.submissions_id_seq ALTER SEQUENCE public.submissions_id_seq OWNED BY public.submissions.id; +-- +-- Name: subs; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.subs ( + name character varying(20) NOT NULL, + sidebar character varying(500), + sidebar_html character varying(1000) +); + + -- -- Name: subscriptions; Type: TABLE; Schema: public; Owner: - -- @@ -1181,6 +1202,14 @@ ALTER TABLE ONLY public.modactions ADD CONSTRAINT modactions_pkey PRIMARY KEY (id); +-- +-- Name: mods mods_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.mods + ADD CONSTRAINT mods_pkey PRIMARY KEY (user_id, sub); + + -- -- Name: notifications notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -1253,6 +1282,14 @@ ALTER TABLE ONLY public.submissions ADD CONSTRAINT submissions_pkey PRIMARY KEY (id); +-- +-- Name: subs subs_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.subs + ADD CONSTRAINT subs_pkey PRIMARY KEY (name); + + -- -- Name: subscriptions subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -1580,6 +1617,13 @@ CREATE INDEX modaction_id_idx ON public.modactions USING btree (id DESC); CREATE INDEX modaction_pid_idx ON public.modactions USING btree (target_submission_id); +-- +-- Name: mods_idx; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX mods_idx ON public.mods USING btree (user_id); + + -- -- Name: notification_read_idx; Type: INDEX; Schema: public; Owner: - -- @@ -1699,6 +1743,13 @@ CREATE INDEX submissions_created_utc_desc_idx ON public.submissions USING btree CREATE INDEX submissions_over18_index ON public.submissions USING btree (over_18); +-- +-- Name: subs_idx; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX subs_idx ON public.subs USING btree (name); + + -- -- Name: subscription_board_index; Type: INDEX; Schema: public; Owner: - --