2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- PostgreSQL database dump
|
|
|
|
--
|
|
|
|
|
2024-02-10 12:00:18 +00:00
|
|
|
-- Dumped from database version 15.6 (Ubuntu 15.6-1.pgdg22.04+1)
|
|
|
|
-- Dumped by pg_dump version 15.6 (Ubuntu 15.6-1.pgdg22.04+1)
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
SET statement_timeout = 0;
|
|
|
|
SET lock_timeout = 0;
|
|
|
|
SET idle_in_transaction_session_timeout = 0;
|
|
|
|
SET client_encoding = 'UTF8';
|
|
|
|
SET standard_conforming_strings = on;
|
|
|
|
SELECT pg_catalog.set_config('search_path', '', false);
|
|
|
|
SET check_function_bodies = false;
|
|
|
|
SET xmloption = content;
|
|
|
|
SET client_min_messages = warning;
|
|
|
|
SET row_security = off;
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: -
|
|
|
|
--
|
|
|
|
|
2023-08-04 13:33:33 +00:00
|
|
|
CREATE EXTENSION IF NOT EXISTS pg_stat_statements WITH SCHEMA public;
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: EXTENSION pg_stat_statements; Type: COMMENT; Schema: -; Owner: -
|
|
|
|
--
|
|
|
|
|
2023-08-04 13:33:33 +00:00
|
|
|
COMMENT ON EXTENSION pg_stat_statements IS 'track planning and execution statistics of all SQL statements executed';
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: pg_trgm; Type: EXTENSION; Schema: -; Owner: -
|
|
|
|
--
|
|
|
|
|
2023-08-04 13:33:33 +00:00
|
|
|
CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner: -
|
|
|
|
--
|
|
|
|
|
2023-08-04 13:33:33 +00:00
|
|
|
COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams';
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: casino_game_currency; Type: TYPE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TYPE public.casino_game_currency AS ENUM (
|
|
|
|
'coins',
|
|
|
|
'marseybux'
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: casino_game_kind; Type: TYPE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TYPE public.casino_game_kind AS ENUM (
|
|
|
|
'blackjack',
|
|
|
|
'slots',
|
|
|
|
'roulette'
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
SET default_tablespace = '';
|
|
|
|
|
|
|
|
SET default_table_access_method = heap;
|
|
|
|
|
2023-05-12 15:28:06 +00:00
|
|
|
--
|
|
|
|
-- Name: users; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.users (
|
|
|
|
id integer NOT NULL,
|
|
|
|
username character varying(30) NOT NULL,
|
|
|
|
email character varying(255),
|
|
|
|
passhash character varying(255) NOT NULL,
|
|
|
|
created_utc integer NOT NULL,
|
|
|
|
admin_level integer DEFAULT 0 NOT NULL,
|
2023-08-03 08:02:31 +00:00
|
|
|
email_verified boolean DEFAULT false NOT NULL,
|
2023-05-12 15:28:06 +00:00
|
|
|
bio character varying(5000),
|
|
|
|
bio_html character varying(20000),
|
|
|
|
referred_by integer,
|
|
|
|
is_banned integer,
|
|
|
|
ban_reason character varying(256),
|
|
|
|
login_nonce integer DEFAULT 0 NOT NULL,
|
|
|
|
reserved character varying(256),
|
|
|
|
mfa_secret character varying(32),
|
|
|
|
is_private boolean DEFAULT false NOT NULL,
|
2024-02-03 00:00:16 +00:00
|
|
|
unban_utc integer DEFAULT 0,
|
2023-05-12 15:28:06 +00:00
|
|
|
custom_filter_list character varying(1000) DEFAULT ''::character varying,
|
|
|
|
stored_subscriber_count integer DEFAULT 0 NOT NULL,
|
|
|
|
original_username character varying(30),
|
2023-10-05 17:57:50 +00:00
|
|
|
flair_html character varying(1000),
|
2023-05-12 15:28:06 +00:00
|
|
|
defaultsorting character varying(15) NOT NULL,
|
|
|
|
defaulttime character varying(5) NOT NULL,
|
|
|
|
namecolor character varying(6) NOT NULL,
|
2023-10-17 18:54:02 +00:00
|
|
|
flaircolor character varying(6) NOT NULL,
|
2023-05-12 15:28:06 +00:00
|
|
|
profileurl character varying(65),
|
|
|
|
bannerurl character varying(65),
|
|
|
|
newtab boolean DEFAULT false NOT NULL,
|
|
|
|
flairchanged integer,
|
|
|
|
defaultsortingcomments character varying(15) NOT NULL,
|
|
|
|
theme character varying(15) NOT NULL,
|
|
|
|
song character varying(50),
|
|
|
|
slurreplacer integer DEFAULT 1 NOT NULL,
|
|
|
|
shadowbanned integer,
|
|
|
|
newtabexternal boolean DEFAULT true NOT NULL,
|
2023-10-05 17:57:50 +00:00
|
|
|
flair character varying(100),
|
2023-05-12 15:28:06 +00:00
|
|
|
themecolor character varying(6) NOT NULL,
|
2023-12-25 00:00:15 +00:00
|
|
|
css character varying(20000),
|
|
|
|
profilecss character varying(20000),
|
2023-05-12 15:28:06 +00:00
|
|
|
coins integer DEFAULT 0 NOT NULL,
|
2023-06-23 13:54:00 +00:00
|
|
|
chud integer DEFAULT 0 NOT NULL,
|
2023-05-12 15:28:06 +00:00
|
|
|
post_count integer DEFAULT 0 NOT NULL,
|
|
|
|
comment_count integer DEFAULT 0 NOT NULL,
|
|
|
|
highres character varying(60),
|
|
|
|
patron integer DEFAULT 0 NOT NULL,
|
|
|
|
controversial boolean DEFAULT false NOT NULL,
|
|
|
|
background character varying(167),
|
|
|
|
verified character varying(100),
|
|
|
|
received_award_count integer DEFAULT 0 NOT NULL,
|
|
|
|
truescore integer DEFAULT 0 NOT NULL,
|
|
|
|
frontsize integer DEFAULT 25 NOT NULL,
|
|
|
|
coins_spent integer DEFAULT 0 NOT NULL,
|
|
|
|
marseybux integer DEFAULT 0 NOT NULL,
|
|
|
|
verifiedcolor character varying(6),
|
2023-10-13 19:04:45 +00:00
|
|
|
hieroglyphs integer,
|
2023-05-12 15:28:06 +00:00
|
|
|
sig character varying(200),
|
|
|
|
sig_html character varying(1000),
|
|
|
|
friends character varying(5000),
|
|
|
|
friends_html character varying(20000),
|
2023-10-05 17:57:50 +00:00
|
|
|
show_sigs boolean NOT NULL,
|
2023-05-12 15:28:06 +00:00
|
|
|
enemies character varying(5000),
|
|
|
|
enemies_html character varying(20000),
|
|
|
|
longpost integer,
|
|
|
|
bird integer,
|
|
|
|
lootboxes_bought integer DEFAULT 0 NOT NULL,
|
|
|
|
progressivestack integer,
|
|
|
|
patron_utc integer DEFAULT 0 NOT NULL,
|
|
|
|
rehab integer,
|
|
|
|
house character varying(16),
|
|
|
|
deflector integer,
|
2023-09-20 13:14:06 +00:00
|
|
|
reddit character varying(20) NOT NULL,
|
2023-05-12 15:28:06 +00:00
|
|
|
currently_held_lottery_tickets integer DEFAULT 0 NOT NULL,
|
|
|
|
total_held_lottery_tickets integer DEFAULT 0 NOT NULL,
|
|
|
|
total_lottery_winnings integer DEFAULT 0 NOT NULL,
|
|
|
|
last_active integer DEFAULT 0 NOT NULL,
|
|
|
|
last_viewed_post_notifs integer NOT NULL,
|
2023-06-22 16:15:20 +00:00
|
|
|
pronouns character varying(15) NOT NULL,
|
2023-05-12 15:28:06 +00:00
|
|
|
last_viewed_log_notifs integer NOT NULL,
|
2024-02-08 04:00:14 +00:00
|
|
|
imgsed boolean NOT NULL,
|
2023-05-12 15:28:06 +00:00
|
|
|
earlylife integer,
|
|
|
|
bite integer,
|
|
|
|
old_house character varying(16),
|
|
|
|
owoify integer,
|
|
|
|
marsify integer,
|
|
|
|
is_muted boolean DEFAULT false NOT NULL,
|
|
|
|
coins_spent_on_hats integer DEFAULT 0 NOT NULL,
|
|
|
|
rainbow integer,
|
|
|
|
spider integer,
|
|
|
|
profanityreplacer integer DEFAULT 1 NOT NULL,
|
|
|
|
last_viewed_reddit_notifs integer NOT NULL,
|
|
|
|
profile_background character varying(167),
|
|
|
|
chudded_by integer,
|
|
|
|
blacklisted_by integer,
|
2023-06-23 13:54:00 +00:00
|
|
|
chud_phrase character varying(35),
|
2023-05-13 16:01:11 +00:00
|
|
|
prelock_username character varying(30),
|
Add the "Misogynist" award to harass incels (#154)
Whazzup? This PR is the final solution to the incel problem. There's an old indian proverb that says: "never judge a man until you've walked two moons in his mocassins". In this case, it should be: "never judge a woman until you've walked 24 hrs in her high-heels".
The misogynist award is a comment-transforming award that "feminizes" comments. It does the following:
- makes text pink
- makes text lowercase
- removes "complicated" punctuation
- makes paragraphs into run-on sentences
- adds stereotypical girly remarks to the beginning or end of a paragraph.
For example:
INPUT
> What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little "clever" comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, kiddo.
OUTPUT
> im literally screaming, what the fuck did you just fucking say about me, you little bitch? ill have you know i graduated top of my class in the navy seals, and ive been involved in numerous secret raids on al-quaeda, and i have over 300 confirmed kills, i am trained in gorilla warfare and im the top sniper in the entire us armed forces, you are nothing to me but just another target, i will wipe you the fuck out with precision the likes of which has never been seen before on this earth, mark my fucking words, you think you can get away with saying that shit to me over the internet? think again, fucker, as we speak i am contacting my secret network of spies across the usa and your ip is being traced right now so you better prepare for the storm, maggot, the storm that wipes out the pathetic little thing you call your life, youre fucking dead, kid, i can be anywhere, anytime, and i can kill you in over seven hundred ways, and thats just with my bare hands, not only am i extensively trained in unarmed combat, but i have access to the entire arsenal of the united states marine corps and i will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit, if only you could have known what unholy retribution your little clever comment was about to bring down upon you, maybe you would have held your fucking tongue, but you couldnt, you didnt, and now youre paying the price, you goddamn idiot, i will shit fury all over you and you will drown in it, youre fucking dead, kiddo
It also sets the user's pfp to a random white woman. Well, psuedorandom - it's based off of the user's id, so each user will only ever have one pfp assigned to them, which I think is nifty.
Finally, it changes the name of the user toa girly name.
There is one small problem with the PR, which is simply that I manually added a badge for testing purposes. If you like this PR, I will submit the badge throught the proper chanels and fix it.
![image](/attachments/641c7276-ffe4-4e69-b3e9-aec9f4f94191)
Co-authored-by: Chuck Sneed <sneed@formerlychucks.net>
Reviewed-on: https://fsdfsd.net/rDrama/rDrama/pulls/154
Co-authored-by: HeyMoon <heymoon@noreply.fsdfsd.net>
Co-committed-by: HeyMoon <heymoon@noreply.fsdfsd.net>
2023-06-21 12:36:07 +00:00
|
|
|
namechanged integer,
|
2023-06-26 17:57:50 +00:00
|
|
|
queen integer,
|
2023-08-02 07:29:06 +00:00
|
|
|
sharpen integer,
|
2023-08-03 08:02:48 +00:00
|
|
|
lifetimedonated integer NOT NULL,
|
2023-10-02 13:41:30 +00:00
|
|
|
lifetimedonated_visible boolean NOT NULL,
|
|
|
|
jumpscare integer DEFAULT 0 NOT NULL,
|
2023-11-26 00:00:13 +00:00
|
|
|
zombie integer DEFAULT 0 NOT NULL,
|
2023-12-01 20:00:13 +00:00
|
|
|
extra_username character varying(30),
|
2024-02-01 04:00:15 +00:00
|
|
|
grinch boolean NOT NULL,
|
2024-02-08 04:00:14 +00:00
|
|
|
last_viewed_modmail_notifs integer NOT NULL,
|
|
|
|
nitter boolean DEFAULT false NOT NULL,
|
|
|
|
hole_creation_notifs boolean NOT NULL,
|
2024-02-11 16:00:14 +00:00
|
|
|
group_creation_notifs boolean NOT NULL,
|
|
|
|
effortpost_notifs boolean NOT NULL,
|
|
|
|
shadowban_reason character varying(256)
|
2023-05-12 15:28:06 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: lifetimedonated(public.users); Type: FUNCTION; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE FUNCTION public.lifetimedonated(public.users) RETURNS integer
|
|
|
|
LANGUAGE sql IMMUTABLE STRICT
|
|
|
|
AS $_$
|
|
|
|
select sum(amount)
|
|
|
|
from transactions
|
|
|
|
where transactions.email = $1.email
|
|
|
|
$_$;
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: alts; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.alts (
|
|
|
|
user1 integer NOT NULL,
|
|
|
|
user2 integer NOT NULL,
|
|
|
|
is_manual boolean DEFAULT false NOT NULL,
|
|
|
|
created_utc integer,
|
|
|
|
CONSTRAINT alts_cant_be_equal CHECK ((user1 <> user2))
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: award_relationships; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.award_relationships (
|
|
|
|
id integer NOT NULL,
|
|
|
|
user_id integer NOT NULL,
|
2023-06-07 23:36:47 +00:00
|
|
|
post_id integer,
|
2023-03-31 20:00:06 +00:00
|
|
|
comment_id integer,
|
|
|
|
kind character varying(20) NOT NULL,
|
|
|
|
awarded_utc integer,
|
|
|
|
created_utc integer,
|
2023-10-04 15:31:58 +00:00
|
|
|
price_paid integer DEFAULT 0 NOT NULL,
|
|
|
|
note character varying(200)
|
2023-03-31 20:00:06 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: award_relationships_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE SEQUENCE public.award_relationships_id_seq
|
|
|
|
AS integer
|
|
|
|
START WITH 1
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: award_relationships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER SEQUENCE public.award_relationships_id_seq OWNED BY public.award_relationships.id;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: badge_defs; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.badge_defs (
|
|
|
|
id integer NOT NULL,
|
|
|
|
name character varying(50) NOT NULL,
|
|
|
|
description character varying(200),
|
2023-11-04 17:01:12 +00:00
|
|
|
created_utc integer NOT NULL
|
2023-03-31 20:00:06 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: badge_defs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE SEQUENCE public.badge_defs_id_seq
|
|
|
|
AS integer
|
|
|
|
START WITH 106
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: badge_defs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER SEQUENCE public.badge_defs_id_seq OWNED BY public.badge_defs.id;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: badges; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.badges (
|
|
|
|
badge_id integer NOT NULL,
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
description character varying(256),
|
|
|
|
url character varying(256),
|
|
|
|
created_utc integer NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: banneddomains; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.banneddomains (
|
|
|
|
domain character varying(100) NOT NULL,
|
|
|
|
reason character varying(100) NOT NULL,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: casino_games; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.casino_games (
|
|
|
|
id integer NOT NULL,
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
created_utc integer NOT NULL,
|
|
|
|
active boolean DEFAULT true NOT NULL,
|
|
|
|
currency public.casino_game_currency NOT NULL,
|
|
|
|
wager integer NOT NULL,
|
|
|
|
winnings integer NOT NULL,
|
|
|
|
kind public.casino_game_kind NOT NULL,
|
|
|
|
game_state jsonb NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: casino_games_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE SEQUENCE public.casino_games_id_seq
|
|
|
|
AS integer
|
|
|
|
START WITH 1
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: casino_games_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER SEQUENCE public.casino_games_id_seq OWNED BY public.casino_games.id;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: client_auths; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.client_auths (
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
oauth_client integer NOT NULL,
|
|
|
|
access_token character(128) NOT NULL,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_option_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE SEQUENCE public.comment_option_id_seq
|
|
|
|
AS integer
|
|
|
|
START WITH 1
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_option_votes; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.comment_option_votes (
|
|
|
|
option_id integer NOT NULL,
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
created_utc integer NOT NULL,
|
|
|
|
comment_id integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_options; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.comment_options (
|
|
|
|
id integer DEFAULT nextval('public.comment_option_id_seq'::regclass) NOT NULL,
|
|
|
|
parent_id integer NOT NULL,
|
|
|
|
body_html character varying(500) NOT NULL,
|
|
|
|
exclusive integer NOT NULL,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_save_relationship; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.comment_save_relationship (
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
comment_id integer NOT NULL,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-24 08:21:57 +00:00
|
|
|
-- Name: commentreports; Type: TABLE; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-24 08:21:57 +00:00
|
|
|
CREATE TABLE public.commentreports (
|
2023-03-31 20:00:06 +00:00
|
|
|
user_id integer NOT NULL,
|
|
|
|
comment_id integer NOT NULL,
|
|
|
|
reason character varying(350),
|
|
|
|
created_utc integer NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comments; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.comments (
|
|
|
|
id integer NOT NULL,
|
|
|
|
author_id integer NOT NULL,
|
|
|
|
created_utc integer NOT NULL,
|
2023-06-23 14:26:07 +00:00
|
|
|
parent_post integer,
|
2023-03-31 20:00:06 +00:00
|
|
|
is_banned boolean DEFAULT false NOT NULL,
|
|
|
|
edited_utc integer DEFAULT 0 NOT NULL,
|
|
|
|
deleted_utc integer DEFAULT 0 NOT NULL,
|
|
|
|
is_approved integer,
|
|
|
|
level integer DEFAULT 0 NOT NULL,
|
|
|
|
parent_comment_id integer,
|
2023-10-05 17:57:50 +00:00
|
|
|
nsfw boolean DEFAULT false NOT NULL,
|
2023-03-31 20:00:06 +00:00
|
|
|
upvotes integer DEFAULT 1 NOT NULL,
|
|
|
|
downvotes integer DEFAULT 0 NOT NULL,
|
|
|
|
is_bot boolean DEFAULT false NOT NULL,
|
|
|
|
app_id integer,
|
|
|
|
sentto integer,
|
2023-09-20 13:14:06 +00:00
|
|
|
bannedfor character varying(313),
|
2023-03-31 20:00:06 +00:00
|
|
|
stickied character varying(40),
|
|
|
|
body character varying(10000),
|
|
|
|
body_html character varying(40000),
|
|
|
|
ban_reason character varying(25),
|
|
|
|
realupvotes integer DEFAULT 1 NOT NULL,
|
|
|
|
top_comment_id integer,
|
|
|
|
stickied_utc integer,
|
|
|
|
ghost boolean DEFAULT false NOT NULL,
|
|
|
|
slots_result character varying(36),
|
|
|
|
blackjack_result character varying(860),
|
|
|
|
treasure_amount character varying(10),
|
|
|
|
casino_game_id integer,
|
|
|
|
chuddedfor character varying(50),
|
2023-06-23 14:26:07 +00:00
|
|
|
wall_user_id integer,
|
2023-08-14 12:27:33 +00:00
|
|
|
chudded boolean NOT NULL,
|
|
|
|
ping_cost integer NOT NULL,
|
|
|
|
rainbowed boolean NOT NULL,
|
|
|
|
queened boolean NOT NULL,
|
2023-12-04 16:00:13 +00:00
|
|
|
sharpened boolean NOT NULL,
|
2024-02-14 00:00:15 +00:00
|
|
|
num_of_pinned_children integer NOT NULL,
|
2024-02-16 14:16:23 +00:00
|
|
|
body_ts tsvector GENERATED ALWAYS AS (to_tsvector('english'::regconfig, (body)::text)) STORED,
|
|
|
|
distinguished boolean NOT NULL
|
2023-03-31 20:00:06 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE SEQUENCE public.comments_id_seq
|
|
|
|
AS integer
|
|
|
|
START WITH 1
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER SEQUENCE public.comments_id_seq OWNED BY public.comments.id;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: commentvotes; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.commentvotes (
|
|
|
|
comment_id integer NOT NULL,
|
|
|
|
vote_type integer NOT NULL,
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
"real" boolean DEFAULT true NOT NULL,
|
|
|
|
created_utc integer NOT NULL,
|
|
|
|
coins smallint DEFAULT 1 NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: emojis; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.emojis (
|
|
|
|
name character varying(30) NOT NULL,
|
|
|
|
author_id integer NOT NULL,
|
|
|
|
tags character varying(200) NOT NULL,
|
|
|
|
count integer DEFAULT 0 NOT NULL,
|
|
|
|
submitter_id integer,
|
2023-10-26 20:00:15 +00:00
|
|
|
created_utc integer NOT NULL,
|
2023-10-02 13:41:30 +00:00
|
|
|
kind character varying(15) NOT NULL,
|
2023-10-05 17:57:50 +00:00
|
|
|
nsfw boolean NOT NULL
|
2023-03-31 20:00:06 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: exiles; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.exiles (
|
|
|
|
user_id integer NOT NULL,
|
2023-10-07 20:00:13 +00:00
|
|
|
hole character varying(25) NOT NULL,
|
2023-03-31 20:00:06 +00:00
|
|
|
exiler_id integer NOT NULL,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: follows; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.follows (
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
target_id integer NOT NULL,
|
|
|
|
created_utc integer NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: group_memberships; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.group_memberships (
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
group_name character varying(25) NOT NULL,
|
|
|
|
created_utc integer NOT NULL,
|
2023-08-09 08:35:48 +00:00
|
|
|
approved_utc integer,
|
|
|
|
is_mod boolean NOT NULL
|
2023-03-31 20:00:06 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: groups; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.groups (
|
|
|
|
name character varying(25) NOT NULL,
|
2024-02-11 12:00:13 +00:00
|
|
|
created_utc integer NOT NULL,
|
2024-02-13 16:00:15 +00:00
|
|
|
owner_id integer,
|
2024-02-15 20:00:15 +00:00
|
|
|
description character varying(100),
|
|
|
|
description_html character varying(1000)
|
2023-03-31 20:00:06 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hat_defs; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.hat_defs (
|
|
|
|
id integer NOT NULL,
|
|
|
|
name character varying(50) NOT NULL,
|
|
|
|
description character varying(300) NOT NULL,
|
|
|
|
author_id integer NOT NULL,
|
|
|
|
price integer NOT NULL,
|
|
|
|
submitter_id integer,
|
|
|
|
created_utc integer NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hat_defs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE SEQUENCE public.hat_defs_id_seq
|
|
|
|
AS integer
|
|
|
|
START WITH 1
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hat_defs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER SEQUENCE public.hat_defs_id_seq OWNED BY public.hat_defs.id;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hats; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.hats (
|
|
|
|
hat_id integer NOT NULL,
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
equipped boolean,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
--
|
|
|
|
-- Name: hole_actions; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.hole_actions (
|
|
|
|
id integer NOT NULL,
|
|
|
|
hole character varying(25) NOT NULL,
|
|
|
|
user_id integer,
|
|
|
|
target_user_id integer,
|
|
|
|
target_post_id integer,
|
|
|
|
target_comment_id integer,
|
|
|
|
created_utc integer NOT NULL,
|
|
|
|
kind character varying(32) DEFAULT NULL::character varying,
|
|
|
|
_note character varying(2019) DEFAULT NULL::character varying
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hole_blocks; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.hole_blocks (
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
hole character varying(25) NOT NULL,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hole_follows; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.hole_follows (
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
hole character varying(25) NOT NULL,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: holes; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.holes (
|
|
|
|
name character varying(25) NOT NULL,
|
|
|
|
sidebar character varying(10000),
|
|
|
|
sidebar_html character varying(20000),
|
|
|
|
bannerurls character varying(60)[] DEFAULT '{}'::character varying[] NOT NULL,
|
2023-12-25 00:00:15 +00:00
|
|
|
css character varying(20000),
|
2024-02-16 00:00:15 +00:00
|
|
|
stealth boolean NOT NULL,
|
2023-10-07 20:00:13 +00:00
|
|
|
marseyurl character varying(60),
|
2023-11-05 00:00:14 +00:00
|
|
|
created_utc integer,
|
2024-02-11 12:00:13 +00:00
|
|
|
sidebarurls character varying(60)[] DEFAULT '{}'::character varying[] NOT NULL,
|
2024-02-16 00:00:15 +00:00
|
|
|
snappy_quotes character varying(20000),
|
|
|
|
public_use boolean NOT NULL
|
2023-10-07 20:00:13 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: lotteries; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.lotteries (
|
|
|
|
id integer NOT NULL,
|
|
|
|
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,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: lotteries_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE SEQUENCE public.lotteries_id_seq
|
|
|
|
AS integer
|
|
|
|
START WITH 1
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: lotteries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER SEQUENCE public.lotteries_id_seq OWNED BY public.lotteries.id;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: media; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.media (
|
|
|
|
kind character varying(5) NOT NULL,
|
|
|
|
filename character varying(200) NOT NULL,
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
created_utc integer NOT NULL,
|
|
|
|
size integer NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: modactions; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.modactions (
|
|
|
|
id integer NOT NULL,
|
|
|
|
user_id integer,
|
|
|
|
target_user_id integer,
|
2023-06-07 23:36:47 +00:00
|
|
|
target_post_id integer,
|
2023-03-31 20:00:06 +00:00
|
|
|
target_comment_id integer,
|
|
|
|
created_utc integer NOT NULL,
|
|
|
|
kind character varying(33) DEFAULT NULL::character varying,
|
|
|
|
_note character varying(2019) DEFAULT NULL::character varying
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: modactions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE SEQUENCE public.modactions_id_seq
|
|
|
|
AS integer
|
|
|
|
START WITH 1
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: modactions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
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,
|
2023-10-07 20:00:13 +00:00
|
|
|
hole character varying(25) NOT NULL,
|
2023-03-31 20:00:06 +00:00
|
|
|
created_utc integer NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: notifications; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.notifications (
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
comment_id integer NOT NULL,
|
|
|
|
read boolean NOT NULL,
|
|
|
|
created_utc integer NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: oauth_apps; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.oauth_apps (
|
|
|
|
id integer NOT NULL,
|
|
|
|
client_id character(64),
|
|
|
|
app_name character varying(50) NOT NULL,
|
|
|
|
redirect_uri character varying(4096) NOT NULL,
|
|
|
|
author_id integer NOT NULL,
|
|
|
|
description character varying(256) NOT NULL,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: oauth_apps_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE SEQUENCE public.oauth_apps_id_seq
|
|
|
|
AS integer
|
|
|
|
START WITH 1
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: oauth_apps_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER SEQUENCE public.oauth_apps_id_seq OWNED BY public.oauth_apps.id;
|
|
|
|
|
|
|
|
|
2023-07-03 23:44:22 +00:00
|
|
|
--
|
|
|
|
-- Name: orgies; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.orgies (
|
2023-08-17 00:08:08 +00:00
|
|
|
type character varying(8) NOT NULL,
|
2023-07-10 12:35:46 +00:00
|
|
|
data character varying(200) NOT NULL,
|
2023-08-17 00:08:08 +00:00
|
|
|
title character varying(1000) NOT NULL,
|
2023-10-02 13:41:30 +00:00
|
|
|
created_utc integer NOT NULL,
|
2023-10-13 12:35:17 +00:00
|
|
|
end_utc integer,
|
|
|
|
start_utc integer NOT NULL,
|
|
|
|
started boolean NOT NULL
|
2023-07-03 23:44:22 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
2023-07-22 21:00:49 +00:00
|
|
|
--
|
|
|
|
-- Name: posts; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.posts (
|
|
|
|
id integer NOT NULL,
|
|
|
|
author_id integer NOT NULL,
|
|
|
|
created_utc integer NOT NULL,
|
|
|
|
is_banned boolean DEFAULT false NOT NULL,
|
2023-10-05 17:57:50 +00:00
|
|
|
nsfw boolean DEFAULT false NOT NULL,
|
2023-07-22 21:00:49 +00:00
|
|
|
deleted_utc integer DEFAULT 0 NOT NULL,
|
|
|
|
is_approved integer,
|
|
|
|
edited_utc integer DEFAULT 0 NOT NULL,
|
|
|
|
is_pinned boolean DEFAULT false NOT NULL,
|
|
|
|
upvotes integer DEFAULT 1 NOT NULL,
|
|
|
|
downvotes integer DEFAULT 0 NOT NULL,
|
|
|
|
app_id integer,
|
|
|
|
thumburl character varying(200),
|
|
|
|
private boolean DEFAULT false NOT NULL,
|
|
|
|
views integer DEFAULT 0 NOT NULL,
|
|
|
|
is_bot boolean DEFAULT false NOT NULL,
|
2023-09-20 13:14:06 +00:00
|
|
|
bannedfor character varying(313),
|
2023-07-22 21:00:49 +00:00
|
|
|
comment_count integer DEFAULT 0 NOT NULL,
|
|
|
|
stickied character varying(40),
|
|
|
|
title character varying(500) NOT NULL,
|
|
|
|
url character varying(2083),
|
|
|
|
body character varying(100000),
|
|
|
|
body_html character varying(200000),
|
|
|
|
embed character varying(1500),
|
|
|
|
ban_reason character varying(25),
|
|
|
|
title_html character varying(1500) NOT NULL,
|
|
|
|
realupvotes integer,
|
|
|
|
flair character varying(350),
|
|
|
|
stickied_utc integer,
|
|
|
|
ghost boolean DEFAULT false NOT NULL,
|
2023-10-07 20:00:13 +00:00
|
|
|
hole character varying(25),
|
2023-07-22 21:00:49 +00:00
|
|
|
new boolean,
|
|
|
|
hole_pinned character varying(30),
|
|
|
|
notify boolean NOT NULL,
|
|
|
|
chuddedfor character varying(50),
|
|
|
|
posterurl character varying(200),
|
2023-08-14 12:27:33 +00:00
|
|
|
chudded boolean NOT NULL,
|
2023-08-13 20:25:27 +00:00
|
|
|
ping_cost integer NOT NULL,
|
2023-08-14 12:27:33 +00:00
|
|
|
bump_utc integer NOT NULL,
|
|
|
|
rainbowed boolean NOT NULL,
|
|
|
|
queened boolean NOT NULL,
|
2024-02-06 20:00:15 +00:00
|
|
|
sharpened boolean NOT NULL,
|
2024-02-16 14:16:23 +00:00
|
|
|
effortpost boolean NOT NULL,
|
|
|
|
distinguished boolean NOT NULL
|
2023-07-22 21:00:49 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
2023-06-07 23:36:47 +00:00
|
|
|
--
|
2023-06-07 23:51:39 +00:00
|
|
|
-- Name: post_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
2023-06-07 23:36:47 +00:00
|
|
|
--
|
|
|
|
|
2023-06-07 23:51:39 +00:00
|
|
|
CREATE SEQUENCE public.post_id_seq
|
|
|
|
AS integer
|
|
|
|
START WITH 1
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: post_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER SEQUENCE public.post_id_seq OWNED BY public.posts.id;
|
2023-06-07 23:36:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-07 23:51:39 +00:00
|
|
|
-- Name: post_option_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
2023-06-07 23:36:47 +00:00
|
|
|
--
|
|
|
|
|
2023-06-07 23:51:39 +00:00
|
|
|
CREATE SEQUENCE public.post_option_id_seq
|
2023-06-07 23:36:47 +00:00
|
|
|
AS integer
|
|
|
|
START WITH 1
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
2023-06-07 23:51:39 +00:00
|
|
|
--
|
|
|
|
-- Name: post_option_votes; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.post_option_votes (
|
|
|
|
option_id integer NOT NULL,
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
created_utc integer NOT NULL,
|
|
|
|
post_id integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2023-06-07 23:36:47 +00:00
|
|
|
--
|
|
|
|
-- Name: post_options; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.post_options (
|
2023-06-07 23:51:39 +00:00
|
|
|
id integer DEFAULT nextval('public.post_option_id_seq'::regclass) NOT NULL,
|
2023-06-07 23:36:47 +00:00
|
|
|
parent_id integer NOT NULL,
|
|
|
|
body_html character varying(500) NOT NULL,
|
|
|
|
exclusive integer NOT NULL,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: push_subscriptions; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.push_subscriptions (
|
|
|
|
user_id integer NOT NULL,
|
2023-09-02 08:44:03 +00:00
|
|
|
subscription_json character varying(700) NOT NULL,
|
2023-03-31 20:00:06 +00:00
|
|
|
created_utc integer NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2023-06-24 08:21:57 +00:00
|
|
|
--
|
|
|
|
-- Name: reports; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.reports (
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
post_id integer NOT NULL,
|
|
|
|
reason character varying(350),
|
|
|
|
created_utc integer NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: save_relationship; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.save_relationship (
|
2023-06-07 23:36:47 +00:00
|
|
|
post_id integer NOT NULL,
|
2023-03-31 20:00:06 +00:00
|
|
|
user_id integer NOT NULL,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: stealth_hole_unblocks; Type: TABLE; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
CREATE TABLE public.stealth_hole_unblocks (
|
2023-03-31 20:00:06 +00:00
|
|
|
user_id integer NOT NULL,
|
2023-10-07 20:00:13 +00:00
|
|
|
hole character varying(25) NOT NULL,
|
2023-03-31 20:00:06 +00:00
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: subactions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE SEQUENCE public.subactions_id_seq
|
|
|
|
AS integer
|
|
|
|
START WITH 1
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: subactions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER SEQUENCE public.subactions_id_seq OWNED BY public.hole_actions.id;
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: subscriptions; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.subscriptions (
|
|
|
|
user_id integer NOT NULL,
|
2023-06-07 23:36:47 +00:00
|
|
|
post_id integer NOT NULL,
|
2023-03-31 20:00:06 +00:00
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: transactions; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.transactions (
|
2024-01-29 08:00:15 +00:00
|
|
|
id character varying(67) NOT NULL,
|
2023-03-31 20:00:06 +00:00
|
|
|
created_utc integer NOT NULL,
|
|
|
|
type character varying(12) NOT NULL,
|
|
|
|
amount integer NOT NULL,
|
|
|
|
email character varying(255) NOT NULL,
|
|
|
|
claimed boolean
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: userblocks; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.userblocks (
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
target_id integer NOT NULL,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2023-09-07 08:57:54 +00:00
|
|
|
--
|
|
|
|
-- Name: usermutes; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.usermutes (
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
target_id integer NOT NULL,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE SEQUENCE public.users_id_seq
|
|
|
|
AS integer
|
|
|
|
START WITH 1
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: viewers; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.viewers (
|
|
|
|
user_id integer NOT NULL,
|
|
|
|
viewer_id integer NOT NULL,
|
|
|
|
last_view_utc integer NOT NULL,
|
|
|
|
created_utc integer
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: votes; Type: TABLE; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE public.votes (
|
|
|
|
user_id integer NOT NULL,
|
2023-06-07 23:36:47 +00:00
|
|
|
post_id integer NOT NULL,
|
2023-03-31 20:00:06 +00:00
|
|
|
vote_type integer NOT NULL,
|
|
|
|
"real" boolean DEFAULT true NOT NULL,
|
|
|
|
created_utc integer NOT NULL,
|
|
|
|
coins smallint DEFAULT 1 NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: award_relationships id; Type: DEFAULT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.award_relationships ALTER COLUMN id SET DEFAULT nextval('public.award_relationships_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: badge_defs id; Type: DEFAULT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.badge_defs ALTER COLUMN id SET DEFAULT nextval('public.badge_defs_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: casino_games id; Type: DEFAULT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.casino_games ALTER COLUMN id SET DEFAULT nextval('public.casino_games_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comments id; Type: DEFAULT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comments ALTER COLUMN id SET DEFAULT nextval('public.comments_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hat_defs id; Type: DEFAULT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.hat_defs ALTER COLUMN id SET DEFAULT nextval('public.hat_defs_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
--
|
|
|
|
-- Name: hole_actions id; Type: DEFAULT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.hole_actions ALTER COLUMN id SET DEFAULT nextval('public.subactions_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: lotteries id; Type: DEFAULT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.lotteries ALTER COLUMN id SET DEFAULT nextval('public.lotteries_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: modactions id; Type: DEFAULT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.modactions ALTER COLUMN id SET DEFAULT nextval('public.modactions_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: oauth_apps id; Type: DEFAULT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.oauth_apps ALTER COLUMN id SET DEFAULT nextval('public.oauth_apps_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-07 23:36:47 +00:00
|
|
|
-- Name: posts id; Type: DEFAULT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-07 23:51:39 +00:00
|
|
|
ALTER TABLE ONLY public.posts ALTER COLUMN id SET DEFAULT nextval('public.post_id_seq'::regclass);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users id; Type: DEFAULT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: alts alts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.alts
|
|
|
|
ADD CONSTRAINT alts_pkey PRIMARY KEY (user1, user2);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: award_relationships award_constraint; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.award_relationships
|
2023-06-07 23:36:47 +00:00
|
|
|
ADD CONSTRAINT award_constraint UNIQUE (user_id, post_id, comment_id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: award_relationships award_relationships_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.award_relationships
|
|
|
|
ADD CONSTRAINT award_relationships_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: badge_defs badge_def_name_unique; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.badge_defs
|
|
|
|
ADD CONSTRAINT badge_def_name_unique UNIQUE (name);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: badge_defs badge_defs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.badge_defs
|
|
|
|
ADD CONSTRAINT badge_defs_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: badges badges_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.badges
|
|
|
|
ADD CONSTRAINT badges_pkey PRIMARY KEY (user_id, badge_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: casino_games casino_games_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.casino_games
|
|
|
|
ADD CONSTRAINT casino_games_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: client_auths client_auths_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.client_auths
|
|
|
|
ADD CONSTRAINT client_auths_pkey PRIMARY KEY (user_id, oauth_client);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_option_votes comment_option_votes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comment_option_votes
|
|
|
|
ADD CONSTRAINT comment_option_votes_pkey PRIMARY KEY (option_id, user_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_options comment_options_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comment_options
|
|
|
|
ADD CONSTRAINT comment_options_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_save_relationship comment_save_relationship_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comment_save_relationship
|
|
|
|
ADD CONSTRAINT comment_save_relationship_pkey PRIMARY KEY (user_id, comment_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-24 08:21:57 +00:00
|
|
|
-- Name: commentreports commentreports_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-24 08:21:57 +00:00
|
|
|
ALTER TABLE ONLY public.commentreports
|
|
|
|
ADD CONSTRAINT commentreports_pkey PRIMARY KEY (comment_id, user_id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comments comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comments
|
|
|
|
ADD CONSTRAINT comments_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: commentvotes commentvotes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.commentvotes
|
|
|
|
ADD CONSTRAINT commentvotes_pkey PRIMARY KEY (comment_id, user_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: banneddomains domain_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.banneddomains
|
|
|
|
ADD CONSTRAINT domain_pkey PRIMARY KEY (domain);
|
|
|
|
|
|
|
|
|
2023-07-03 23:44:22 +00:00
|
|
|
--
|
|
|
|
-- Name: emojis emoji_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.emojis
|
|
|
|
ADD CONSTRAINT emoji_pkey PRIMARY KEY (name);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: exiles exiles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.exiles
|
2023-10-07 20:00:13 +00:00
|
|
|
ADD CONSTRAINT exiles_pkey PRIMARY KEY (user_id, hole);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: follows follows_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.follows
|
|
|
|
ADD CONSTRAINT follows_pkey PRIMARY KEY (target_id, user_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: group_memberships group_memberships_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.group_memberships
|
|
|
|
ADD CONSTRAINT group_memberships_pkey PRIMARY KEY (user_id, group_name);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: groups groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.groups
|
|
|
|
ADD CONSTRAINT groups_pkey PRIMARY KEY (name);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hat_defs hat_defs_name_key; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.hat_defs
|
|
|
|
ADD CONSTRAINT hat_defs_name_key UNIQUE (name);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hat_defs hat_defs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.hat_defs
|
|
|
|
ADD CONSTRAINT hat_defs_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hats hats_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.hats
|
|
|
|
ADD CONSTRAINT hats_pkey PRIMARY KEY (user_id, hat_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: lotteries lotteries_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.lotteries
|
|
|
|
ADD CONSTRAINT lotteries_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: media media_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.media
|
|
|
|
ADD CONSTRAINT media_pkey PRIMARY KEY (kind, filename);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: modactions modactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
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
|
2023-10-07 20:00:13 +00:00
|
|
|
ADD CONSTRAINT mods_pkey PRIMARY KEY (user_id, hole);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: notifications notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.notifications
|
|
|
|
ADD CONSTRAINT notifications_pkey PRIMARY KEY (user_id, comment_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: oauth_apps oauth_apps_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.oauth_apps
|
|
|
|
ADD CONSTRAINT oauth_apps_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users one_banner; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.users
|
|
|
|
ADD CONSTRAINT one_banner UNIQUE (bannerurl);
|
|
|
|
|
|
|
|
|
2023-08-17 00:08:08 +00:00
|
|
|
--
|
|
|
|
-- Name: orgies orgies_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.orgies
|
2023-10-13 16:30:14 +00:00
|
|
|
ADD CONSTRAINT orgies_pkey PRIMARY KEY (created_utc);
|
2023-08-17 00:08:08 +00:00
|
|
|
|
|
|
|
|
2023-06-07 23:51:39 +00:00
|
|
|
--
|
|
|
|
-- Name: post_options post_option_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.post_options
|
|
|
|
ADD CONSTRAINT post_option_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: post_option_votes post_option_vote_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.post_option_votes
|
|
|
|
ADD CONSTRAINT post_option_vote_pkey PRIMARY KEY (option_id, user_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: posts post_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.posts
|
|
|
|
ADD CONSTRAINT post_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: push_subscriptions push_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.push_subscriptions
|
|
|
|
ADD CONSTRAINT push_subscriptions_pkey PRIMARY KEY (user_id, subscription_json);
|
|
|
|
|
|
|
|
|
2023-06-24 08:21:57 +00:00
|
|
|
--
|
|
|
|
-- Name: reports reports_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.reports
|
|
|
|
ADD CONSTRAINT reports_pkey PRIMARY KEY (post_id, user_id);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: save_relationship save_relationship_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.save_relationship
|
2023-06-07 23:36:47 +00:00
|
|
|
ADD CONSTRAINT save_relationship_pkey PRIMARY KEY (user_id, post_id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: hole_blocks sub_blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.hole_blocks
|
|
|
|
ADD CONSTRAINT sub_blocks_pkey PRIMARY KEY (user_id, hole);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: stealth_hole_unblocks sub_joins_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.stealth_hole_unblocks
|
|
|
|
ADD CONSTRAINT sub_joins_pkey PRIMARY KEY (user_id, hole);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: hole_follows sub_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.hole_follows
|
|
|
|
ADD CONSTRAINT sub_subscriptions_pkey PRIMARY KEY (user_id, hole);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: hole_actions subactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.hole_actions
|
2023-03-31 20:00:06 +00:00
|
|
|
ADD CONSTRAINT subactions_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: holes subs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.holes
|
2023-03-31 20:00:06 +00:00
|
|
|
ADD CONSTRAINT subs_pkey PRIMARY KEY (name);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: subscriptions subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.subscriptions
|
2023-06-07 23:36:47 +00:00
|
|
|
ADD CONSTRAINT subscriptions_pkey PRIMARY KEY (post_id, user_id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: transactions transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.transactions
|
|
|
|
ADD CONSTRAINT transactions_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users uid_unique; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.users
|
|
|
|
ADD CONSTRAINT uid_unique UNIQUE (id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: client_auths unique_access; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.client_auths
|
|
|
|
ADD CONSTRAINT unique_access UNIQUE (access_token);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: oauth_apps unique_id; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.oauth_apps
|
|
|
|
ADD CONSTRAINT unique_id UNIQUE (client_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: userblocks userblocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.userblocks
|
|
|
|
ADD CONSTRAINT userblocks_pkey PRIMARY KEY (user_id, target_id);
|
|
|
|
|
|
|
|
|
2023-09-07 08:57:54 +00:00
|
|
|
--
|
|
|
|
-- Name: usermutes usermutes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.usermutes
|
|
|
|
ADD CONSTRAINT usermutes_pkey PRIMARY KEY (user_id, target_id);
|
|
|
|
|
|
|
|
|
2023-11-26 00:00:13 +00:00
|
|
|
--
|
|
|
|
-- Name: users users_extra_username_key; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.users
|
|
|
|
ADD CONSTRAINT users_extra_username_key UNIQUE (extra_username);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: users users_original_username_key; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.users
|
|
|
|
ADD CONSTRAINT users_original_username_key UNIQUE (original_username);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.users
|
2023-07-17 14:46:29 +00:00
|
|
|
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
2023-05-13 16:01:11 +00:00
|
|
|
--
|
|
|
|
-- Name: users users_prelock_username_key; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.users
|
|
|
|
ADD CONSTRAINT users_prelock_username_key UNIQUE (prelock_username);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
2023-07-17 14:46:29 +00:00
|
|
|
-- Name: users users_username_unique; Type: CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.users
|
2023-07-17 14:46:29 +00:00
|
|
|
ADD CONSTRAINT users_username_unique UNIQUE (username);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: viewers viewers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.viewers
|
|
|
|
ADD CONSTRAINT viewers_pkey PRIMARY KEY (user_id, viewer_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: votes votes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.votes
|
2023-06-07 23:36:47 +00:00
|
|
|
ADD CONSTRAINT votes_pkey PRIMARY KEY (post_id, user_id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: alts_unique_combination; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE UNIQUE INDEX alts_unique_combination ON public.alts USING btree (GREATEST(user1, user2), LEAST(user1, user2));
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: alts_user2_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX alts_user2_idx ON public.alts USING btree (user2);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: award_comment_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX award_comment_idx ON public.award_relationships USING btree (comment_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: award_post_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
2023-06-07 23:36:47 +00:00
|
|
|
CREATE INDEX award_post_idx ON public.award_relationships USING btree (post_id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: badges_badge_id_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX badges_badge_id_idx ON public.badges USING btree (badge_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: block_target_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX block_target_idx ON public.userblocks USING btree (target_id);
|
|
|
|
|
|
|
|
|
2023-07-14 10:21:40 +00:00
|
|
|
--
|
|
|
|
-- Name: casino_games_active_user_id_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX casino_games_active_user_id_idx ON public.casino_games USING btree (active, user_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: casino_games_created_utc_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX casino_games_created_utc_idx ON public.casino_games USING btree (created_utc);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: casino_games_user_id_winnings_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX casino_games_user_id_winnings_idx ON public.casino_games USING btree (user_id, winnings);
|
|
|
|
|
|
|
|
|
2023-07-14 12:13:14 +00:00
|
|
|
--
|
|
|
|
-- Name: casino_games_winnings_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX casino_games_winnings_idx ON public.casino_games USING btree (winnings);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: comment_new_sort_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
2023-10-05 17:57:50 +00:00
|
|
|
CREATE INDEX comment_new_sort_idx ON public.comments USING btree (is_banned, deleted_utc, created_utc DESC, nsfw);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_parent_index; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX comment_parent_index ON public.comments USING btree (parent_comment_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_post_id_index; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
2023-06-23 14:26:07 +00:00
|
|
|
CREATE INDEX comment_post_id_index ON public.comments USING btree (parent_post);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
2023-08-15 20:18:01 +00:00
|
|
|
--
|
|
|
|
-- Name: comment_sticked_utc_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX comment_sticked_utc_idx ON public.comments USING btree (stickied_utc);
|
|
|
|
|
|
|
|
|
2023-07-14 10:51:09 +00:00
|
|
|
--
|
|
|
|
-- Name: comments_author_id_created_utc_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX comments_author_id_created_utc_idx ON public.comments USING btree (author_id, created_utc);
|
|
|
|
|
|
|
|
|
2023-07-14 10:21:40 +00:00
|
|
|
--
|
|
|
|
-- Name: comments_author_id_id_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX comments_author_id_id_idx ON public.comments USING btree (author_id, id);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: comments_body_ts_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX comments_body_ts_idx ON public.comments USING gin (body_ts);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comments_created_utc_asc_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX comments_created_utc_asc_idx ON public.comments USING btree (created_utc NULLS FIRST);
|
|
|
|
|
|
|
|
|
2023-07-14 10:51:09 +00:00
|
|
|
--
|
|
|
|
-- Name: comments_deleted_utc_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX comments_deleted_utc_idx ON public.comments USING btree (deleted_utc);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comments_top_comment_id_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX comments_top_comment_id_idx ON public.comments USING btree (top_comment_id);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: commentvotes_commentid_userid_votetype_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX commentvotes_commentid_userid_votetype_idx ON public.commentvotes USING btree (comment_id, user_id, vote_type);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: commentvotes_comments_type_index; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX commentvotes_comments_type_index ON public.commentvotes USING btree (vote_type);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: commentvotes_user_id_vote_type_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX commentvotes_user_id_vote_type_idx ON public.commentvotes USING btree (user_id, vote_type) INCLUDE (comment_id);
|
|
|
|
|
|
|
|
|
2023-06-24 08:21:57 +00:00
|
|
|
--
|
|
|
|
-- Name: creport_user_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX creport_user_idx ON public.commentreports USING btree (user_id);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: emoji_kind; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX emoji_kind ON public.emojis USING btree (kind);
|
|
|
|
|
|
|
|
|
2023-07-03 23:44:22 +00:00
|
|
|
--
|
|
|
|
-- Name: emojis_idx2; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX emojis_idx2 ON public.emojis USING btree (author_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: emojis_idx3; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX emojis_idx3 ON public.emojis USING btree (count DESC);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: emojis_idx4; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX emojis_idx4 ON public.emojis USING btree (submitter_id);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- 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_save_relationship_comment_fkey; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX fki_comment_save_relationship_comment_fkey ON public.comment_save_relationship USING btree (comment_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: fki_comment_sentto_fkey; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX fki_comment_sentto_fkey ON public.comments USING btree (sentto);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: fki_exile_exiler_fkey; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX fki_exile_exiler_fkey ON public.exiles USING btree (exiler_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: fki_exile_sub_fkey; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
CREATE INDEX fki_exile_sub_fkey ON public.exiles USING btree (hole);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: fki_mod_sub_fkey; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
CREATE INDEX fki_mod_sub_fkey ON public.mods USING btree (hole);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: fki_modactions_user_fkey; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX fki_modactions_user_fkey ON public.modactions USING btree (target_user_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: fki_post_approver_fkey; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-23 14:26:07 +00:00
|
|
|
CREATE INDEX fki_post_approver_fkey ON public.posts USING btree (is_approved);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: fki_post_sub_fkey; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
CREATE INDEX fki_post_sub_fkey ON public.posts USING btree (hole);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: fki_save_relationship_post_fkey; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-23 14:26:07 +00:00
|
|
|
CREATE INDEX fki_save_relationship_post_fkey ON public.save_relationship USING btree (post_id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: fki_sub_blocks_sub_fkey; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
CREATE INDEX fki_sub_blocks_sub_fkey ON public.hole_blocks USING btree (hole);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: fki_sub_joins_sub_fkey; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
CREATE INDEX fki_sub_joins_sub_fkey ON public.stealth_hole_unblocks USING btree (hole);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: fki_sub_subscriptions_sub_fkey; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
CREATE INDEX fki_sub_subscriptions_sub_fkey ON public.hole_follows USING btree (hole);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: fki_subactions_user_fkey; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
CREATE INDEX fki_subactions_user_fkey ON public.hole_actions USING btree (target_user_id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: fki_user_chudded_by_fkey; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX fki_user_chudded_by_fkey ON public.users USING btree (chudded_by);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: fki_user_is_banned_fkey; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX fki_user_is_banned_fkey ON public.users USING btree (is_banned);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: fki_user_referrer_fkey; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX fki_user_referrer_fkey ON public.users USING btree (referred_by);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: fki_user_shadowbanned_fkey; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX fki_user_shadowbanned_fkey ON public.users USING btree (shadowbanned);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: fki_view_viewer_fkey; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX fki_view_viewer_fkey ON public.viewers USING btree (viewer_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: fki_wall_user_id_fkey; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX fki_wall_user_id_fkey ON public.comments USING btree (wall_user_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: follow_user_id_index; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX follow_user_id_index ON public.follows USING btree (user_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hat_defs_submitter_id_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX hat_defs_submitter_id_idx ON public.hat_defs USING btree (submitter_id);
|
|
|
|
|
|
|
|
|
2023-11-26 00:00:13 +00:00
|
|
|
--
|
|
|
|
-- Name: lowercase_extra_username; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE UNIQUE INDEX lowercase_extra_username ON public.users USING btree (lower((extra_username)::text));
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: lowercase_original_username; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE UNIQUE INDEX lowercase_original_username ON public.users USING btree (lower((original_username)::text));
|
|
|
|
|
|
|
|
|
2023-05-13 16:01:11 +00:00
|
|
|
--
|
|
|
|
-- Name: lowercase_prelock_username; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE UNIQUE INDEX lowercase_prelock_username ON public.users USING btree (lower((prelock_username)::text));
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: lowercase_username; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE UNIQUE INDEX lowercase_username ON public.users USING btree (lower((username)::text));
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: modaction_action_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX modaction_action_idx ON public.modactions USING btree (kind);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: modaction_cid_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX modaction_cid_idx ON public.modactions USING btree (target_comment_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: modaction_id_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX modaction_id_idx ON public.modactions USING btree (id DESC);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: modaction_pid_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
2023-06-07 23:36:47 +00:00
|
|
|
CREATE INDEX modaction_pid_idx ON public.modactions USING btree (target_post_id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
2023-09-07 08:57:54 +00:00
|
|
|
--
|
|
|
|
-- Name: mute_target_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX mute_target_idx ON public.usermutes USING btree (target_id);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: notifications_comment_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX notifications_comment_idx ON public.notifications USING btree (comment_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: notifs_user_read_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX notifs_user_read_idx ON public.notifications USING btree (user_id, read);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: option_comment; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX option_comment ON public.comment_options USING btree (parent_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: option_post; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-23 14:26:07 +00:00
|
|
|
CREATE INDEX option_post ON public.post_options USING btree (parent_id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: post_app_id_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
2023-06-07 23:36:47 +00:00
|
|
|
CREATE INDEX post_app_id_idx ON public.posts USING btree (app_id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-07 23:51:39 +00:00
|
|
|
-- Name: post_author_id_idx; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-07 23:51:39 +00:00
|
|
|
CREATE INDEX post_author_id_idx ON public.posts USING btree (author_id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-07 23:51:39 +00:00
|
|
|
-- Name: post_created_utc_asc_idx; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-07 23:51:39 +00:00
|
|
|
CREATE INDEX post_created_utc_asc_idx ON public.posts USING btree (created_utc NULLS FIRST);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-07 23:51:39 +00:00
|
|
|
-- Name: post_created_utc_desc_idx; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-07 23:51:39 +00:00
|
|
|
CREATE INDEX post_created_utc_desc_idx ON public.posts USING btree (created_utc DESC);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-07 23:51:39 +00:00
|
|
|
-- Name: post_deleted_utc_idx; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-07 23:51:39 +00:00
|
|
|
CREATE INDEX post_deleted_utc_idx ON public.posts USING btree (deleted_utc);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-07 23:51:39 +00:00
|
|
|
-- Name: post_is_pinned_idx; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-07 23:51:39 +00:00
|
|
|
CREATE INDEX post_is_pinned_idx ON public.posts USING btree (is_pinned);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-07 23:51:39 +00:00
|
|
|
-- Name: post_new_sort_idx; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-05 17:57:50 +00:00
|
|
|
CREATE INDEX post_new_sort_idx ON public.posts USING btree (is_banned, deleted_utc, created_utc DESC, nsfw);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-12-25 04:00:14 +00:00
|
|
|
-- Name: post_nsfw_idx; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-12-25 04:00:14 +00:00
|
|
|
CREATE INDEX post_nsfw_idx ON public.posts USING btree (nsfw);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
2023-08-15 20:18:01 +00:00
|
|
|
--
|
|
|
|
-- Name: post_sticked_utc_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX post_sticked_utc_idx ON public.posts USING btree (stickied_utc);
|
|
|
|
|
|
|
|
|
2023-07-26 01:14:59 +00:00
|
|
|
--
|
|
|
|
-- Name: posts_bump_utc_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX posts_bump_utc_idx ON public.posts USING btree (bump_utc);
|
|
|
|
|
|
|
|
|
2023-07-14 10:51:09 +00:00
|
|
|
--
|
|
|
|
-- Name: posts_stickied_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX posts_stickied_idx ON public.posts USING btree (stickied);
|
|
|
|
|
|
|
|
|
2023-06-24 08:21:57 +00:00
|
|
|
--
|
|
|
|
-- Name: report_user_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX report_user_idx ON public.reports USING btree (user_id);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
2023-06-07 23:51:39 +00:00
|
|
|
-- Name: subimssion_binary_group_idx; Type: INDEX; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-05 17:57:50 +00:00
|
|
|
CREATE INDEX subimssion_binary_group_idx ON public.posts USING btree (is_banned, deleted_utc, nsfw);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: subscription_user_index; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX subscription_user_index ON public.subscriptions USING btree (user_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: transactions_email_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX transactions_email_idx ON public.transactions USING btree (email);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: user_private_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX user_private_idx ON public.users USING btree (is_private);
|
|
|
|
|
|
|
|
|
2023-05-13 04:54:14 +00:00
|
|
|
--
|
2023-06-23 13:54:00 +00:00
|
|
|
-- Name: users_bird_idx; Type: INDEX; Schema: public; Owner: -
|
2023-05-13 04:54:14 +00:00
|
|
|
--
|
|
|
|
|
2023-06-23 13:54:00 +00:00
|
|
|
CREATE INDEX users_bird_idx ON public.users USING btree (bird);
|
2023-05-13 04:54:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 13:54:00 +00:00
|
|
|
-- Name: users_bite_idx; Type: INDEX; Schema: public; Owner: -
|
2023-05-13 04:54:14 +00:00
|
|
|
--
|
|
|
|
|
2023-06-23 13:54:00 +00:00
|
|
|
CREATE INDEX users_bite_idx ON public.users USING btree (bite);
|
2023-05-13 04:54:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 13:54:00 +00:00
|
|
|
-- Name: users_chud_idx; Type: INDEX; Schema: public; Owner: -
|
2023-05-13 04:54:14 +00:00
|
|
|
--
|
|
|
|
|
2023-06-23 13:54:00 +00:00
|
|
|
CREATE INDEX users_chud_idx ON public.users USING btree (chud);
|
2023-05-13 04:54:14 +00:00
|
|
|
|
|
|
|
|
2023-07-14 12:13:14 +00:00
|
|
|
--
|
|
|
|
-- Name: users_coins_spent_on_hats_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_coins_spent_on_hats_idx ON public.users USING btree (coins_spent_on_hats);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: users_created_utc_index; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_created_utc_index ON public.users USING btree (created_utc);
|
|
|
|
|
|
|
|
|
2023-05-13 04:54:14 +00:00
|
|
|
--
|
|
|
|
-- Name: users_deflector_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_deflector_idx ON public.users USING btree (deflector);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users_earlylife_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_earlylife_idx ON public.users USING btree (earlylife);
|
|
|
|
|
|
|
|
|
2023-06-26 17:57:50 +00:00
|
|
|
--
|
|
|
|
-- Name: users_edgified_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_edgified_idx ON public.users USING btree (sharpen);
|
|
|
|
|
|
|
|
|
2023-11-26 00:00:13 +00:00
|
|
|
--
|
|
|
|
-- Name: users_extra_username_trgm_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_extra_username_trgm_idx ON public.users USING gin (extra_username public.gin_trgm_ops);
|
|
|
|
|
|
|
|
|
2023-05-13 04:54:14 +00:00
|
|
|
--
|
|
|
|
-- Name: users_flairchanged_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_flairchanged_idx ON public.users USING btree (flairchanged);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users_longpost_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_longpost_idx ON public.users USING btree (longpost);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-13 20:02:46 +00:00
|
|
|
-- Name: users_marseyawarded_idx; Type: INDEX; Schema: public; Owner: -
|
2023-05-13 04:54:14 +00:00
|
|
|
--
|
|
|
|
|
2023-10-13 20:02:46 +00:00
|
|
|
CREATE INDEX users_marseyawarded_idx ON public.users USING btree (hieroglyphs);
|
2023-05-13 04:54:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users_marsify_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_marsify_idx ON public.users USING btree (marsify);
|
|
|
|
|
|
|
|
|
2023-06-25 17:00:13 +00:00
|
|
|
--
|
|
|
|
-- Name: users_namechanged_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_namechanged_idx ON public.users USING btree (namechanged);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: users_original_username_trgm_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_original_username_trgm_idx ON public.users USING gin (original_username public.gin_trgm_ops);
|
|
|
|
|
|
|
|
|
2023-05-13 04:54:14 +00:00
|
|
|
--
|
|
|
|
-- Name: users_owoify_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_owoify_idx ON public.users USING btree (owoify);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users_patron_utc_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_patron_utc_idx ON public.users USING btree (patron_utc);
|
|
|
|
|
|
|
|
|
2023-05-13 16:01:11 +00:00
|
|
|
--
|
|
|
|
-- Name: users_prelock_username_trgm_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_prelock_username_trgm_idx ON public.users USING gin (prelock_username public.gin_trgm_ops);
|
|
|
|
|
|
|
|
|
2023-05-13 04:54:14 +00:00
|
|
|
--
|
|
|
|
-- Name: users_progressivestack_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_progressivestack_idx ON public.users USING btree (progressivestack);
|
|
|
|
|
|
|
|
|
2023-06-25 17:00:13 +00:00
|
|
|
--
|
|
|
|
-- Name: users_queen_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_queen_idx ON public.users USING btree (queen);
|
|
|
|
|
|
|
|
|
2023-05-13 04:54:14 +00:00
|
|
|
--
|
|
|
|
-- Name: users_rainbow_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_rainbow_idx ON public.users USING btree (rainbow);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users_rehab_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_rehab_idx ON public.users USING btree (rehab);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users_spider_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_spider_idx ON public.users USING btree (spider);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: users_subs_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_subs_idx ON public.users USING btree (stored_subscriber_count);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users_unbanutc_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_unbanutc_idx ON public.users USING btree (unban_utc DESC);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users_username_trgm_idx; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX users_username_trgm_idx ON public.users USING gin (username public.gin_trgm_ops);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: vote_user_index; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX vote_user_index ON public.votes USING btree (user_id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: votes_type_index; Type: INDEX; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE INDEX votes_type_index ON public.votes USING btree (vote_type);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: alts alt_user1_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.alts
|
|
|
|
ADD CONSTRAINT alt_user1_fkey FOREIGN KEY (user1) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: alts alt_user2_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.alts
|
|
|
|
ADD CONSTRAINT alt_user2_fkey FOREIGN KEY (user2) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: oauth_apps app_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.oauth_apps
|
|
|
|
ADD CONSTRAINT app_author_id_fkey FOREIGN KEY (author_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: award_relationships award_comment_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.award_relationships
|
|
|
|
ADD CONSTRAINT award_comment_fkey FOREIGN KEY (comment_id) REFERENCES public.comments(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: award_relationships award_post_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.award_relationships
|
2023-06-23 14:26:07 +00:00
|
|
|
ADD CONSTRAINT award_post_fkey FOREIGN KEY (post_id) REFERENCES public.posts(id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: award_relationships award_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.award_relationships
|
|
|
|
ADD CONSTRAINT award_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: badges badges_badge_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.badges
|
|
|
|
ADD CONSTRAINT badges_badge_id_fkey FOREIGN KEY (badge_id) REFERENCES public.badge_defs(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: badges badges_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.badges
|
|
|
|
ADD CONSTRAINT badges_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: userblocks block_target_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.userblocks
|
|
|
|
ADD CONSTRAINT block_target_fkey FOREIGN KEY (target_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: userblocks block_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.userblocks
|
|
|
|
ADD CONSTRAINT block_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comments casino_game_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comments
|
|
|
|
ADD CONSTRAINT casino_game_fkey FOREIGN KEY (casino_game_id) REFERENCES public.casino_games(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: casino_games casino_games_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.casino_games
|
|
|
|
ADD CONSTRAINT casino_games_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: client_auths client_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
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: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comments
|
|
|
|
ADD CONSTRAINT comment_parent_comment_fkey FOREIGN KEY (parent_comment_id) REFERENCES public.comments(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: comments comment_parent_post_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comments
|
2023-06-23 14:26:07 +00:00
|
|
|
ADD CONSTRAINT comment_parent_post_fkey FOREIGN KEY (parent_post) REFERENCES public.posts(id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_save_relationship comment_save_relationship_comment_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comment_save_relationship
|
|
|
|
ADD CONSTRAINT comment_save_relationship_comment_fkey FOREIGN KEY (comment_id) REFERENCES public.comments(id) MATCH FULL;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_save_relationship comment_save_relationship_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comment_save_relationship
|
|
|
|
ADD CONSTRAINT comment_save_relationship_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) MATCH FULL;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comments comment_sentto_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comments
|
|
|
|
ADD CONSTRAINT comment_sentto_fkey FOREIGN KEY (sentto) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-24 08:21:57 +00:00
|
|
|
-- Name: commentreports commentreports_comment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-24 08:21:57 +00:00
|
|
|
ALTER TABLE ONLY public.commentreports
|
|
|
|
ADD CONSTRAINT commentreports_comment_id_fkey FOREIGN KEY (comment_id) REFERENCES public.comments(id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-24 08:21:57 +00:00
|
|
|
-- Name: commentreports commentreports_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-24 08:21:57 +00:00
|
|
|
ALTER TABLE ONLY public.commentreports
|
|
|
|
ADD CONSTRAINT commentreports_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comments comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
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) MATCH FULL;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: commentvotes commentvote_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.commentvotes
|
|
|
|
ADD CONSTRAINT commentvote_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
2023-07-03 23:44:22 +00:00
|
|
|
--
|
|
|
|
-- Name: emojis emoji_author_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.emojis
|
|
|
|
ADD CONSTRAINT emoji_author_fkey FOREIGN KEY (author_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: emojis emoji_submitter_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.emojis
|
|
|
|
ADD CONSTRAINT emoji_submitter_fkey FOREIGN KEY (submitter_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: exiles exile_exiler_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.exiles
|
|
|
|
ADD CONSTRAINT exile_exiler_fkey FOREIGN KEY (exiler_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: exiles exile_sub_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.exiles
|
2023-10-07 20:00:13 +00:00
|
|
|
ADD CONSTRAINT exile_sub_fkey FOREIGN KEY (hole) REFERENCES public.holes(name);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: exiles exile_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.exiles
|
|
|
|
ADD CONSTRAINT exile_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: lotteries fk_winner; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.lotteries
|
|
|
|
ADD CONSTRAINT fk_winner FOREIGN KEY (winner_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: follows follow_target_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.follows
|
|
|
|
ADD CONSTRAINT follow_target_fkey FOREIGN KEY (target_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: follows follow_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.follows
|
|
|
|
ADD CONSTRAINT follow_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: group_memberships group_memberships_group_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.group_memberships
|
|
|
|
ADD CONSTRAINT group_memberships_group_fkey FOREIGN KEY (group_name) REFERENCES public.groups(name);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: group_memberships group_memberships_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.group_memberships
|
|
|
|
ADD CONSTRAINT group_memberships_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
2024-02-11 12:00:13 +00:00
|
|
|
--
|
|
|
|
-- Name: groups groups_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.groups
|
|
|
|
ADD CONSTRAINT groups_user_fkey FOREIGN KEY (owner_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: hat_defs hat_def_submitter_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.hat_defs
|
|
|
|
ADD CONSTRAINT hat_def_submitter_fkey FOREIGN KEY (submitter_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hat_defs hat_defs_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.hat_defs
|
|
|
|
ADD CONSTRAINT hat_defs_author_id_fkey FOREIGN KEY (author_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hats hats_hat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.hats
|
|
|
|
ADD CONSTRAINT hats_hat_id_fkey FOREIGN KEY (hat_id) REFERENCES public.hat_defs(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: hats hats_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.hats
|
|
|
|
ADD CONSTRAINT hats_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: media media_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.media
|
|
|
|
ADD CONSTRAINT media_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: mods mod_sub_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.mods
|
2023-10-07 20:00:13 +00:00
|
|
|
ADD CONSTRAINT mod_sub_fkey FOREIGN KEY (hole) REFERENCES public.holes(name);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: modactions modactions_comment_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.modactions
|
|
|
|
ADD CONSTRAINT modactions_comment_fkey FOREIGN KEY (target_comment_id) REFERENCES public.comments(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: modactions modactions_post_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.modactions
|
2023-06-23 14:26:07 +00:00
|
|
|
ADD CONSTRAINT modactions_post_fkey FOREIGN KEY (target_post_id) REFERENCES public.posts(id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: modactions modactions_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.modactions
|
|
|
|
ADD CONSTRAINT modactions_user_fkey FOREIGN KEY (target_user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
2023-09-07 08:57:54 +00:00
|
|
|
--
|
|
|
|
-- Name: usermutes mute_target_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.usermutes
|
|
|
|
ADD CONSTRAINT mute_target_fkey FOREIGN KEY (target_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: usermutes mute_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.usermutes
|
|
|
|
ADD CONSTRAINT mute_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: notifications notifications_comment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.notifications
|
|
|
|
ADD CONSTRAINT notifications_comment_id_fkey FOREIGN KEY (comment_id) REFERENCES public.comments(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: notifications notifications_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.notifications
|
|
|
|
ADD CONSTRAINT notifications_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: client_auths oauth_client_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.client_auths
|
|
|
|
ADD CONSTRAINT oauth_client_fkey FOREIGN KEY (oauth_client) REFERENCES public.oauth_apps(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_options option_comment_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comment_options
|
|
|
|
ADD CONSTRAINT option_comment_fkey FOREIGN KEY (parent_id) REFERENCES public.comments(id) MATCH FULL;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: post_options option_post_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-07 23:36:47 +00:00
|
|
|
ALTER TABLE ONLY public.post_options
|
2023-06-23 14:26:07 +00:00
|
|
|
ADD CONSTRAINT option_post_fkey FOREIGN KEY (parent_id) REFERENCES public.posts(id) MATCH FULL;
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
2023-06-07 23:51:39 +00:00
|
|
|
--
|
|
|
|
-- Name: posts post_approver_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.posts
|
|
|
|
ADD CONSTRAINT post_approver_fkey FOREIGN KEY (is_approved) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: posts post_author_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.posts
|
|
|
|
ADD CONSTRAINT post_author_fkey FOREIGN KEY (author_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
-- Name: push_subscriptions push_subscriptions_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.push_subscriptions
|
|
|
|
ADD CONSTRAINT push_subscriptions_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) MATCH FULL;
|
|
|
|
|
|
|
|
|
2023-06-24 08:21:57 +00:00
|
|
|
--
|
|
|
|
-- Name: reports reports_post_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.reports
|
|
|
|
ADD CONSTRAINT reports_post_id_fkey FOREIGN KEY (post_id) REFERENCES public.posts(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: reports reports_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.reports
|
|
|
|
ADD CONSTRAINT reports_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: save_relationship save_relationship_post_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.save_relationship
|
2023-06-23 14:26:07 +00:00
|
|
|
ADD CONSTRAINT save_relationship_post_fkey FOREIGN KEY (post_id) REFERENCES public.posts(id) MATCH FULL;
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: save_relationship save_relationship_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.save_relationship
|
|
|
|
ADD CONSTRAINT save_relationship_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) MATCH FULL;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: hole_blocks sub_blocks_sub_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.hole_blocks
|
|
|
|
ADD CONSTRAINT sub_blocks_sub_fkey FOREIGN KEY (hole) REFERENCES public.holes(name) MATCH FULL;
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: hole_blocks sub_blocks_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.hole_blocks
|
2023-03-31 20:00:06 +00:00
|
|
|
ADD CONSTRAINT sub_blocks_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) MATCH FULL;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-07 23:36:47 +00:00
|
|
|
-- Name: posts sub_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-07 23:36:47 +00:00
|
|
|
ALTER TABLE ONLY public.posts
|
2023-10-07 20:00:13 +00:00
|
|
|
ADD CONSTRAINT sub_fkey FOREIGN KEY (hole) REFERENCES public.holes(name);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: stealth_hole_unblocks sub_joins_sub_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.stealth_hole_unblocks
|
|
|
|
ADD CONSTRAINT sub_joins_sub_fkey FOREIGN KEY (hole) REFERENCES public.holes(name) MATCH FULL;
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: stealth_hole_unblocks sub_joins_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.stealth_hole_unblocks
|
2023-03-31 20:00:06 +00:00
|
|
|
ADD CONSTRAINT sub_joins_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) MATCH FULL;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: hole_follows sub_subscriptions_sub_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.hole_follows
|
|
|
|
ADD CONSTRAINT sub_subscriptions_sub_fkey FOREIGN KEY (hole) REFERENCES public.holes(name) MATCH FULL;
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: hole_follows sub_subscriptions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.hole_follows
|
2023-03-31 20:00:06 +00:00
|
|
|
ADD CONSTRAINT sub_subscriptions_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) MATCH FULL;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: hole_actions subactions_comment_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.hole_actions
|
2023-03-31 20:00:06 +00:00
|
|
|
ADD CONSTRAINT subactions_comment_fkey FOREIGN KEY (target_comment_id) REFERENCES public.comments(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: hole_actions subactions_post_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.hole_actions
|
2023-06-23 14:26:07 +00:00
|
|
|
ADD CONSTRAINT subactions_post_fkey FOREIGN KEY (target_post_id) REFERENCES public.posts(id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: hole_actions subactions_sub_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.hole_actions
|
|
|
|
ADD CONSTRAINT subactions_sub_fkey FOREIGN KEY (hole) REFERENCES public.holes(name);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-10-07 20:00:13 +00:00
|
|
|
-- Name: hole_actions subactions_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-10-07 20:00:13 +00:00
|
|
|
ALTER TABLE ONLY public.hole_actions
|
2023-03-31 20:00:06 +00:00
|
|
|
ADD CONSTRAINT subactions_user_fkey FOREIGN KEY (target_user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: subscriptions subscription_post_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.subscriptions
|
2023-06-23 14:26:07 +00:00
|
|
|
ADD CONSTRAINT subscription_post_fkey FOREIGN KEY (post_id) REFERENCES public.posts(id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: subscriptions subscription_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.subscriptions
|
|
|
|
ADD CONSTRAINT subscription_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users user_blacklisted_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.users
|
|
|
|
ADD CONSTRAINT user_blacklisted_by_fkey FOREIGN KEY (blacklisted_by) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users user_chudded_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.users
|
|
|
|
ADD CONSTRAINT user_chudded_by_fkey FOREIGN KEY (chudded_by) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users user_is_banned_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.users
|
|
|
|
ADD CONSTRAINT user_is_banned_fkey FOREIGN KEY (is_banned) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: mods user_mod_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.mods
|
|
|
|
ADD CONSTRAINT user_mod_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users user_referrer_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.users
|
|
|
|
ADD CONSTRAINT user_referrer_fkey FOREIGN KEY (referred_by) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: users user_shadowbanned_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.users
|
|
|
|
ADD CONSTRAINT user_shadowbanned_fkey FOREIGN KEY (shadowbanned) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: viewers view_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.viewers
|
|
|
|
ADD CONSTRAINT view_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: viewers view_viewer_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.viewers
|
|
|
|
ADD CONSTRAINT view_viewer_fkey FOREIGN KEY (viewer_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_option_votes vote_comment_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comment_option_votes
|
|
|
|
ADD CONSTRAINT vote_comment_fkey FOREIGN KEY (comment_id) REFERENCES public.comments(id) MATCH FULL;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-07 23:36:47 +00:00
|
|
|
-- Name: post_option_votes vote_option_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-07 23:36:47 +00:00
|
|
|
ALTER TABLE ONLY public.post_option_votes
|
|
|
|
ADD CONSTRAINT vote_option_fkey FOREIGN KEY (option_id) REFERENCES public.post_options(id) MATCH FULL;
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_option_votes vote_option_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comment_option_votes
|
|
|
|
ADD CONSTRAINT vote_option_fkey FOREIGN KEY (option_id) REFERENCES public.comment_options(id) MATCH FULL;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: post_option_votes vote_post_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-07 23:36:47 +00:00
|
|
|
ALTER TABLE ONLY public.post_option_votes
|
2023-06-23 14:26:07 +00:00
|
|
|
ADD CONSTRAINT vote_post_fkey FOREIGN KEY (post_id) REFERENCES public.posts(id) MATCH FULL;
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-23 14:26:07 +00:00
|
|
|
-- Name: votes vote_post_key; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.votes
|
2023-06-23 14:26:07 +00:00
|
|
|
ADD CONSTRAINT vote_post_key FOREIGN KEY (post_id) REFERENCES public.posts(id);
|
2023-03-31 20:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: votes vote_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.votes
|
|
|
|
ADD CONSTRAINT vote_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2023-06-07 23:36:47 +00:00
|
|
|
-- Name: post_option_votes vote_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2023-03-31 20:00:06 +00:00
|
|
|
--
|
|
|
|
|
2023-06-07 23:36:47 +00:00
|
|
|
ALTER TABLE ONLY public.post_option_votes
|
2023-03-31 20:00:06 +00:00
|
|
|
ADD CONSTRAINT vote_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) MATCH FULL;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comment_option_votes vote_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comment_option_votes
|
|
|
|
ADD CONSTRAINT vote_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) MATCH FULL;
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Name: comments wall_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
|
|
--
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.comments
|
|
|
|
ADD CONSTRAINT wall_user_id_fkey FOREIGN KEY (wall_user_id) REFERENCES public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- PostgreSQL database dump complete
|
|
|
|
--
|
2024-02-08 04:00:14 +00:00
|
|
|
|