rDrama/schema.sql

2899 lines
70 KiB
MySQL
Raw Normal View History

2023-03-14 06:23:53 +00:00
--
-- PostgreSQL database dump
--
-- Dumped from database version 14.7 (Ubuntu 14.7-1.pgdg22.04+1)
-- Dumped by pg_dump version 14.7 (Ubuntu 14.7-1.pgdg22.04+1)
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: fuzzystrmatch; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch WITH SCHEMA public;
--
-- Name: EXTENSION fuzzystrmatch; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION fuzzystrmatch IS 'determine similarities and distance between strings';
--
-- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS pg_stat_statements WITH SCHEMA public;
--
-- Name: EXTENSION pg_stat_statements; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION pg_stat_statements IS 'track planning and execution statistics of all SQL statements executed';
--
-- Name: pg_trgm; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;
--
-- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams';
--
-- 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;
--
-- Name: submissions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.submissions (
id integer NOT NULL,
author_id integer NOT NULL,
created_utc integer NOT NULL,
is_banned boolean DEFAULT false NOT NULL,
over_18 boolean DEFAULT false NOT NULL,
distinguish_level integer DEFAULT 0 NOT NULL,
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,
bannedfor character varying(50),
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,
sub character varying(25),
new boolean,
hole_pinned character varying(30),
notify boolean NOT NULL,
chuddedfor character varying(50),
posterurl character varying(200)
);
--
-- Name: bump_utc(public.submissions); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.bump_utc(public.submissions) RETURNS integer
LANGUAGE sql IMMUTABLE STRICT
AS $_$
SELECT CREATED_UTC
FROM comments
WHERE parent_submission = $1.id
ORDER BY created_utc desc
LIMIT 1
$_$;
--
-- 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,
submission_id integer,
comment_id integer,
kind character varying(20) NOT NULL,
awarded_utc integer,
created_utc integer,
price_paid integer DEFAULT 0 NOT NULL
);
--
-- 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),
created_utc integer
);
--
-- 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
);
--
-- Name: commentflags; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.commentflags (
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,
parent_submission integer,
is_banned boolean DEFAULT false NOT NULL,
distinguish_level integer DEFAULT 0 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,
over_18 boolean DEFAULT false NOT NULL,
upvotes integer DEFAULT 1 NOT NULL,
downvotes integer DEFAULT 0 NOT NULL,
is_bot boolean DEFAULT false NOT NULL,
app_id integer,
sentto integer,
bannedfor character varying(50),
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),
wordle_result character varying(115),
body_ts tsvector GENERATED ALWAYS AS (to_tsvector('english'::regconfig, (body)::text)) STORED,
casino_game_id integer,
chuddedfor character varying(50),
stickied_child_id integer,
wall_user_id integer
);
--
-- 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,
app_id integer,
"real" boolean DEFAULT true NOT NULL,
created_utc integer NOT NULL,
coins smallint DEFAULT 1 NOT NULL
);
2023-03-18 14:11:12 +00:00
--
-- 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,
created_utc integer,
kind character varying(15) NOT NULL
);
2023-03-14 06:23:53 +00:00
--
-- Name: exiles; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.exiles (
user_id integer NOT NULL,
sub character varying(25) NOT NULL,
exiler_id integer NOT NULL,
created_utc integer
);
--
-- Name: flags; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.flags (
user_id integer NOT NULL,
post_id integer NOT NULL,
reason character varying(350),
created_utc integer NOT NULL
);
--
-- 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,
approved_utc integer
);
--
-- Name: groups; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.groups (
name character varying(25) NOT NULL,
created_utc integer NOT NULL
);
--
-- 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
);
--
-- 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,
target_submission_id integer,
target_comment_id integer,
created_utc integer NOT NULL,
kind character varying(33) DEFAULT NULL::character varying,
2023-03-18 13:35:40 +00:00
_note character varying(2019) DEFAULT NULL::character varying
2023-03-14 06:23:53 +00:00
);
--
-- 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,
sub character varying(25) NOT NULL,
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;
--
-- Name: pgbench_accounts; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.pgbench_accounts (
aid integer NOT NULL,
bid integer,
abalance integer,
filler character(84)
)
WITH (fillfactor='100');
--
-- Name: pgbench_branches; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.pgbench_branches (
bid integer NOT NULL,
bbalance integer,
filler character(88)
)
WITH (fillfactor='100');
--
-- Name: pgbench_history; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.pgbench_history (
tid integer,
bid integer,
aid integer,
delta integer,
mtime timestamp without time zone,
filler character(22)
);
--
-- Name: pgbench_tellers; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.pgbench_tellers (
tid integer NOT NULL,
bid integer,
tbalance integer,
filler character(84)
)
WITH (fillfactor='100');
--
-- Name: push_subscriptions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.push_subscriptions (
user_id integer NOT NULL,
subscription_json character varying(600) NOT NULL,
created_utc integer NOT NULL
);
--
-- Name: save_relationship; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.save_relationship (
submission_id integer NOT NULL,
user_id integer NOT NULL,
created_utc integer
);
--
-- Name: sub_blocks; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.sub_blocks (
user_id integer NOT NULL,
sub character varying(25) NOT NULL,
created_utc integer
);
--
-- Name: sub_joins; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.sub_joins (
user_id integer NOT NULL,
sub character varying(25) NOT NULL,
created_utc integer
);
--
-- Name: sub_subscriptions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.sub_subscriptions (
user_id integer NOT NULL,
sub character varying(25) NOT NULL,
created_utc integer
);
--
-- Name: subactions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.subactions (
id integer NOT NULL,
sub character varying(25) NOT NULL,
user_id integer,
target_user_id integer,
target_submission_id integer,
target_comment_id integer,
created_utc integer NOT NULL,
kind character varying(32) DEFAULT NULL::character varying,
_note character varying(500) DEFAULT NULL::character varying
);
--
-- 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: -
--
ALTER SEQUENCE public.subactions_id_seq OWNED BY public.subactions.id;
--
-- Name: submission_option_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.submission_option_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: submission_option_votes; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.submission_option_votes (
option_id integer NOT NULL,
user_id integer NOT NULL,
created_utc integer NOT NULL,
submission_id integer
);
--
-- Name: submission_options; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.submission_options (
id integer DEFAULT nextval('public.submission_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: submissions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.submissions_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: submissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.submissions_id_seq OWNED BY public.submissions.id;
--
-- Name: subs; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.subs (
name character varying(25) NOT NULL,
sidebar character varying(10000),
sidebar_html character varying(20000),
sidebarurl character varying(60),
bannerurls character varying(60)[] DEFAULT '{}'::character varying[] NOT NULL,
css character varying(6000),
stealth boolean,
marseyurl character varying(60),
created_utc integer
);
--
-- Name: subscriptions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.subscriptions (
user_id integer NOT NULL,
submission_id integer NOT NULL,
created_utc integer
);
--
-- Name: transactions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.transactions (
id character varying(36) NOT NULL,
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
);
--
-- 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,
over_18 boolean DEFAULT false NOT NULL,
is_activated boolean DEFAULT false NOT NULL,
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,
unban_utc integer DEFAULT 0 NOT NULL,
custom_filter_list character varying(1000) DEFAULT ''::character varying,
stored_subscriber_count integer DEFAULT 0 NOT NULL,
original_username character varying(30),
customtitle character varying(1000),
defaultsorting character varying(15) NOT NULL,
defaulttime character varying(5) NOT NULL,
namecolor character varying(6) NOT NULL,
titlecolor character varying(6) NOT NULL,
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,
customtitleplain character varying(100),
themecolor character varying(6) NOT NULL,
css character varying(10000),
profilecss character varying(10000),
coins integer DEFAULT 0 NOT NULL,
agendaposter integer DEFAULT 0 NOT NULL,
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,
2023-03-15 04:01:49 +00:00
background character varying(167),
2023-03-14 06:23:53 +00:00
verified character varying(100),
received_award_count integer DEFAULT 0 NOT NULL,
nitter boolean,
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),
marseyawarded integer,
sig character varying(200),
sig_html character varying(1000),
friends character varying(5000),
friends_html character varying(20000),
sigs_disabled boolean,
enemies character varying(5000),
enemies_html character varying(20000),
fp character varying(21),
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,
reddit character varying(15) NOT NULL,
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,
pronouns character varying(11) NOT NULL,
last_viewed_log_notifs integer NOT NULL,
imginn boolean,
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),
event_music boolean,
chudded_by integer,
event_darkmode boolean,
2023-03-15 13:49:41 +00:00
blacklisted_by integer,
hidevotedon boolean DEFAULT false NOT NULL
2023-03-14 06:23:53 +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,
submission_id integer NOT NULL,
vote_type integer NOT NULL,
app_id integer,
"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);
--
-- 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: -