remotes/1693045480750635534/spooky-22
Aevann1 2022-02-14 23:00:01 +00:00
parent ee7bcfb491
commit 10fab387b1
1 changed files with 7 additions and 223 deletions

View File

@ -67,7 +67,6 @@ SET default_table_access_method = heap;
--
CREATE TABLE public.alts (
id integer NOT NULL,
user1 integer NOT NULL,
user2 integer NOT NULL,
is_manual boolean DEFAULT false NOT NULL,
@ -75,26 +74,6 @@ CREATE TABLE public.alts (
);
--
-- Name: alts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.alts_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: alts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.alts_id_seq OWNED BY public.alts.id;
--
-- Name: award_relationships; Type: TABLE; Schema: public; Owner: -
--
@ -164,7 +143,6 @@ ALTER SEQUENCE public.badge_defs_id_seq OWNED BY public.badge_defs.id;
--
CREATE TABLE public.badges (
id integer NOT NULL,
badge_id integer NOT NULL,
user_id integer NOT NULL,
description character varying(256),
@ -172,32 +150,11 @@ CREATE TABLE public.badges (
);
--
-- Name: badges_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.badges_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: badges_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.badges_id_seq OWNED BY public.badges.id;
--
-- Name: banneddomains; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.banneddomains (
id integer NOT NULL,
domain character varying(100) NOT NULL,
reason character varying(100) NOT NULL
);
@ -370,26 +327,6 @@ CREATE SEQUENCE public.commentvotes_id_seq
ALTER SEQUENCE public.commentvotes_id_seq OWNED BY public.commentvotes.id;
--
-- Name: domains_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.domains_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: domains_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.domains_id_seq OWNED BY public.banneddomains.id;
--
-- Name: flags; Type: TABLE; Schema: public; Owner: -
--
@ -678,63 +615,21 @@ CREATE TABLE public.subs (
--
CREATE TABLE public.subscriptions (
id integer NOT NULL,
user_id integer NOT NULL,
submission_id integer NOT NULL
);
--
-- Name: subscriptions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.subscriptions_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: subscriptions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.subscriptions_id_seq OWNED BY public.subscriptions.id;
--
-- Name: userblocks; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.userblocks (
id integer NOT NULL,
user_id integer NOT NULL,
target_id integer NOT NULL
);
--
-- Name: userblocks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.userblocks_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: userblocks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.userblocks_id_seq OWNED BY public.userblocks.id;
--
-- Name: users; Type: TABLE; Schema: public; Owner: -
--
@ -864,33 +759,12 @@ ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
--
CREATE TABLE public.viewers (
id integer NOT NULL,
user_id integer NOT NULL,
viewer_id integer NOT NULL,
last_view_utc integer NOT NULL
);
--
-- Name: viewers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.viewers_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: viewers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.viewers_id_seq OWNED BY public.viewers.id;
--
-- Name: votes; Type: TABLE; Schema: public; Owner: -
--
@ -926,13 +800,6 @@ CREATE SEQUENCE public.votes_id_seq
ALTER SEQUENCE public.votes_id_seq OWNED BY public.votes.id;
--
-- Name: alts id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.alts ALTER COLUMN id SET DEFAULT nextval('public.alts_id_seq'::regclass);
--
-- Name: award_relationships id; Type: DEFAULT; Schema: public; Owner: -
--
@ -947,20 +814,6 @@ ALTER TABLE ONLY public.award_relationships ALTER COLUMN id SET DEFAULT nextval(
ALTER TABLE ONLY public.badge_defs ALTER COLUMN id SET DEFAULT nextval('public.badge_defs_id_seq'::regclass);
--
-- Name: badges id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.badges ALTER COLUMN id SET DEFAULT nextval('public.badges_id_seq'::regclass);
--
-- Name: banneddomains id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.banneddomains ALTER COLUMN id SET DEFAULT nextval('public.domains_id_seq'::regclass);
--
-- Name: client_auths id; Type: DEFAULT; Schema: public; Owner: -
--
@ -1031,20 +884,6 @@ ALTER TABLE ONLY public.oauth_apps ALTER COLUMN id SET DEFAULT nextval('public.o
ALTER TABLE ONLY public.submissions ALTER COLUMN id SET DEFAULT nextval('public.submissions_id_seq'::regclass);
--
-- Name: subscriptions id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.subscriptions ALTER COLUMN id SET DEFAULT nextval('public.subscriptions_id_seq'::regclass);
--
-- Name: userblocks id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.userblocks ALTER COLUMN id SET DEFAULT nextval('public.userblocks_id_seq'::regclass);
--
-- Name: users id; Type: DEFAULT; Schema: public; Owner: -
--
@ -1052,13 +891,6 @@ ALTER TABLE ONLY public.userblocks ALTER COLUMN id SET DEFAULT nextval('public.u
ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
--
-- Name: viewers id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.viewers ALTER COLUMN id SET DEFAULT nextval('public.viewers_id_seq'::regclass);
--
-- Name: votes id; Type: DEFAULT; Schema: public; Owner: -
--
@ -1111,7 +943,7 @@ ALTER TABLE ONLY public.badge_defs
--
ALTER TABLE ONLY public.badges
ADD CONSTRAINT badges_pkey PRIMARY KEY (id);
ADD CONSTRAINT badges_pkey PRIMARY KEY (user_id, badge_id);
--
@ -1155,19 +987,11 @@ ALTER TABLE ONLY public.commentvotes
--
-- Name: banneddomains domains_domain_key; Type: CONSTRAINT; Schema: public; Owner: -
-- Name: banneddomains domain_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.banneddomains
ADD CONSTRAINT domains_domain_key UNIQUE (domain);
--
-- Name: banneddomains domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.banneddomains
ADD CONSTRAINT domains_pkey PRIMARY KEY (id);
ADD CONSTRAINT domain_pkey PRIMARY KEY (domain);
--
@ -1242,14 +1066,6 @@ ALTER TABLE ONLY public.users
ADD CONSTRAINT one_banner UNIQUE (bannerurl);
--
-- Name: userblocks one_block; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.userblocks
ADD CONSTRAINT one_block UNIQUE (user_id, target_id);
--
-- Name: commentflags one_comment_flag; Type: CONSTRAINT; Schema: public; Owner: -
--
@ -1306,22 +1122,6 @@ ALTER TABLE ONLY public.users
ADD CONSTRAINT one_profile_url UNIQUE (profileurl);
--
-- Name: subscriptions one_subscription; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.subscriptions
ADD CONSTRAINT one_subscription UNIQUE (user_id, submission_id);
--
-- Name: viewers one_view; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.viewers
ADD CONSTRAINT one_view UNIQUE (user_id, viewer_id);
--
-- Name: commentvotes onecvote; Type: CONSTRAINT; Schema: public; Owner: -
--
@ -1375,7 +1175,7 @@ ALTER TABLE ONLY public.subs
--
ALTER TABLE ONLY public.subscriptions
ADD CONSTRAINT subscriptions_pkey PRIMARY KEY (id);
ADD CONSTRAINT subscriptions_pkey PRIMARY KEY (submission_id, user_id);
--
@ -1402,28 +1202,12 @@ ALTER TABLE ONLY public.oauth_apps
ADD CONSTRAINT unique_id UNIQUE (client_id);
--
-- Name: badges user_badge_constraint; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.badges
ADD CONSTRAINT user_badge_constraint UNIQUE (user_id, badge_id);
--
-- Name: userblocks userblocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.userblocks
ADD CONSTRAINT userblocks_pkey PRIMARY KEY (id);
--
-- Name: alts userpair; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.alts
ADD CONSTRAINT userpair UNIQUE (user1, user2);
ADD CONSTRAINT userblocks_pkey PRIMARY KEY (user_id, target_id);
--
@ -1455,7 +1239,7 @@ ALTER TABLE ONLY public.users
--
ALTER TABLE ONLY public.viewers
ADD CONSTRAINT viewers_pkey PRIMARY KEY (id);
ADD CONSTRAINT viewers_pkey PRIMARY KEY (user_id, viewer_id);
--
@ -2141,7 +1925,7 @@ ALTER TABLE ONLY public.comments
--
ALTER TABLE ONLY public.commentvotes
ADD CONSTRAINT commentvote_comment_fkey FOREIGN KEY (comment_id) REFERENCES public.comments(id) MATCH FULL;
ADD CONSTRAINT commentvote_comment_fkey FOREIGN KEY (comment_id) REFERENCES public.comments(id) MATCH FULL NOT VALID;
--