From faaaca4cf3e5cc6a1762cd018bc8eec7c6733b16 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 13 Feb 2022 12:00:02 +0000 Subject: [PATCH] sneed --- schema.sql | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/schema.sql b/schema.sql index ff2609f46..44fc3fef0 100644 --- a/schema.sql +++ b/schema.sql @@ -280,7 +280,7 @@ CREATE TABLE public.comments ( distinguish_level integer DEFAULT 0 NOT NULL, edited_utc integer DEFAULT 0 NOT NULL, deleted_utc integer DEFAULT 0 NOT NULL, - is_approved integer DEFAULT 0 NOT NULL, + is_approved integer, level integer DEFAULT 0 NOT NULL, parent_comment_id integer, over_18 boolean DEFAULT false NOT NULL, @@ -1640,6 +1640,13 @@ CREATE INDEX fki_block_user_fkey ON public.userblocks USING btree (user_id); CREATE INDEX fki_c ON public.notifications USING btree (user_id); +-- +-- Name: fki_comment_approver_fkey; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX fki_comment_approver_fkey ON public.comments USING btree (is_approved); + + -- -- Name: fki_comment_parent_comment_fkey; Type: INDEX; Schema: public; Owner: - -- @@ -1675,6 +1682,13 @@ CREATE INDEX fki_commentflags_user_id_fkey ON public.commentflags USING btree (u CREATE INDEX fki_comments_author_id_fkey ON public.comments USING btree (author_id); +-- +-- Name: fki_commentvote_comment_fkey; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX fki_commentvote_comment_fkey ON public.commentvotes USING btree (comment_id); + + -- -- Name: fki_commentvote_user_fkey; Type: INDEX; Schema: public; Owner: - -- @@ -2183,6 +2197,14 @@ ALTER TABLE ONLY public.client_auths ADD CONSTRAINT client_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id); +-- +-- Name: comments comment_approver_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.comments + ADD CONSTRAINT comment_approver_fkey FOREIGN KEY (is_approved) REFERENCES public.users(id); + + -- -- Name: comments comment_parent_comment_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -2223,6 +2245,14 @@ ALTER TABLE ONLY public.comments ADD CONSTRAINT comments_author_id_fkey FOREIGN KEY (author_id) REFERENCES public.users(id); +-- +-- Name: commentvotes commentvote_comment_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.commentvotes + ADD CONSTRAINT commentvote_comment_fkey FOREIGN KEY (comment_id) REFERENCES public.comments(id) NOT VALID; + + -- -- Name: commentvotes commentvote_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --