Merge branch 'frost' of https://github.com/Aevann1/Drama into frost

master
Aevann1 2022-02-21 08:15:35 +02:00
commit c9a905fd94
1 changed files with 53 additions and 41 deletions

View File

@ -62,6 +62,59 @@ 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(60),
private boolean DEFAULT false NOT NULL,
views integer DEFAULT 0 NOT NULL,
is_bot boolean DEFAULT false NOT NULL,
bannedfor boolean,
comment_count integer DEFAULT 0 NOT NULL,
club boolean DEFAULT false NOT NULL,
stickied character varying(40),
title character varying(500) NOT NULL,
url character varying(2083),
body character varying(20000),
body_html character varying(40000),
embed_url 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(20)
);
--
-- Name: comment_count_distinct(public.submissions); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.comment_count_distinct(public.submissions) RETURNS bigint
LANGUAGE sql IMMUTABLE STRICT
AS $_$
select count(distinct author_id) from comments where parent_submission=$1.id
$_$;
--
-- Name: alts; Type: TABLE; Schema: public; Owner: -
--
@ -423,47 +476,6 @@ CREATE TABLE public.sub_blocks (
);
--
-- 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(60),
private boolean DEFAULT false NOT NULL,
views integer DEFAULT 0 NOT NULL,
is_bot boolean DEFAULT false NOT NULL,
bannedfor boolean,
comment_count integer DEFAULT 0 NOT NULL,
club boolean DEFAULT false NOT NULL,
stickied character varying(40),
title character varying(500) NOT NULL,
url character varying(2083),
body character varying(20000),
body_html character varying(40000),
embed_url 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(20)
);
--
-- Name: submissions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--