Skip to content

Instantly share code, notes, and snippets.

@xfalcox
Created November 29, 2021 19:23
Show Gist options
  • Save xfalcox/66b0fa23e936e9f24dda760755f403db to your computer and use it in GitHub Desktop.
Save xfalcox/66b0fa23e936e9f24dda760755f403db to your computer and use it in GitHub Desktop.
Discourse current Schema
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.4
-- Dumped by pg_dump version 13.4
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: discourse_functions; Type: SCHEMA; Schema: -; Owner: falco
--
CREATE SCHEMA discourse_functions;
ALTER SCHEMA discourse_functions OWNER TO falco;
--
-- Name: hstore; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS hstore WITH SCHEMA public;
--
-- Name: EXTENSION hstore; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION hstore IS 'data type for storing sets of (key, value) pairs';
--
-- 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: raise_bookmarks_reminder_type_readonly(); Type: FUNCTION; Schema: discourse_functions; Owner: falco
--
CREATE FUNCTION discourse_functions.raise_bookmarks_reminder_type_readonly() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
RAISE EXCEPTION 'Discourse: reminder_type in bookmarks is readonly';
END
$$;
ALTER FUNCTION discourse_functions.raise_bookmarks_reminder_type_readonly() OWNER TO falco;
--
-- Name: raise_bookmarks_topic_id_readonly(); Type: FUNCTION; Schema: discourse_functions; Owner: falco
--
CREATE FUNCTION discourse_functions.raise_bookmarks_topic_id_readonly() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
RAISE EXCEPTION 'Discourse: topic_id in bookmarks is readonly';
END
$$;
ALTER FUNCTION discourse_functions.raise_bookmarks_topic_id_readonly() OWNER TO falco;
--
-- Name: raise_invites_redeemed_at_readonly(); Type: FUNCTION; Schema: discourse_functions; Owner: falco
--
CREATE FUNCTION discourse_functions.raise_invites_redeemed_at_readonly() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
RAISE EXCEPTION 'Discourse: redeemed_at in invites is readonly';
END
$$;
ALTER FUNCTION discourse_functions.raise_invites_redeemed_at_readonly() OWNER TO falco;
--
-- Name: raise_invites_user_id_readonly(); Type: FUNCTION; Schema: discourse_functions; Owner: falco
--
CREATE FUNCTION discourse_functions.raise_invites_user_id_readonly() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
RAISE EXCEPTION 'Discourse: user_id in invites is readonly';
END
$$;
ALTER FUNCTION discourse_functions.raise_invites_user_id_readonly() OWNER TO falco;
--
-- Name: raise_user_api_keys_scopes_readonly(); Type: FUNCTION; Schema: discourse_functions; Owner: falco
--
CREATE FUNCTION discourse_functions.raise_user_api_keys_scopes_readonly() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
RAISE EXCEPTION 'Discourse: scopes in user_api_keys is readonly';
END
$$;
ALTER FUNCTION discourse_functions.raise_user_api_keys_scopes_readonly() OWNER TO falco;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: allowed_pm_users; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.allowed_pm_users (
id bigint NOT NULL,
user_id integer NOT NULL,
allowed_pm_user_id integer NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
ALTER TABLE public.allowed_pm_users OWNER TO falco;
--
-- Name: allowed_pm_users_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.allowed_pm_users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.allowed_pm_users_id_seq OWNER TO falco;
--
-- Name: allowed_pm_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.allowed_pm_users_id_seq OWNED BY public.allowed_pm_users.id;
--
-- Name: anonymous_users; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.anonymous_users (
id bigint NOT NULL,
user_id integer NOT NULL,
master_user_id integer NOT NULL,
active boolean NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.anonymous_users OWNER TO falco;
--
-- Name: anonymous_users_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.anonymous_users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.anonymous_users_id_seq OWNER TO falco;
--
-- Name: anonymous_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.anonymous_users_id_seq OWNED BY public.anonymous_users.id;
--
-- Name: api_key_scopes; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.api_key_scopes (
id bigint NOT NULL,
api_key_id integer NOT NULL,
resource character varying NOT NULL,
action character varying NOT NULL,
allowed_parameters json,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
ALTER TABLE public.api_key_scopes OWNER TO falco;
--
-- Name: api_key_scopes_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.api_key_scopes_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.api_key_scopes_id_seq OWNER TO falco;
--
-- Name: api_key_scopes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.api_key_scopes_id_seq OWNED BY public.api_key_scopes.id;
--
-- Name: api_keys; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.api_keys (
id integer NOT NULL,
user_id integer,
created_by_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
allowed_ips inet[],
hidden boolean DEFAULT false NOT NULL,
last_used_at timestamp without time zone,
revoked_at timestamp without time zone,
description text,
key_hash character varying NOT NULL,
truncated_key character varying NOT NULL
);
ALTER TABLE public.api_keys OWNER TO falco;
--
-- Name: api_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.api_keys_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.api_keys_id_seq OWNER TO falco;
--
-- Name: api_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.api_keys_id_seq OWNED BY public.api_keys.id;
--
-- Name: application_requests; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.application_requests (
id integer NOT NULL,
date date NOT NULL,
req_type integer NOT NULL,
count integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.application_requests OWNER TO falco;
--
-- Name: application_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.application_requests_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.application_requests_id_seq OWNER TO falco;
--
-- Name: application_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.application_requests_id_seq OWNED BY public.application_requests.id;
--
-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.ar_internal_metadata (
key character varying NOT NULL,
value character varying,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
ALTER TABLE public.ar_internal_metadata OWNER TO falco;
--
-- Name: backup_draft_posts; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.backup_draft_posts (
id bigint NOT NULL,
user_id integer NOT NULL,
post_id integer NOT NULL,
key character varying NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
ALTER TABLE public.backup_draft_posts OWNER TO falco;
--
-- Name: backup_draft_posts_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.backup_draft_posts_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.backup_draft_posts_id_seq OWNER TO falco;
--
-- Name: backup_draft_posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.backup_draft_posts_id_seq OWNED BY public.backup_draft_posts.id;
--
-- Name: backup_draft_topics; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.backup_draft_topics (
id bigint NOT NULL,
user_id integer NOT NULL,
topic_id integer NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
ALTER TABLE public.backup_draft_topics OWNER TO falco;
--
-- Name: backup_draft_topics_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.backup_draft_topics_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.backup_draft_topics_id_seq OWNER TO falco;
--
-- Name: backup_draft_topics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.backup_draft_topics_id_seq OWNED BY public.backup_draft_topics.id;
--
-- Name: backup_metadata; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.backup_metadata (
id bigint NOT NULL,
name character varying NOT NULL,
value character varying
);
ALTER TABLE public.backup_metadata OWNER TO falco;
--
-- Name: backup_metadata_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.backup_metadata_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.backup_metadata_id_seq OWNER TO falco;
--
-- Name: backup_metadata_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.backup_metadata_id_seq OWNED BY public.backup_metadata.id;
--
-- Name: badge_groupings; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.badge_groupings (
id integer NOT NULL,
name character varying NOT NULL,
description text,
"position" integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.badge_groupings OWNER TO falco;
--
-- Name: badge_groupings_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.badge_groupings_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.badge_groupings_id_seq OWNER TO falco;
--
-- Name: badge_groupings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.badge_groupings_id_seq OWNED BY public.badge_groupings.id;
--
-- Name: categories; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.categories (
id integer NOT NULL,
name character varying(50) NOT NULL,
color character varying(6) DEFAULT '0088CC'::character varying NOT NULL,
topic_id integer,
topic_count integer DEFAULT 0 NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
user_id integer NOT NULL,
topics_year integer DEFAULT 0,
topics_month integer DEFAULT 0,
topics_week integer DEFAULT 0,
slug character varying NOT NULL,
description text,
text_color character varying(6) DEFAULT 'FFFFFF'::character varying NOT NULL,
read_restricted boolean DEFAULT false NOT NULL,
auto_close_hours double precision,
post_count integer DEFAULT 0 NOT NULL,
latest_post_id integer,
latest_topic_id integer,
"position" integer,
parent_category_id integer,
posts_year integer DEFAULT 0,
posts_month integer DEFAULT 0,
posts_week integer DEFAULT 0,
email_in character varying,
email_in_allow_strangers boolean DEFAULT false,
topics_day integer DEFAULT 0,
posts_day integer DEFAULT 0,
allow_badges boolean DEFAULT true NOT NULL,
name_lower character varying(50) NOT NULL,
auto_close_based_on_last_post boolean DEFAULT false,
topic_template text,
contains_messages boolean,
sort_order character varying,
sort_ascending boolean,
uploaded_logo_id integer,
uploaded_background_id integer,
topic_featured_link_allowed boolean DEFAULT true,
all_topics_wiki boolean DEFAULT false NOT NULL,
show_subcategory_list boolean DEFAULT false,
num_featured_topics integer DEFAULT 3,
default_view character varying(50),
subcategory_list_style character varying(50) DEFAULT 'rows_with_featured_topics'::character varying,
default_top_period character varying(20) DEFAULT 'all'::character varying,
mailinglist_mirror boolean DEFAULT false NOT NULL,
minimum_required_tags integer DEFAULT 0 NOT NULL,
navigate_to_first_post_after_read boolean DEFAULT false NOT NULL,
search_priority integer DEFAULT 0,
allow_global_tags boolean DEFAULT false NOT NULL,
reviewable_by_group_id integer,
required_tag_group_id integer,
min_tags_from_required_group integer DEFAULT 1 NOT NULL,
read_only_banner character varying,
default_list_filter character varying(20) DEFAULT 'all'::character varying,
allow_unlimited_owner_edits_on_first_post boolean DEFAULT false NOT NULL,
default_slow_mode_seconds integer
);
ALTER TABLE public.categories OWNER TO falco;
--
-- Name: posts; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.posts (
id integer NOT NULL,
user_id integer,
topic_id integer NOT NULL,
post_number integer NOT NULL,
raw text NOT NULL,
cooked text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
reply_to_post_number integer,
reply_count integer DEFAULT 0 NOT NULL,
quote_count integer DEFAULT 0 NOT NULL,
deleted_at timestamp without time zone,
off_topic_count integer DEFAULT 0 NOT NULL,
like_count integer DEFAULT 0 NOT NULL,
incoming_link_count integer DEFAULT 0 NOT NULL,
bookmark_count integer DEFAULT 0 NOT NULL,
score double precision,
reads integer DEFAULT 0 NOT NULL,
post_type integer DEFAULT 1 NOT NULL,
sort_order integer,
last_editor_id integer,
hidden boolean DEFAULT false NOT NULL,
hidden_reason_id integer,
notify_moderators_count integer DEFAULT 0 NOT NULL,
spam_count integer DEFAULT 0 NOT NULL,
illegal_count integer DEFAULT 0 NOT NULL,
inappropriate_count integer DEFAULT 0 NOT NULL,
last_version_at timestamp without time zone NOT NULL,
user_deleted boolean DEFAULT false NOT NULL,
reply_to_user_id integer,
percent_rank double precision DEFAULT 1.0,
notify_user_count integer DEFAULT 0 NOT NULL,
like_score integer DEFAULT 0 NOT NULL,
deleted_by_id integer,
edit_reason character varying,
word_count integer,
version integer DEFAULT 1 NOT NULL,
cook_method integer DEFAULT 1 NOT NULL,
wiki boolean DEFAULT false NOT NULL,
baked_at timestamp without time zone,
baked_version integer,
hidden_at timestamp without time zone,
self_edits integer DEFAULT 0 NOT NULL,
reply_quoted boolean DEFAULT false NOT NULL,
via_email boolean DEFAULT false NOT NULL,
raw_email text,
public_version integer DEFAULT 1 NOT NULL,
action_code character varying,
locked_by_id integer,
image_upload_id bigint
);
ALTER TABLE public.posts OWNER TO falco;
--
-- Name: TABLE posts; Type: COMMENT; Schema: public; Owner: falco
--
COMMENT ON TABLE public.posts IS 'If you want to query public posts only, use the badge_posts view.';
--
-- Name: COLUMN posts.post_number; Type: COMMENT; Schema: public; Owner: falco
--
COMMENT ON COLUMN public.posts.post_number IS 'The position of this post in the topic. The pair (topic_id, post_number) forms a natural key on the posts table.';
--
-- Name: COLUMN posts.raw; Type: COMMENT; Schema: public; Owner: falco
--
COMMENT ON COLUMN public.posts.raw IS 'The raw Markdown that the user entered into the composer.';
--
-- Name: COLUMN posts.cooked; Type: COMMENT; Schema: public; Owner: falco
--
COMMENT ON COLUMN public.posts.cooked IS 'The processed HTML that is presented in a topic.';
--
-- Name: COLUMN posts.reply_to_post_number; Type: COMMENT; Schema: public; Owner: falco
--
COMMENT ON COLUMN public.posts.reply_to_post_number IS 'If this post is a reply to another, this column is the post_number of the post it''s replying to. [FKEY posts.topic_id, posts.post_number]';
--
-- Name: COLUMN posts.reply_quoted; Type: COMMENT; Schema: public; Owner: falco
--
COMMENT ON COLUMN public.posts.reply_quoted IS 'This column is true if the post contains a quote-reply, which causes the in-reply-to indicator to be absent.';
--
-- Name: topics; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topics (
id integer NOT NULL,
title character varying NOT NULL,
last_posted_at timestamp without time zone,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
views integer DEFAULT 0 NOT NULL,
posts_count integer DEFAULT 0 NOT NULL,
user_id integer,
last_post_user_id integer NOT NULL,
reply_count integer DEFAULT 0 NOT NULL,
featured_user1_id integer,
featured_user2_id integer,
featured_user3_id integer,
deleted_at timestamp without time zone,
highest_post_number integer DEFAULT 0 NOT NULL,
like_count integer DEFAULT 0 NOT NULL,
incoming_link_count integer DEFAULT 0 NOT NULL,
category_id integer,
visible boolean DEFAULT true NOT NULL,
moderator_posts_count integer DEFAULT 0 NOT NULL,
closed boolean DEFAULT false NOT NULL,
archived boolean DEFAULT false NOT NULL,
bumped_at timestamp without time zone NOT NULL,
has_summary boolean DEFAULT false NOT NULL,
archetype character varying DEFAULT 'regular'::character varying NOT NULL,
featured_user4_id integer,
notify_moderators_count integer DEFAULT 0 NOT NULL,
spam_count integer DEFAULT 0 NOT NULL,
pinned_at timestamp without time zone,
score double precision,
percent_rank double precision DEFAULT 1.0 NOT NULL,
subtype character varying,
slug character varying,
deleted_by_id integer,
participant_count integer DEFAULT 1,
word_count integer,
excerpt character varying,
pinned_globally boolean DEFAULT false NOT NULL,
pinned_until timestamp without time zone,
fancy_title character varying(400),
highest_staff_post_number integer DEFAULT 0 NOT NULL,
featured_link character varying,
reviewable_score double precision DEFAULT 0.0 NOT NULL,
image_upload_id bigint,
slow_mode_seconds integer DEFAULT 0 NOT NULL,
bannered_until timestamp without time zone,
CONSTRAINT has_category_id CHECK (((category_id IS NOT NULL) OR ((archetype)::text <> 'regular'::text))),
CONSTRAINT pm_has_no_category CHECK (((category_id IS NULL) OR ((archetype)::text <> 'private_message'::text)))
);
ALTER TABLE public.topics OWNER TO falco;
--
-- Name: TABLE topics; Type: COMMENT; Schema: public; Owner: falco
--
COMMENT ON TABLE public.topics IS 'To query public topics only: SELECT ... FROM topics t LEFT INNER JOIN categories c ON (t.category_id = c.id AND c.read_restricted = false)';
--
-- Name: badge_posts; Type: VIEW; Schema: public; Owner: falco
--
CREATE VIEW public.badge_posts AS
SELECT p.id,
p.user_id,
p.topic_id,
p.post_number,
p.raw,
p.cooked,
p.created_at,
p.updated_at,
p.reply_to_post_number,
p.reply_count,
p.quote_count,
p.deleted_at,
p.off_topic_count,
p.like_count,
p.incoming_link_count,
p.bookmark_count,
p.score,
p.reads,
p.post_type,
p.sort_order,
p.last_editor_id,
p.hidden,
p.hidden_reason_id,
p.notify_moderators_count,
p.spam_count,
p.illegal_count,
p.inappropriate_count,
p.last_version_at,
p.user_deleted,
p.reply_to_user_id,
p.percent_rank,
p.notify_user_count,
p.like_score,
p.deleted_by_id,
p.edit_reason,
p.word_count,
p.version,
p.cook_method,
p.wiki,
p.baked_at,
p.baked_version,
p.hidden_at,
p.self_edits,
p.reply_quoted,
p.via_email,
p.raw_email,
p.public_version,
p.action_code,
p.locked_by_id,
p.image_upload_id
FROM ((public.posts p
JOIN public.topics t ON ((t.id = p.topic_id)))
JOIN public.categories c ON ((c.id = t.category_id)))
WHERE (c.allow_badges AND (p.deleted_at IS NULL) AND (t.deleted_at IS NULL) AND (NOT c.read_restricted) AND t.visible AND (p.post_type = ANY (ARRAY[1, 2, 3])));
ALTER TABLE public.badge_posts OWNER TO falco;
--
-- Name: badge_types; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.badge_types (
id integer NOT NULL,
name character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.badge_types OWNER TO falco;
--
-- Name: badge_types_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.badge_types_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.badge_types_id_seq OWNER TO falco;
--
-- Name: badge_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.badge_types_id_seq OWNED BY public.badge_types.id;
--
-- Name: badges; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.badges (
id integer NOT NULL,
name character varying NOT NULL,
description text,
badge_type_id integer NOT NULL,
grant_count integer DEFAULT 0 NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
allow_title boolean DEFAULT false NOT NULL,
multiple_grant boolean DEFAULT false NOT NULL,
icon character varying DEFAULT 'fa-certificate'::character varying,
listable boolean DEFAULT true,
target_posts boolean DEFAULT false,
query text,
enabled boolean DEFAULT true NOT NULL,
auto_revoke boolean DEFAULT true NOT NULL,
badge_grouping_id integer DEFAULT 5 NOT NULL,
trigger integer,
show_posts boolean DEFAULT false NOT NULL,
system boolean DEFAULT false NOT NULL,
image character varying(255),
long_description text,
image_upload_id integer
);
ALTER TABLE public.badges OWNER TO falco;
--
-- Name: badges_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.badges_id_seq
AS integer
START WITH 100
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.badges_id_seq OWNER TO falco;
--
-- Name: badges_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.badges_id_seq OWNED BY public.badges.id;
--
-- Name: bookmarks; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.bookmarks (
id bigint NOT NULL,
user_id bigint NOT NULL,
topic_id bigint,
post_id bigint NOT NULL,
name character varying(100),
reminder_type integer,
reminder_at timestamp without time zone,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
reminder_last_sent_at timestamp without time zone,
reminder_set_at timestamp without time zone,
auto_delete_preference integer DEFAULT 0 NOT NULL,
pinned boolean DEFAULT false,
for_topic boolean DEFAULT false NOT NULL
);
ALTER TABLE public.bookmarks OWNER TO falco;
--
-- Name: bookmarks_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.bookmarks_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.bookmarks_id_seq OWNER TO falco;
--
-- Name: bookmarks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.bookmarks_id_seq OWNED BY public.bookmarks.id;
--
-- Name: calendar_events; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.calendar_events (
id bigint NOT NULL,
topic_id integer NOT NULL,
post_id integer,
post_number integer,
user_id integer,
username character varying,
description character varying,
start_date timestamp without time zone NOT NULL,
end_date timestamp without time zone,
recurrence character varying,
region character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.calendar_events OWNER TO falco;
--
-- Name: calendar_events_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.calendar_events_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.calendar_events_id_seq OWNER TO falco;
--
-- Name: calendar_events_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.calendar_events_id_seq OWNED BY public.calendar_events.id;
--
-- Name: categories_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.categories_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.categories_id_seq OWNER TO falco;
--
-- Name: categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.categories_id_seq OWNED BY public.categories.id;
--
-- Name: categories_web_hooks; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.categories_web_hooks (
web_hook_id integer NOT NULL,
category_id integer NOT NULL
);
ALTER TABLE public.categories_web_hooks OWNER TO falco;
--
-- Name: category_custom_fields; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.category_custom_fields (
id integer NOT NULL,
category_id integer NOT NULL,
name character varying(256) NOT NULL,
value text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.category_custom_fields OWNER TO falco;
--
-- Name: category_custom_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.category_custom_fields_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.category_custom_fields_id_seq OWNER TO falco;
--
-- Name: category_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.category_custom_fields_id_seq OWNED BY public.category_custom_fields.id;
--
-- Name: category_featured_topics; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.category_featured_topics (
category_id integer NOT NULL,
topic_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
rank integer DEFAULT 0 NOT NULL,
id integer NOT NULL
);
ALTER TABLE public.category_featured_topics OWNER TO falco;
--
-- Name: category_featured_topics_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.category_featured_topics_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.category_featured_topics_id_seq OWNER TO falco;
--
-- Name: category_featured_topics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.category_featured_topics_id_seq OWNED BY public.category_featured_topics.id;
--
-- Name: category_groups; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.category_groups (
id integer NOT NULL,
category_id integer NOT NULL,
group_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
permission_type integer DEFAULT 1
);
ALTER TABLE public.category_groups OWNER TO falco;
--
-- Name: category_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.category_groups_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.category_groups_id_seq OWNER TO falco;
--
-- Name: category_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.category_groups_id_seq OWNED BY public.category_groups.id;
--
-- Name: category_search_data; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.category_search_data (
category_id integer NOT NULL,
search_data tsvector,
raw_data text,
locale text,
version integer DEFAULT 0
);
ALTER TABLE public.category_search_data OWNER TO falco;
--
-- Name: category_tag_groups; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.category_tag_groups (
id integer NOT NULL,
category_id integer NOT NULL,
tag_group_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.category_tag_groups OWNER TO falco;
--
-- Name: category_tag_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.category_tag_groups_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.category_tag_groups_id_seq OWNER TO falco;
--
-- Name: category_tag_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.category_tag_groups_id_seq OWNED BY public.category_tag_groups.id;
--
-- Name: category_tag_stats; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.category_tag_stats (
id bigint NOT NULL,
category_id bigint NOT NULL,
tag_id bigint NOT NULL,
topic_count integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.category_tag_stats OWNER TO falco;
--
-- Name: category_tag_stats_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.category_tag_stats_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.category_tag_stats_id_seq OWNER TO falco;
--
-- Name: category_tag_stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.category_tag_stats_id_seq OWNED BY public.category_tag_stats.id;
--
-- Name: category_tags; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.category_tags (
id integer NOT NULL,
category_id integer NOT NULL,
tag_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.category_tags OWNER TO falco;
--
-- Name: category_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.category_tags_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.category_tags_id_seq OWNER TO falco;
--
-- Name: category_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.category_tags_id_seq OWNED BY public.category_tags.id;
--
-- Name: category_users; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.category_users (
id integer NOT NULL,
category_id integer NOT NULL,
user_id integer NOT NULL,
notification_level integer,
last_seen_at timestamp without time zone
);
ALTER TABLE public.category_users OWNER TO falco;
--
-- Name: category_users_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.category_users_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.category_users_id_seq OWNER TO falco;
--
-- Name: category_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.category_users_id_seq OWNED BY public.category_users.id;
--
-- Name: child_themes; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.child_themes (
id integer NOT NULL,
parent_theme_id integer,
child_theme_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.child_themes OWNER TO falco;
--
-- Name: child_themes_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.child_themes_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.child_themes_id_seq OWNER TO falco;
--
-- Name: child_themes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.child_themes_id_seq OWNED BY public.child_themes.id;
--
-- Name: color_scheme_colors; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.color_scheme_colors (
id integer NOT NULL,
name character varying NOT NULL,
hex character varying NOT NULL,
color_scheme_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.color_scheme_colors OWNER TO falco;
--
-- Name: color_scheme_colors_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.color_scheme_colors_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.color_scheme_colors_id_seq OWNER TO falco;
--
-- Name: color_scheme_colors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.color_scheme_colors_id_seq OWNED BY public.color_scheme_colors.id;
--
-- Name: color_schemes; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.color_schemes (
id integer NOT NULL,
name character varying NOT NULL,
version integer DEFAULT 1 NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
via_wizard boolean DEFAULT false NOT NULL,
base_scheme_id character varying,
theme_id integer,
user_selectable boolean DEFAULT false NOT NULL
);
ALTER TABLE public.color_schemes OWNER TO falco;
--
-- Name: color_schemes_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.color_schemes_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.color_schemes_id_seq OWNER TO falco;
--
-- Name: color_schemes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.color_schemes_id_seq OWNED BY public.color_schemes.id;
--
-- Name: custom_emojis; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.custom_emojis (
id integer NOT NULL,
name character varying NOT NULL,
upload_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
"group" character varying(20)
);
ALTER TABLE public.custom_emojis OWNER TO falco;
--
-- Name: custom_emojis_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.custom_emojis_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.custom_emojis_id_seq OWNER TO falco;
--
-- Name: custom_emojis_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.custom_emojis_id_seq OWNED BY public.custom_emojis.id;
--
-- Name: developers; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.developers (
id integer NOT NULL,
user_id integer NOT NULL
);
ALTER TABLE public.developers OWNER TO falco;
--
-- Name: developers_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.developers_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.developers_id_seq OWNER TO falco;
--
-- Name: developers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.developers_id_seq OWNED BY public.developers.id;
--
-- Name: directory_columns; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.directory_columns (
id bigint NOT NULL,
name character varying,
automatic_position integer,
icon character varying,
user_field_id integer,
enabled boolean NOT NULL,
"position" integer NOT NULL,
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
automatic boolean DEFAULT true NOT NULL,
type integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.directory_columns OWNER TO falco;
--
-- Name: directory_columns_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.directory_columns_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.directory_columns_id_seq OWNER TO falco;
--
-- Name: directory_columns_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.directory_columns_id_seq OWNED BY public.directory_columns.id;
--
-- Name: directory_items; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.directory_items (
id integer NOT NULL,
period_type integer NOT NULL,
user_id integer NOT NULL,
likes_received integer NOT NULL,
likes_given integer NOT NULL,
topics_entered integer NOT NULL,
topic_count integer NOT NULL,
post_count integer NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
days_visited integer DEFAULT 0 NOT NULL,
posts_read integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.directory_items OWNER TO falco;
--
-- Name: directory_items_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.directory_items_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.directory_items_id_seq OWNER TO falco;
--
-- Name: directory_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.directory_items_id_seq OWNED BY public.directory_items.id;
--
-- Name: discourse_calendar_post_event_dates; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.discourse_calendar_post_event_dates (
id bigint NOT NULL,
event_id integer,
starts_at timestamp without time zone,
ends_at timestamp without time zone,
reminder_counter integer DEFAULT 0,
event_will_start_sent_at timestamp without time zone,
event_started_sent_at timestamp without time zone,
finished_at timestamp without time zone,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
ALTER TABLE public.discourse_calendar_post_event_dates OWNER TO falco;
--
-- Name: discourse_calendar_post_event_dates_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.discourse_calendar_post_event_dates_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.discourse_calendar_post_event_dates_id_seq OWNER TO falco;
--
-- Name: discourse_calendar_post_event_dates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.discourse_calendar_post_event_dates_id_seq OWNED BY public.discourse_calendar_post_event_dates.id;
--
-- Name: discourse_post_event_events; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.discourse_post_event_events (
id bigint NOT NULL,
status integer DEFAULT 0 NOT NULL,
original_starts_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
original_ends_at timestamp without time zone,
deleted_at timestamp without time zone,
raw_invitees character varying[],
name character varying,
url character varying(1000),
custom_fields jsonb DEFAULT '{}'::jsonb NOT NULL,
reminders character varying,
recurrence character varying
);
ALTER TABLE public.discourse_post_event_events OWNER TO falco;
--
-- Name: discourse_post_event_events_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.discourse_post_event_events_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.discourse_post_event_events_id_seq OWNER TO falco;
--
-- Name: discourse_post_event_events_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.discourse_post_event_events_id_seq OWNED BY public.discourse_post_event_events.id;
--
-- Name: discourse_post_event_invitees; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.discourse_post_event_invitees (
id bigint NOT NULL,
post_id integer NOT NULL,
user_id integer NOT NULL,
status integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
notified boolean DEFAULT false NOT NULL
);
ALTER TABLE public.discourse_post_event_invitees OWNER TO falco;
--
-- Name: discourse_post_event_invitees_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.discourse_post_event_invitees_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.discourse_post_event_invitees_id_seq OWNER TO falco;
--
-- Name: discourse_post_event_invitees_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.discourse_post_event_invitees_id_seq OWNED BY public.discourse_post_event_invitees.id;
--
-- Name: dismissed_topic_users; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.dismissed_topic_users (
id bigint NOT NULL,
user_id integer,
topic_id integer,
created_at timestamp without time zone
);
ALTER TABLE public.dismissed_topic_users OWNER TO falco;
--
-- Name: dismissed_topic_users_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.dismissed_topic_users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.dismissed_topic_users_id_seq OWNER TO falco;
--
-- Name: dismissed_topic_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.dismissed_topic_users_id_seq OWNED BY public.dismissed_topic_users.id;
--
-- Name: do_not_disturb_timings; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.do_not_disturb_timings (
id bigint NOT NULL,
user_id integer NOT NULL,
starts_at timestamp without time zone NOT NULL,
ends_at timestamp without time zone NOT NULL,
scheduled boolean DEFAULT false
);
ALTER TABLE public.do_not_disturb_timings OWNER TO falco;
--
-- Name: do_not_disturb_timings_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.do_not_disturb_timings_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.do_not_disturb_timings_id_seq OWNER TO falco;
--
-- Name: do_not_disturb_timings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.do_not_disturb_timings_id_seq OWNED BY public.do_not_disturb_timings.id;
--
-- Name: draft_sequences; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.draft_sequences (
id integer NOT NULL,
user_id integer NOT NULL,
draft_key character varying NOT NULL,
sequence bigint NOT NULL
);
ALTER TABLE public.draft_sequences OWNER TO falco;
--
-- Name: draft_sequences_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.draft_sequences_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.draft_sequences_id_seq OWNER TO falco;
--
-- Name: draft_sequences_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.draft_sequences_id_seq OWNED BY public.draft_sequences.id;
--
-- Name: drafts; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.drafts (
id integer NOT NULL,
user_id integer NOT NULL,
draft_key character varying NOT NULL,
data text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
sequence bigint DEFAULT 0 NOT NULL,
revisions integer DEFAULT 1 NOT NULL,
owner character varying
);
ALTER TABLE public.drafts OWNER TO falco;
--
-- Name: drafts_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.drafts_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.drafts_id_seq OWNER TO falco;
--
-- Name: drafts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.drafts_id_seq OWNED BY public.drafts.id;
--
-- Name: email_change_requests; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.email_change_requests (
id integer NOT NULL,
user_id integer NOT NULL,
old_email character varying,
new_email character varying NOT NULL,
old_email_token_id integer,
new_email_token_id integer,
change_state integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
requested_by_user_id integer
);
ALTER TABLE public.email_change_requests OWNER TO falco;
--
-- Name: email_change_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.email_change_requests_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.email_change_requests_id_seq OWNER TO falco;
--
-- Name: email_change_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.email_change_requests_id_seq OWNED BY public.email_change_requests.id;
--
-- Name: email_logs; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.email_logs (
id integer NOT NULL,
to_address character varying NOT NULL,
email_type character varying NOT NULL,
user_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
post_id integer,
bounce_key uuid,
bounced boolean DEFAULT false NOT NULL,
message_id character varying,
smtp_group_id integer,
cc_addresses text,
cc_user_ids integer[],
raw text,
topic_id integer
);
ALTER TABLE public.email_logs OWNER TO falco;
--
-- Name: email_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.email_logs_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.email_logs_id_seq OWNER TO falco;
--
-- Name: email_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.email_logs_id_seq OWNED BY public.email_logs.id;
--
-- Name: email_tokens; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.email_tokens (
id integer NOT NULL,
user_id integer NOT NULL,
email character varying NOT NULL,
token character varying NOT NULL,
confirmed boolean DEFAULT false NOT NULL,
expired boolean DEFAULT false NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.email_tokens OWNER TO falco;
--
-- Name: email_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.email_tokens_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.email_tokens_id_seq OWNER TO falco;
--
-- Name: email_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.email_tokens_id_seq OWNED BY public.email_tokens.id;
--
-- Name: embeddable_hosts; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.embeddable_hosts (
id integer NOT NULL,
host character varying NOT NULL,
category_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
class_name character varying,
allowed_paths character varying
);
ALTER TABLE public.embeddable_hosts OWNER TO falco;
--
-- Name: embeddable_hosts_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.embeddable_hosts_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.embeddable_hosts_id_seq OWNER TO falco;
--
-- Name: embeddable_hosts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.embeddable_hosts_id_seq OWNED BY public.embeddable_hosts.id;
--
-- Name: external_upload_stubs; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.external_upload_stubs (
id bigint NOT NULL,
key character varying NOT NULL,
original_filename character varying NOT NULL,
status integer DEFAULT 1 NOT NULL,
unique_identifier uuid NOT NULL,
created_by_id integer NOT NULL,
upload_type character varying NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
multipart boolean DEFAULT false NOT NULL,
external_upload_identifier character varying,
filesize bigint NOT NULL
);
ALTER TABLE public.external_upload_stubs OWNER TO falco;
--
-- Name: external_upload_stubs_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.external_upload_stubs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.external_upload_stubs_id_seq OWNER TO falco;
--
-- Name: external_upload_stubs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.external_upload_stubs_id_seq OWNED BY public.external_upload_stubs.id;
--
-- Name: given_daily_likes; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.given_daily_likes (
user_id integer NOT NULL,
likes_given integer NOT NULL,
given_date date NOT NULL,
limit_reached boolean DEFAULT false NOT NULL
);
ALTER TABLE public.given_daily_likes OWNER TO falco;
--
-- Name: group_archived_messages; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.group_archived_messages (
id integer NOT NULL,
group_id integer NOT NULL,
topic_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.group_archived_messages OWNER TO falco;
--
-- Name: group_archived_messages_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.group_archived_messages_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.group_archived_messages_id_seq OWNER TO falco;
--
-- Name: group_archived_messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.group_archived_messages_id_seq OWNED BY public.group_archived_messages.id;
--
-- Name: group_category_notification_defaults; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.group_category_notification_defaults (
id bigint NOT NULL,
group_id integer NOT NULL,
category_id integer NOT NULL,
notification_level integer NOT NULL
);
ALTER TABLE public.group_category_notification_defaults OWNER TO falco;
--
-- Name: group_category_notification_defaults_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.group_category_notification_defaults_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.group_category_notification_defaults_id_seq OWNER TO falco;
--
-- Name: group_category_notification_defaults_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.group_category_notification_defaults_id_seq OWNED BY public.group_category_notification_defaults.id;
--
-- Name: group_custom_fields; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.group_custom_fields (
id integer NOT NULL,
group_id integer NOT NULL,
name character varying(256) NOT NULL,
value text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.group_custom_fields OWNER TO falco;
--
-- Name: group_custom_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.group_custom_fields_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.group_custom_fields_id_seq OWNER TO falco;
--
-- Name: group_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.group_custom_fields_id_seq OWNED BY public.group_custom_fields.id;
--
-- Name: group_histories; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.group_histories (
id integer NOT NULL,
group_id integer NOT NULL,
acting_user_id integer NOT NULL,
target_user_id integer,
action integer NOT NULL,
subject character varying,
prev_value text,
new_value text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.group_histories OWNER TO falco;
--
-- Name: group_histories_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.group_histories_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.group_histories_id_seq OWNER TO falco;
--
-- Name: group_histories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.group_histories_id_seq OWNED BY public.group_histories.id;
--
-- Name: group_mentions; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.group_mentions (
id integer NOT NULL,
post_id integer,
group_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.group_mentions OWNER TO falco;
--
-- Name: group_mentions_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.group_mentions_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.group_mentions_id_seq OWNER TO falco;
--
-- Name: group_mentions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.group_mentions_id_seq OWNED BY public.group_mentions.id;
--
-- Name: group_requests; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.group_requests (
id bigint NOT NULL,
group_id integer,
user_id integer,
reason text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.group_requests OWNER TO falco;
--
-- Name: group_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.group_requests_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.group_requests_id_seq OWNER TO falco;
--
-- Name: group_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.group_requests_id_seq OWNED BY public.group_requests.id;
--
-- Name: group_tag_notification_defaults; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.group_tag_notification_defaults (
id bigint NOT NULL,
group_id integer NOT NULL,
tag_id integer NOT NULL,
notification_level integer NOT NULL
);
ALTER TABLE public.group_tag_notification_defaults OWNER TO falco;
--
-- Name: group_tag_notification_defaults_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.group_tag_notification_defaults_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.group_tag_notification_defaults_id_seq OWNER TO falco;
--
-- Name: group_tag_notification_defaults_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.group_tag_notification_defaults_id_seq OWNED BY public.group_tag_notification_defaults.id;
--
-- Name: group_users; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.group_users (
id integer NOT NULL,
group_id integer NOT NULL,
user_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
owner boolean DEFAULT false NOT NULL,
notification_level integer DEFAULT 2 NOT NULL,
first_unread_pm_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);
ALTER TABLE public.group_users OWNER TO falco;
--
-- Name: group_users_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.group_users_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.group_users_id_seq OWNER TO falco;
--
-- Name: group_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.group_users_id_seq OWNED BY public.group_users.id;
--
-- Name: groups; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.groups (
id integer NOT NULL,
name character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
automatic boolean DEFAULT false NOT NULL,
user_count integer DEFAULT 0 NOT NULL,
automatic_membership_email_domains text,
primary_group boolean DEFAULT false NOT NULL,
title character varying,
grant_trust_level integer,
incoming_email character varying,
has_messages boolean DEFAULT false NOT NULL,
flair_url character varying,
flair_bg_color character varying,
flair_color character varying,
bio_raw text,
bio_cooked text,
allow_membership_requests boolean DEFAULT false NOT NULL,
full_name character varying,
default_notification_level integer DEFAULT 3 NOT NULL,
visibility_level integer DEFAULT 0 NOT NULL,
public_exit boolean DEFAULT false NOT NULL,
public_admission boolean DEFAULT false NOT NULL,
membership_request_template text,
messageable_level integer DEFAULT 0,
mentionable_level integer DEFAULT 0,
smtp_server character varying,
smtp_port integer,
smtp_ssl boolean,
imap_server character varying,
imap_port integer,
imap_ssl boolean,
imap_mailbox_name character varying DEFAULT ''::character varying NOT NULL,
imap_uid_validity integer DEFAULT 0 NOT NULL,
imap_last_uid integer DEFAULT 0 NOT NULL,
email_username character varying,
email_password character varying,
publish_read_state boolean DEFAULT false NOT NULL,
members_visibility_level integer DEFAULT 0 NOT NULL,
imap_last_error text,
imap_old_emails integer,
imap_new_emails integer,
flair_icon character varying,
flair_upload_id integer,
allow_unknown_sender_topic_replies boolean DEFAULT false NOT NULL,
smtp_enabled boolean DEFAULT false,
smtp_updated_at timestamp without time zone,
smtp_updated_by_id integer,
imap_enabled boolean DEFAULT false,
imap_updated_at timestamp without time zone,
imap_updated_by_id integer
);
ALTER TABLE public.groups OWNER TO falco;
--
-- Name: groups_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.groups_id_seq
AS integer
START WITH 100
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.groups_id_seq OWNER TO falco;
--
-- Name: groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.groups_id_seq OWNED BY public.groups.id;
--
-- Name: groups_web_hooks; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.groups_web_hooks (
web_hook_id integer NOT NULL,
group_id integer NOT NULL
);
ALTER TABLE public.groups_web_hooks OWNER TO falco;
--
-- Name: ignored_users; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.ignored_users (
id bigint NOT NULL,
user_id integer NOT NULL,
ignored_user_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
summarized_at timestamp without time zone,
expiring_at timestamp without time zone NOT NULL
);
ALTER TABLE public.ignored_users OWNER TO falco;
--
-- Name: ignored_users_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.ignored_users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.ignored_users_id_seq OWNER TO falco;
--
-- Name: ignored_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.ignored_users_id_seq OWNED BY public.ignored_users.id;
--
-- Name: imap_sync_logs; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.imap_sync_logs (
id bigint NOT NULL,
level integer NOT NULL,
message character varying NOT NULL,
group_id bigint,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
ALTER TABLE public.imap_sync_logs OWNER TO falco;
--
-- Name: imap_sync_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.imap_sync_logs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.imap_sync_logs_id_seq OWNER TO falco;
--
-- Name: imap_sync_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.imap_sync_logs_id_seq OWNED BY public.imap_sync_logs.id;
--
-- Name: incoming_domains; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.incoming_domains (
id integer NOT NULL,
name character varying(100) NOT NULL,
https boolean DEFAULT false NOT NULL,
port integer NOT NULL
);
ALTER TABLE public.incoming_domains OWNER TO falco;
--
-- Name: incoming_domains_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.incoming_domains_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.incoming_domains_id_seq OWNER TO falco;
--
-- Name: incoming_domains_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.incoming_domains_id_seq OWNED BY public.incoming_domains.id;
--
-- Name: incoming_emails; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.incoming_emails (
id integer NOT NULL,
user_id integer,
topic_id integer,
post_id integer,
raw text,
error text,
message_id text,
from_address text,
to_addresses text,
cc_addresses text,
subject text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
rejection_message text,
is_auto_generated boolean DEFAULT false,
is_bounce boolean DEFAULT false NOT NULL,
imap_uid_validity integer,
imap_uid integer,
imap_sync boolean,
imap_group_id bigint,
imap_missing boolean DEFAULT false NOT NULL,
created_via integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.incoming_emails OWNER TO falco;
--
-- Name: incoming_emails_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.incoming_emails_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.incoming_emails_id_seq OWNER TO falco;
--
-- Name: incoming_emails_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.incoming_emails_id_seq OWNED BY public.incoming_emails.id;
--
-- Name: incoming_links; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.incoming_links (
id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
user_id integer,
ip_address inet,
current_user_id integer,
post_id integer NOT NULL,
incoming_referer_id integer
);
ALTER TABLE public.incoming_links OWNER TO falco;
--
-- Name: incoming_links_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.incoming_links_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.incoming_links_id_seq OWNER TO falco;
--
-- Name: incoming_links_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.incoming_links_id_seq OWNED BY public.incoming_links.id;
--
-- Name: incoming_referers; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.incoming_referers (
id integer NOT NULL,
path character varying(1000) NOT NULL,
incoming_domain_id integer NOT NULL
);
ALTER TABLE public.incoming_referers OWNER TO falco;
--
-- Name: incoming_referers_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.incoming_referers_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.incoming_referers_id_seq OWNER TO falco;
--
-- Name: incoming_referers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.incoming_referers_id_seq OWNED BY public.incoming_referers.id;
--
-- Name: invited_groups; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.invited_groups (
id integer NOT NULL,
group_id integer,
invite_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.invited_groups OWNER TO falco;
--
-- Name: invited_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.invited_groups_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.invited_groups_id_seq OWNER TO falco;
--
-- Name: invited_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.invited_groups_id_seq OWNED BY public.invited_groups.id;
--
-- Name: invited_users; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.invited_users (
id bigint NOT NULL,
user_id integer,
invite_id integer NOT NULL,
redeemed_at timestamp without time zone,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
ALTER TABLE public.invited_users OWNER TO falco;
--
-- Name: invited_users_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.invited_users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.invited_users_id_seq OWNER TO falco;
--
-- Name: invited_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.invited_users_id_seq OWNED BY public.invited_users.id;
--
-- Name: invites; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.invites (
id integer NOT NULL,
invite_key character varying(32) NOT NULL,
email character varying,
invited_by_id integer NOT NULL,
user_id integer,
redeemed_at timestamp without time zone,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
deleted_at timestamp without time zone,
deleted_by_id integer,
invalidated_at timestamp without time zone,
moderator boolean DEFAULT false NOT NULL,
custom_message text,
emailed_status integer,
max_redemptions_allowed integer DEFAULT 1 NOT NULL,
redemption_count integer DEFAULT 0 NOT NULL,
expires_at timestamp without time zone NOT NULL,
email_token character varying
);
ALTER TABLE public.invites OWNER TO falco;
--
-- Name: invites_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.invites_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.invites_id_seq OWNER TO falco;
--
-- Name: invites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.invites_id_seq OWNED BY public.invites.id;
--
-- Name: javascript_caches; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.javascript_caches (
id bigint NOT NULL,
theme_field_id bigint,
digest character varying,
content text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
theme_id bigint,
CONSTRAINT enforce_theme_or_theme_field CHECK ((((theme_id IS NOT NULL) AND (theme_field_id IS NULL)) OR ((theme_id IS NULL) AND (theme_field_id IS NOT NULL))))
);
ALTER TABLE public.javascript_caches OWNER TO falco;
--
-- Name: javascript_caches_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.javascript_caches_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.javascript_caches_id_seq OWNER TO falco;
--
-- Name: javascript_caches_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.javascript_caches_id_seq OWNED BY public.javascript_caches.id;
--
-- Name: linked_topics; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.linked_topics (
id bigint NOT NULL,
topic_id bigint NOT NULL,
original_topic_id bigint NOT NULL,
sequence integer NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
ALTER TABLE public.linked_topics OWNER TO falco;
--
-- Name: linked_topics_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.linked_topics_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.linked_topics_id_seq OWNER TO falco;
--
-- Name: linked_topics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.linked_topics_id_seq OWNED BY public.linked_topics.id;
--
-- Name: message_bus; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.message_bus (
id integer NOT NULL,
name character varying,
context character varying,
data text,
created_at timestamp without time zone NOT NULL
);
ALTER TABLE public.message_bus OWNER TO falco;
--
-- Name: message_bus_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.message_bus_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.message_bus_id_seq OWNER TO falco;
--
-- Name: message_bus_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.message_bus_id_seq OWNED BY public.message_bus.id;
--
-- Name: muted_users; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.muted_users (
id integer NOT NULL,
user_id integer NOT NULL,
muted_user_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.muted_users OWNER TO falco;
--
-- Name: muted_users_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.muted_users_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.muted_users_id_seq OWNER TO falco;
--
-- Name: muted_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.muted_users_id_seq OWNED BY public.muted_users.id;
--
-- Name: notifications; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.notifications (
id integer NOT NULL,
notification_type integer NOT NULL,
user_id integer NOT NULL,
data character varying(1000) NOT NULL,
read boolean DEFAULT false NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
topic_id integer,
post_number integer,
post_action_id integer,
high_priority boolean DEFAULT false NOT NULL
);
ALTER TABLE public.notifications OWNER TO falco;
--
-- Name: notifications_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.notifications_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.notifications_id_seq OWNER TO falco;
--
-- Name: notifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.notifications_id_seq OWNED BY public.notifications.id;
--
-- Name: oauth2_user_infos; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.oauth2_user_infos (
id integer NOT NULL,
user_id integer NOT NULL,
uid character varying NOT NULL,
provider character varying NOT NULL,
email character varying,
name character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.oauth2_user_infos OWNER TO falco;
--
-- Name: oauth2_user_infos_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.oauth2_user_infos_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.oauth2_user_infos_id_seq OWNER TO falco;
--
-- Name: oauth2_user_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.oauth2_user_infos_id_seq OWNED BY public.oauth2_user_infos.id;
--
-- Name: onceoff_logs; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.onceoff_logs (
id integer NOT NULL,
job_name character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.onceoff_logs OWNER TO falco;
--
-- Name: onceoff_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.onceoff_logs_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.onceoff_logs_id_seq OWNER TO falco;
--
-- Name: onceoff_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.onceoff_logs_id_seq OWNED BY public.onceoff_logs.id;
--
-- Name: optimized_images; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.optimized_images (
id integer NOT NULL,
sha1 character varying(40) NOT NULL,
extension character varying(10) NOT NULL,
width integer NOT NULL,
height integer NOT NULL,
upload_id integer NOT NULL,
url character varying NOT NULL,
filesize integer,
etag character varying,
version integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.optimized_images OWNER TO falco;
--
-- Name: optimized_images_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.optimized_images_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.optimized_images_id_seq OWNER TO falco;
--
-- Name: optimized_images_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.optimized_images_id_seq OWNED BY public.optimized_images.id;
--
-- Name: permalinks; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.permalinks (
id integer NOT NULL,
url character varying(1000) NOT NULL,
topic_id integer,
post_id integer,
category_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
external_url character varying(1000),
tag_id integer
);
ALTER TABLE public.permalinks OWNER TO falco;
--
-- Name: permalinks_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.permalinks_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.permalinks_id_seq OWNER TO falco;
--
-- Name: permalinks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.permalinks_id_seq OWNED BY public.permalinks.id;
--
-- Name: plugin_store_rows; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.plugin_store_rows (
id integer NOT NULL,
plugin_name character varying NOT NULL,
key character varying NOT NULL,
type_name character varying NOT NULL,
value text
);
ALTER TABLE public.plugin_store_rows OWNER TO falco;
--
-- Name: plugin_store_rows_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.plugin_store_rows_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.plugin_store_rows_id_seq OWNER TO falco;
--
-- Name: plugin_store_rows_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.plugin_store_rows_id_seq OWNED BY public.plugin_store_rows.id;
--
-- Name: poll_options; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.poll_options (
id bigint NOT NULL,
poll_id bigint,
digest character varying NOT NULL,
html text NOT NULL,
anonymous_votes integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.poll_options OWNER TO falco;
--
-- Name: poll_options_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.poll_options_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.poll_options_id_seq OWNER TO falco;
--
-- Name: poll_options_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.poll_options_id_seq OWNED BY public.poll_options.id;
--
-- Name: poll_votes; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.poll_votes (
poll_id bigint,
poll_option_id bigint,
user_id bigint,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.poll_votes OWNER TO falco;
--
-- Name: polls; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.polls (
id bigint NOT NULL,
post_id bigint,
name character varying DEFAULT 'poll'::character varying NOT NULL,
close_at timestamp without time zone,
type integer DEFAULT 0 NOT NULL,
status integer DEFAULT 0 NOT NULL,
results integer DEFAULT 0 NOT NULL,
visibility integer DEFAULT 0 NOT NULL,
min integer,
max integer,
step integer,
anonymous_voters integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
chart_type integer DEFAULT 0 NOT NULL,
groups character varying,
title character varying
);
ALTER TABLE public.polls OWNER TO falco;
--
-- Name: polls_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.polls_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.polls_id_seq OWNER TO falco;
--
-- Name: polls_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.polls_id_seq OWNED BY public.polls.id;
--
-- Name: post_action_types; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.post_action_types (
name_key character varying(50) NOT NULL,
is_flag boolean DEFAULT false NOT NULL,
icon character varying(20),
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
id integer NOT NULL,
"position" integer DEFAULT 0 NOT NULL,
score_bonus double precision DEFAULT 0.0 NOT NULL,
reviewable_priority integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.post_action_types OWNER TO falco;
--
-- Name: post_action_types_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.post_action_types_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.post_action_types_id_seq OWNER TO falco;
--
-- Name: post_action_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.post_action_types_id_seq OWNED BY public.post_action_types.id;
--
-- Name: post_actions; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.post_actions (
id integer NOT NULL,
post_id integer NOT NULL,
user_id integer NOT NULL,
post_action_type_id integer NOT NULL,
deleted_at timestamp without time zone,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
deleted_by_id integer,
related_post_id integer,
staff_took_action boolean DEFAULT false NOT NULL,
deferred_by_id integer,
targets_topic boolean DEFAULT false NOT NULL,
agreed_at timestamp without time zone,
agreed_by_id integer,
deferred_at timestamp without time zone,
disagreed_at timestamp without time zone,
disagreed_by_id integer
);
ALTER TABLE public.post_actions OWNER TO falco;
--
-- Name: post_actions_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.post_actions_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.post_actions_id_seq OWNER TO falco;
--
-- Name: post_actions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.post_actions_id_seq OWNED BY public.post_actions.id;
--
-- Name: post_custom_fields; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.post_custom_fields (
id integer NOT NULL,
post_id integer NOT NULL,
name character varying(256) NOT NULL,
value text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.post_custom_fields OWNER TO falco;
--
-- Name: post_custom_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.post_custom_fields_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.post_custom_fields_id_seq OWNER TO falco;
--
-- Name: post_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.post_custom_fields_id_seq OWNED BY public.post_custom_fields.id;
--
-- Name: post_details; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.post_details (
id integer NOT NULL,
post_id integer,
key character varying,
value character varying,
extra text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.post_details OWNER TO falco;
--
-- Name: post_details_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.post_details_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.post_details_id_seq OWNER TO falco;
--
-- Name: post_details_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.post_details_id_seq OWNED BY public.post_details.id;
--
-- Name: post_replies; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.post_replies (
post_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
reply_post_id integer
);
ALTER TABLE public.post_replies OWNER TO falco;
--
-- Name: post_reply_keys; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.post_reply_keys (
id bigint NOT NULL,
user_id integer NOT NULL,
post_id integer NOT NULL,
reply_key uuid NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.post_reply_keys OWNER TO falco;
--
-- Name: post_reply_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.post_reply_keys_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.post_reply_keys_id_seq OWNER TO falco;
--
-- Name: post_reply_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.post_reply_keys_id_seq OWNED BY public.post_reply_keys.id;
--
-- Name: post_revisions; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.post_revisions (
id integer NOT NULL,
user_id integer,
post_id integer,
modifications text,
number integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
hidden boolean DEFAULT false NOT NULL
);
ALTER TABLE public.post_revisions OWNER TO falco;
--
-- Name: post_revisions_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.post_revisions_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.post_revisions_id_seq OWNER TO falco;
--
-- Name: post_revisions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.post_revisions_id_seq OWNED BY public.post_revisions.id;
--
-- Name: post_search_data; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.post_search_data (
post_id integer NOT NULL,
search_data tsvector,
raw_data text,
locale character varying,
version integer DEFAULT 0,
private_message boolean NOT NULL
);
ALTER TABLE public.post_search_data OWNER TO falco;
--
-- Name: post_stats; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.post_stats (
id integer NOT NULL,
post_id integer,
drafts_saved integer,
typing_duration_msecs integer,
composer_open_duration_msecs integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.post_stats OWNER TO falco;
--
-- Name: post_stats_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.post_stats_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.post_stats_id_seq OWNER TO falco;
--
-- Name: post_stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.post_stats_id_seq OWNED BY public.post_stats.id;
--
-- Name: post_timings; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.post_timings (
topic_id integer NOT NULL,
post_number integer NOT NULL,
user_id integer NOT NULL,
msecs integer NOT NULL
);
ALTER TABLE public.post_timings OWNER TO falco;
--
-- Name: post_uploads; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.post_uploads (
id integer NOT NULL,
post_id integer NOT NULL,
upload_id integer NOT NULL
);
ALTER TABLE public.post_uploads OWNER TO falco;
--
-- Name: post_uploads_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.post_uploads_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.post_uploads_id_seq OWNER TO falco;
--
-- Name: post_uploads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.post_uploads_id_seq OWNED BY public.post_uploads.id;
--
-- Name: posts_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.posts_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.posts_id_seq OWNER TO falco;
--
-- Name: posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.posts_id_seq OWNED BY public.posts.id;
--
-- Name: published_pages; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.published_pages (
id bigint NOT NULL,
topic_id bigint NOT NULL,
slug character varying NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
public boolean DEFAULT false NOT NULL
);
ALTER TABLE public.published_pages OWNER TO falco;
--
-- Name: published_pages_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.published_pages_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.published_pages_id_seq OWNER TO falco;
--
-- Name: published_pages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.published_pages_id_seq OWNED BY public.published_pages.id;
--
-- Name: push_subscriptions; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.push_subscriptions (
id bigint NOT NULL,
user_id integer NOT NULL,
data character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
error_count integer DEFAULT 0 NOT NULL,
first_error_at timestamp without time zone
);
ALTER TABLE public.push_subscriptions OWNER TO falco;
--
-- Name: push_subscriptions_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.push_subscriptions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.push_subscriptions_id_seq OWNER TO falco;
--
-- Name: push_subscriptions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.push_subscriptions_id_seq OWNED BY public.push_subscriptions.id;
--
-- Name: quoted_posts; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.quoted_posts (
id integer NOT NULL,
post_id integer NOT NULL,
quoted_post_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.quoted_posts OWNER TO falco;
--
-- Name: quoted_posts_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.quoted_posts_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.quoted_posts_id_seq OWNER TO falco;
--
-- Name: quoted_posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.quoted_posts_id_seq OWNED BY public.quoted_posts.id;
--
-- Name: remote_themes; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.remote_themes (
id integer NOT NULL,
remote_url character varying NOT NULL,
remote_version character varying,
local_version character varying,
about_url character varying,
license_url character varying,
commits_behind integer,
remote_updated_at timestamp without time zone,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
private_key text,
branch character varying,
last_error_text text,
authors character varying,
theme_version character varying,
minimum_discourse_version character varying,
maximum_discourse_version character varying
);
ALTER TABLE public.remote_themes OWNER TO falco;
--
-- Name: remote_themes_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.remote_themes_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.remote_themes_id_seq OWNER TO falco;
--
-- Name: remote_themes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.remote_themes_id_seq OWNED BY public.remote_themes.id;
--
-- Name: reviewable_claimed_topics; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.reviewable_claimed_topics (
id bigint NOT NULL,
user_id integer NOT NULL,
topic_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.reviewable_claimed_topics OWNER TO falco;
--
-- Name: reviewable_claimed_topics_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.reviewable_claimed_topics_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.reviewable_claimed_topics_id_seq OWNER TO falco;
--
-- Name: reviewable_claimed_topics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.reviewable_claimed_topics_id_seq OWNED BY public.reviewable_claimed_topics.id;
--
-- Name: reviewable_histories; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.reviewable_histories (
id bigint NOT NULL,
reviewable_id integer NOT NULL,
reviewable_history_type integer NOT NULL,
status integer NOT NULL,
created_by_id integer NOT NULL,
edited json,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.reviewable_histories OWNER TO falco;
--
-- Name: reviewable_histories_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.reviewable_histories_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.reviewable_histories_id_seq OWNER TO falco;
--
-- Name: reviewable_histories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.reviewable_histories_id_seq OWNED BY public.reviewable_histories.id;
--
-- Name: reviewable_scores; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.reviewable_scores (
id bigint NOT NULL,
reviewable_id integer NOT NULL,
user_id integer NOT NULL,
reviewable_score_type integer NOT NULL,
status integer NOT NULL,
score double precision DEFAULT 0.0 NOT NULL,
take_action_bonus double precision DEFAULT 0.0 NOT NULL,
reviewed_by_id integer,
reviewed_at timestamp without time zone,
meta_topic_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
reason character varying,
user_accuracy_bonus double precision DEFAULT 0.0 NOT NULL
);
ALTER TABLE public.reviewable_scores OWNER TO falco;
--
-- Name: reviewable_scores_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.reviewable_scores_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.reviewable_scores_id_seq OWNER TO falco;
--
-- Name: reviewable_scores_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.reviewable_scores_id_seq OWNED BY public.reviewable_scores.id;
--
-- Name: reviewables; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.reviewables (
id bigint NOT NULL,
type character varying NOT NULL,
status integer DEFAULT 0 NOT NULL,
created_by_id integer NOT NULL,
reviewable_by_moderator boolean DEFAULT false NOT NULL,
reviewable_by_group_id integer,
category_id integer,
topic_id integer,
score double precision DEFAULT 0.0 NOT NULL,
potential_spam boolean DEFAULT false NOT NULL,
target_id integer,
target_type character varying,
target_created_by_id integer,
payload json,
version integer DEFAULT 0 NOT NULL,
latest_score timestamp without time zone,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
force_review boolean DEFAULT false NOT NULL,
reject_reason text
);
ALTER TABLE public.reviewables OWNER TO falco;
--
-- Name: reviewables_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.reviewables_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.reviewables_id_seq OWNER TO falco;
--
-- Name: reviewables_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.reviewables_id_seq OWNED BY public.reviewables.id;
--
-- Name: scheduler_stats; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.scheduler_stats (
id integer NOT NULL,
name character varying NOT NULL,
hostname character varying NOT NULL,
pid integer NOT NULL,
duration_ms integer,
live_slots_start integer,
live_slots_finish integer,
started_at timestamp without time zone NOT NULL,
success boolean,
error text
);
ALTER TABLE public.scheduler_stats OWNER TO falco;
--
-- Name: scheduler_stats_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.scheduler_stats_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.scheduler_stats_id_seq OWNER TO falco;
--
-- Name: scheduler_stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.scheduler_stats_id_seq OWNED BY public.scheduler_stats.id;
--
-- Name: schema_migration_details; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.schema_migration_details (
id integer NOT NULL,
version character varying NOT NULL,
name character varying,
hostname character varying,
git_version character varying,
rails_version character varying,
duration integer,
direction character varying,
created_at timestamp without time zone NOT NULL
);
ALTER TABLE public.schema_migration_details OWNER TO falco;
--
-- Name: schema_migration_details_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.schema_migration_details_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.schema_migration_details_id_seq OWNER TO falco;
--
-- Name: schema_migration_details_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.schema_migration_details_id_seq OWNED BY public.schema_migration_details.id;
--
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.schema_migrations (
version character varying NOT NULL
);
ALTER TABLE public.schema_migrations OWNER TO falco;
--
-- Name: screened_emails; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.screened_emails (
id integer NOT NULL,
email character varying NOT NULL,
action_type integer NOT NULL,
match_count integer DEFAULT 0 NOT NULL,
last_match_at timestamp without time zone,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
ip_address inet
);
ALTER TABLE public.screened_emails OWNER TO falco;
--
-- Name: screened_emails_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.screened_emails_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.screened_emails_id_seq OWNER TO falco;
--
-- Name: screened_emails_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.screened_emails_id_seq OWNED BY public.screened_emails.id;
--
-- Name: screened_ip_addresses; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.screened_ip_addresses (
id integer NOT NULL,
ip_address inet NOT NULL,
action_type integer NOT NULL,
match_count integer DEFAULT 0 NOT NULL,
last_match_at timestamp without time zone,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.screened_ip_addresses OWNER TO falco;
--
-- Name: screened_ip_addresses_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.screened_ip_addresses_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.screened_ip_addresses_id_seq OWNER TO falco;
--
-- Name: screened_ip_addresses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.screened_ip_addresses_id_seq OWNED BY public.screened_ip_addresses.id;
--
-- Name: screened_urls; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.screened_urls (
id integer NOT NULL,
url character varying NOT NULL,
domain character varying NOT NULL,
action_type integer NOT NULL,
match_count integer DEFAULT 0 NOT NULL,
last_match_at timestamp without time zone,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
ip_address inet
);
ALTER TABLE public.screened_urls OWNER TO falco;
--
-- Name: screened_urls_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.screened_urls_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.screened_urls_id_seq OWNER TO falco;
--
-- Name: screened_urls_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.screened_urls_id_seq OWNED BY public.screened_urls.id;
--
-- Name: search_logs; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.search_logs (
id integer NOT NULL,
term character varying NOT NULL,
user_id integer,
ip_address inet,
search_result_id integer,
search_type integer NOT NULL,
created_at timestamp without time zone NOT NULL,
search_result_type integer
);
ALTER TABLE public.search_logs OWNER TO falco;
--
-- Name: search_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.search_logs_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.search_logs_id_seq OWNER TO falco;
--
-- Name: search_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.search_logs_id_seq OWNED BY public.search_logs.id;
--
-- Name: shared_drafts; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.shared_drafts (
topic_id integer NOT NULL,
category_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
id bigint NOT NULL
);
ALTER TABLE public.shared_drafts OWNER TO falco;
--
-- Name: shared_drafts_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.shared_drafts_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.shared_drafts_id_seq OWNER TO falco;
--
-- Name: shared_drafts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.shared_drafts_id_seq OWNED BY public.shared_drafts.id;
--
-- Name: shelved_notifications; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.shelved_notifications (
id bigint NOT NULL,
notification_id integer NOT NULL
);
ALTER TABLE public.shelved_notifications OWNER TO falco;
--
-- Name: shelved_notifications_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.shelved_notifications_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.shelved_notifications_id_seq OWNER TO falco;
--
-- Name: shelved_notifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.shelved_notifications_id_seq OWNED BY public.shelved_notifications.id;
--
-- Name: single_sign_on_records; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.single_sign_on_records (
id integer NOT NULL,
user_id integer NOT NULL,
external_id character varying NOT NULL,
last_payload text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
external_username character varying,
external_email character varying,
external_name character varying,
external_avatar_url character varying(1000),
external_profile_background_url character varying,
external_card_background_url character varying
);
ALTER TABLE public.single_sign_on_records OWNER TO falco;
--
-- Name: single_sign_on_records_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.single_sign_on_records_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.single_sign_on_records_id_seq OWNER TO falco;
--
-- Name: single_sign_on_records_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.single_sign_on_records_id_seq OWNED BY public.single_sign_on_records.id;
--
-- Name: site_settings; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.site_settings (
id integer NOT NULL,
name character varying NOT NULL,
data_type integer NOT NULL,
value text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.site_settings OWNER TO falco;
--
-- Name: site_settings_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.site_settings_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.site_settings_id_seq OWNER TO falco;
--
-- Name: site_settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.site_settings_id_seq OWNED BY public.site_settings.id;
--
-- Name: skipped_email_logs; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.skipped_email_logs (
id bigint NOT NULL,
email_type character varying NOT NULL,
to_address character varying NOT NULL,
user_id integer,
post_id integer,
reason_type integer NOT NULL,
custom_reason text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.skipped_email_logs OWNER TO falco;
--
-- Name: skipped_email_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.skipped_email_logs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.skipped_email_logs_id_seq OWNER TO falco;
--
-- Name: skipped_email_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.skipped_email_logs_id_seq OWNED BY public.skipped_email_logs.id;
--
-- Name: stylesheet_cache; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.stylesheet_cache (
id integer NOT NULL,
target character varying NOT NULL,
digest character varying NOT NULL,
content text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
theme_id integer DEFAULT '-1'::integer NOT NULL,
source_map text
);
ALTER TABLE public.stylesheet_cache OWNER TO falco;
--
-- Name: stylesheet_cache_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.stylesheet_cache_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.stylesheet_cache_id_seq OWNER TO falco;
--
-- Name: stylesheet_cache_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.stylesheet_cache_id_seq OWNED BY public.stylesheet_cache.id;
--
-- Name: tag_group_memberships; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.tag_group_memberships (
id integer NOT NULL,
tag_id integer NOT NULL,
tag_group_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.tag_group_memberships OWNER TO falco;
--
-- Name: tag_group_memberships_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.tag_group_memberships_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.tag_group_memberships_id_seq OWNER TO falco;
--
-- Name: tag_group_memberships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.tag_group_memberships_id_seq OWNED BY public.tag_group_memberships.id;
--
-- Name: tag_group_permissions; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.tag_group_permissions (
id bigint NOT NULL,
tag_group_id bigint NOT NULL,
group_id bigint NOT NULL,
permission_type integer DEFAULT 1 NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.tag_group_permissions OWNER TO falco;
--
-- Name: tag_group_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.tag_group_permissions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.tag_group_permissions_id_seq OWNER TO falco;
--
-- Name: tag_group_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.tag_group_permissions_id_seq OWNED BY public.tag_group_permissions.id;
--
-- Name: tag_groups; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.tag_groups (
id integer NOT NULL,
name character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
parent_tag_id integer,
one_per_topic boolean DEFAULT false
);
ALTER TABLE public.tag_groups OWNER TO falco;
--
-- Name: tag_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.tag_groups_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.tag_groups_id_seq OWNER TO falco;
--
-- Name: tag_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.tag_groups_id_seq OWNED BY public.tag_groups.id;
--
-- Name: tag_search_data; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.tag_search_data (
tag_id integer NOT NULL,
search_data tsvector,
raw_data text,
locale text,
version integer DEFAULT 0
);
ALTER TABLE public.tag_search_data OWNER TO falco;
--
-- Name: tag_search_data_tag_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.tag_search_data_tag_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.tag_search_data_tag_id_seq OWNER TO falco;
--
-- Name: tag_search_data_tag_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.tag_search_data_tag_id_seq OWNED BY public.tag_search_data.tag_id;
--
-- Name: tag_users; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.tag_users (
id integer NOT NULL,
tag_id integer NOT NULL,
user_id integer NOT NULL,
notification_level integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.tag_users OWNER TO falco;
--
-- Name: tag_users_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.tag_users_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.tag_users_id_seq OWNER TO falco;
--
-- Name: tag_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.tag_users_id_seq OWNED BY public.tag_users.id;
--
-- Name: tags; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.tags (
id integer NOT NULL,
name character varying NOT NULL,
topic_count integer DEFAULT 0 NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
pm_topic_count integer DEFAULT 0 NOT NULL,
target_tag_id integer
);
ALTER TABLE public.tags OWNER TO falco;
--
-- Name: tags_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.tags_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.tags_id_seq OWNER TO falco;
--
-- Name: tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.tags_id_seq OWNED BY public.tags.id;
--
-- Name: tags_web_hooks; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.tags_web_hooks (
web_hook_id bigint NOT NULL,
tag_id bigint NOT NULL
);
ALTER TABLE public.tags_web_hooks OWNER TO falco;
--
-- Name: theme_fields; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.theme_fields (
id integer NOT NULL,
theme_id integer NOT NULL,
target_id integer NOT NULL,
name character varying(255) NOT NULL,
value text NOT NULL,
value_baked text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
compiler_version character varying(50) DEFAULT 0 NOT NULL,
error character varying,
upload_id integer,
type_id integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.theme_fields OWNER TO falco;
--
-- Name: theme_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.theme_fields_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.theme_fields_id_seq OWNER TO falco;
--
-- Name: theme_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.theme_fields_id_seq OWNED BY public.theme_fields.id;
--
-- Name: theme_modifier_sets; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.theme_modifier_sets (
id bigint NOT NULL,
theme_id bigint NOT NULL,
serialize_topic_excerpts boolean,
csp_extensions character varying[],
svg_icons character varying[],
topic_thumbnail_sizes character varying[]
);
ALTER TABLE public.theme_modifier_sets OWNER TO falco;
--
-- Name: theme_modifier_sets_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.theme_modifier_sets_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.theme_modifier_sets_id_seq OWNER TO falco;
--
-- Name: theme_modifier_sets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.theme_modifier_sets_id_seq OWNED BY public.theme_modifier_sets.id;
--
-- Name: theme_settings; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.theme_settings (
id bigint NOT NULL,
name character varying(255) NOT NULL,
data_type integer NOT NULL,
value text,
theme_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.theme_settings OWNER TO falco;
--
-- Name: theme_settings_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.theme_settings_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.theme_settings_id_seq OWNER TO falco;
--
-- Name: theme_settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.theme_settings_id_seq OWNED BY public.theme_settings.id;
--
-- Name: theme_translation_overrides; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.theme_translation_overrides (
id bigint NOT NULL,
theme_id integer NOT NULL,
locale character varying NOT NULL,
translation_key character varying NOT NULL,
value character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.theme_translation_overrides OWNER TO falco;
--
-- Name: theme_translation_overrides_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.theme_translation_overrides_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.theme_translation_overrides_id_seq OWNER TO falco;
--
-- Name: theme_translation_overrides_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.theme_translation_overrides_id_seq OWNED BY public.theme_translation_overrides.id;
--
-- Name: themes; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.themes (
id integer NOT NULL,
name character varying NOT NULL,
user_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
compiler_version integer DEFAULT 0 NOT NULL,
user_selectable boolean DEFAULT false NOT NULL,
hidden boolean DEFAULT false NOT NULL,
color_scheme_id integer,
remote_theme_id integer,
component boolean DEFAULT false NOT NULL,
enabled boolean DEFAULT true NOT NULL,
auto_update boolean DEFAULT true NOT NULL
);
ALTER TABLE public.themes OWNER TO falco;
--
-- Name: themes_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.themes_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.themes_id_seq OWNER TO falco;
--
-- Name: themes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.themes_id_seq OWNED BY public.themes.id;
--
-- Name: top_topics; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.top_topics (
id integer NOT NULL,
topic_id integer,
yearly_posts_count integer DEFAULT 0 NOT NULL,
yearly_views_count integer DEFAULT 0 NOT NULL,
yearly_likes_count integer DEFAULT 0 NOT NULL,
monthly_posts_count integer DEFAULT 0 NOT NULL,
monthly_views_count integer DEFAULT 0 NOT NULL,
monthly_likes_count integer DEFAULT 0 NOT NULL,
weekly_posts_count integer DEFAULT 0 NOT NULL,
weekly_views_count integer DEFAULT 0 NOT NULL,
weekly_likes_count integer DEFAULT 0 NOT NULL,
daily_posts_count integer DEFAULT 0 NOT NULL,
daily_views_count integer DEFAULT 0 NOT NULL,
daily_likes_count integer DEFAULT 0 NOT NULL,
daily_score double precision DEFAULT 0.0,
weekly_score double precision DEFAULT 0.0,
monthly_score double precision DEFAULT 0.0,
yearly_score double precision DEFAULT 0.0,
all_score double precision DEFAULT 0.0,
daily_op_likes_count integer DEFAULT 0 NOT NULL,
weekly_op_likes_count integer DEFAULT 0 NOT NULL,
monthly_op_likes_count integer DEFAULT 0 NOT NULL,
yearly_op_likes_count integer DEFAULT 0 NOT NULL,
quarterly_posts_count integer DEFAULT 0 NOT NULL,
quarterly_views_count integer DEFAULT 0 NOT NULL,
quarterly_likes_count integer DEFAULT 0 NOT NULL,
quarterly_score double precision DEFAULT 0.0,
quarterly_op_likes_count integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.top_topics OWNER TO falco;
--
-- Name: top_topics_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.top_topics_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.top_topics_id_seq OWNER TO falco;
--
-- Name: top_topics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.top_topics_id_seq OWNED BY public.top_topics.id;
--
-- Name: topic_allowed_groups; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_allowed_groups (
id integer NOT NULL,
group_id integer NOT NULL,
topic_id integer NOT NULL
);
ALTER TABLE public.topic_allowed_groups OWNER TO falco;
--
-- Name: topic_allowed_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topic_allowed_groups_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topic_allowed_groups_id_seq OWNER TO falco;
--
-- Name: topic_allowed_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topic_allowed_groups_id_seq OWNED BY public.topic_allowed_groups.id;
--
-- Name: topic_allowed_users; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_allowed_users (
id integer NOT NULL,
user_id integer NOT NULL,
topic_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.topic_allowed_users OWNER TO falco;
--
-- Name: topic_allowed_users_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topic_allowed_users_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topic_allowed_users_id_seq OWNER TO falco;
--
-- Name: topic_allowed_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topic_allowed_users_id_seq OWNED BY public.topic_allowed_users.id;
--
-- Name: topic_custom_fields; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_custom_fields (
id integer NOT NULL,
topic_id integer NOT NULL,
name character varying(256) NOT NULL,
value text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.topic_custom_fields OWNER TO falco;
--
-- Name: topic_custom_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topic_custom_fields_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topic_custom_fields_id_seq OWNER TO falco;
--
-- Name: topic_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topic_custom_fields_id_seq OWNED BY public.topic_custom_fields.id;
--
-- Name: topic_embeds; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_embeds (
id integer NOT NULL,
topic_id integer NOT NULL,
post_id integer NOT NULL,
embed_url character varying(1000) NOT NULL,
content_sha1 character varying(40),
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
deleted_at timestamp without time zone,
deleted_by_id integer
);
ALTER TABLE public.topic_embeds OWNER TO falco;
--
-- Name: topic_embeds_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topic_embeds_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topic_embeds_id_seq OWNER TO falco;
--
-- Name: topic_embeds_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topic_embeds_id_seq OWNED BY public.topic_embeds.id;
--
-- Name: topic_groups; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_groups (
id bigint NOT NULL,
group_id integer NOT NULL,
topic_id integer NOT NULL,
last_read_post_number integer DEFAULT 0 NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.topic_groups OWNER TO falco;
--
-- Name: topic_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topic_groups_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topic_groups_id_seq OWNER TO falco;
--
-- Name: topic_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topic_groups_id_seq OWNED BY public.topic_groups.id;
--
-- Name: topic_invites; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_invites (
id integer NOT NULL,
topic_id integer NOT NULL,
invite_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.topic_invites OWNER TO falco;
--
-- Name: topic_invites_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topic_invites_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topic_invites_id_seq OWNER TO falco;
--
-- Name: topic_invites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topic_invites_id_seq OWNED BY public.topic_invites.id;
--
-- Name: topic_link_clicks; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_link_clicks (
id integer NOT NULL,
topic_link_id integer NOT NULL,
user_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
ip_address inet
);
ALTER TABLE public.topic_link_clicks OWNER TO falco;
--
-- Name: topic_link_clicks_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topic_link_clicks_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topic_link_clicks_id_seq OWNER TO falco;
--
-- Name: topic_link_clicks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topic_link_clicks_id_seq OWNED BY public.topic_link_clicks.id;
--
-- Name: topic_links; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_links (
id integer NOT NULL,
topic_id integer NOT NULL,
post_id integer,
user_id integer NOT NULL,
url character varying NOT NULL,
domain character varying(100) NOT NULL,
internal boolean DEFAULT false NOT NULL,
link_topic_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
reflection boolean DEFAULT false,
clicks integer DEFAULT 0 NOT NULL,
link_post_id integer,
title character varying,
crawled_at timestamp without time zone,
quote boolean DEFAULT false NOT NULL,
extension character varying(10)
);
ALTER TABLE public.topic_links OWNER TO falco;
--
-- Name: topic_links_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topic_links_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topic_links_id_seq OWNER TO falco;
--
-- Name: topic_links_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topic_links_id_seq OWNED BY public.topic_links.id;
--
-- Name: topic_search_data; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_search_data (
topic_id integer NOT NULL,
raw_data text,
locale character varying NOT NULL,
search_data tsvector,
version integer DEFAULT 0
);
ALTER TABLE public.topic_search_data OWNER TO falco;
--
-- Name: topic_search_data_topic_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topic_search_data_topic_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topic_search_data_topic_id_seq OWNER TO falco;
--
-- Name: topic_search_data_topic_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topic_search_data_topic_id_seq OWNED BY public.topic_search_data.topic_id;
--
-- Name: topic_tags; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_tags (
id integer NOT NULL,
topic_id integer NOT NULL,
tag_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.topic_tags OWNER TO falco;
--
-- Name: topic_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topic_tags_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topic_tags_id_seq OWNER TO falco;
--
-- Name: topic_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topic_tags_id_seq OWNED BY public.topic_tags.id;
--
-- Name: topic_thumbnails; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_thumbnails (
id bigint NOT NULL,
upload_id bigint NOT NULL,
optimized_image_id bigint,
max_width integer NOT NULL,
max_height integer NOT NULL
);
ALTER TABLE public.topic_thumbnails OWNER TO falco;
--
-- Name: topic_thumbnails_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topic_thumbnails_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topic_thumbnails_id_seq OWNER TO falco;
--
-- Name: topic_thumbnails_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topic_thumbnails_id_seq OWNED BY public.topic_thumbnails.id;
--
-- Name: topic_timers; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_timers (
id integer NOT NULL,
execute_at timestamp without time zone NOT NULL,
status_type integer NOT NULL,
user_id integer NOT NULL,
topic_id integer NOT NULL,
based_on_last_post boolean DEFAULT false NOT NULL,
deleted_at timestamp without time zone,
deleted_by_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
category_id integer,
public_type boolean DEFAULT true,
duration_minutes integer
);
ALTER TABLE public.topic_timers OWNER TO falco;
--
-- Name: topic_timers_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topic_timers_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topic_timers_id_seq OWNER TO falco;
--
-- Name: topic_timers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topic_timers_id_seq OWNED BY public.topic_timers.id;
--
-- Name: topic_users; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_users (
user_id integer NOT NULL,
topic_id integer NOT NULL,
posted boolean DEFAULT false NOT NULL,
last_read_post_number integer,
last_visited_at timestamp without time zone,
first_visited_at timestamp without time zone,
notification_level integer DEFAULT 1 NOT NULL,
notifications_changed_at timestamp without time zone,
notifications_reason_id integer,
total_msecs_viewed integer DEFAULT 0 NOT NULL,
cleared_pinned_at timestamp without time zone,
id integer NOT NULL,
last_emailed_post_number integer,
liked boolean DEFAULT false,
bookmarked boolean DEFAULT false,
last_posted_at timestamp without time zone
);
ALTER TABLE public.topic_users OWNER TO falco;
--
-- Name: topic_users_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topic_users_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topic_users_id_seq OWNER TO falco;
--
-- Name: topic_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topic_users_id_seq OWNED BY public.topic_users.id;
--
-- Name: topic_views; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.topic_views (
topic_id integer NOT NULL,
viewed_at date NOT NULL,
user_id integer,
ip_address inet
);
ALTER TABLE public.topic_views OWNER TO falco;
--
-- Name: topics_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.topics_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.topics_id_seq OWNER TO falco;
--
-- Name: topics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.topics_id_seq OWNED BY public.topics.id;
--
-- Name: translation_overrides; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.translation_overrides (
id integer NOT NULL,
locale character varying NOT NULL,
translation_key character varying NOT NULL,
value character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
compiled_js text
);
ALTER TABLE public.translation_overrides OWNER TO falco;
--
-- Name: translation_overrides_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.translation_overrides_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.translation_overrides_id_seq OWNER TO falco;
--
-- Name: translation_overrides_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.translation_overrides_id_seq OWNED BY public.translation_overrides.id;
--
-- Name: unsubscribe_keys; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.unsubscribe_keys (
key character varying(64) NOT NULL,
user_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
unsubscribe_key_type character varying,
topic_id integer,
post_id integer
);
ALTER TABLE public.unsubscribe_keys OWNER TO falco;
--
-- Name: uploads; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.uploads (
id integer NOT NULL,
user_id integer NOT NULL,
original_filename character varying NOT NULL,
filesize bigint NOT NULL,
width integer,
height integer,
url character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
sha1 character varying(40),
origin character varying(1000),
retain_hours integer,
extension character varying(10),
thumbnail_width integer,
thumbnail_height integer,
etag character varying,
secure boolean DEFAULT false NOT NULL,
access_control_post_id bigint,
original_sha1 character varying,
animated boolean,
verification_status integer DEFAULT 1 NOT NULL,
security_last_changed_at timestamp without time zone,
security_last_changed_reason character varying
);
ALTER TABLE public.uploads OWNER TO falco;
--
-- Name: uploads_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.uploads_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.uploads_id_seq OWNER TO falco;
--
-- Name: uploads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.uploads_id_seq OWNED BY public.uploads.id;
--
-- Name: user_actions; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_actions (
id integer NOT NULL,
action_type integer NOT NULL,
user_id integer NOT NULL,
target_topic_id integer,
target_post_id integer,
target_user_id integer,
acting_user_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.user_actions OWNER TO falco;
--
-- Name: user_actions_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_actions_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_actions_id_seq OWNER TO falco;
--
-- Name: user_actions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_actions_id_seq OWNED BY public.user_actions.id;
--
-- Name: user_api_key_scopes; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_api_key_scopes (
id bigint NOT NULL,
user_api_key_id integer NOT NULL,
name character varying NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
allowed_parameters jsonb
);
ALTER TABLE public.user_api_key_scopes OWNER TO falco;
--
-- Name: user_api_key_scopes_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_api_key_scopes_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_api_key_scopes_id_seq OWNER TO falco;
--
-- Name: user_api_key_scopes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_api_key_scopes_id_seq OWNED BY public.user_api_key_scopes.id;
--
-- Name: user_api_keys; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_api_keys (
id integer NOT NULL,
user_id integer NOT NULL,
client_id character varying NOT NULL,
application_name character varying NOT NULL,
push_url character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
revoked_at timestamp without time zone,
scopes text[],
last_used_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
key_hash character varying NOT NULL
);
ALTER TABLE public.user_api_keys OWNER TO falco;
--
-- Name: user_api_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_api_keys_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_api_keys_id_seq OWNER TO falco;
--
-- Name: user_api_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_api_keys_id_seq OWNED BY public.user_api_keys.id;
--
-- Name: user_archived_messages; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_archived_messages (
id integer NOT NULL,
user_id integer NOT NULL,
topic_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.user_archived_messages OWNER TO falco;
--
-- Name: user_archived_messages_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_archived_messages_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_archived_messages_id_seq OWNER TO falco;
--
-- Name: user_archived_messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_archived_messages_id_seq OWNED BY public.user_archived_messages.id;
--
-- Name: user_associated_accounts; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_associated_accounts (
id bigint NOT NULL,
provider_name character varying NOT NULL,
provider_uid character varying NOT NULL,
user_id integer,
last_used timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
info jsonb DEFAULT '{}'::jsonb NOT NULL,
credentials jsonb DEFAULT '{}'::jsonb NOT NULL,
extra jsonb DEFAULT '{}'::jsonb NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.user_associated_accounts OWNER TO falco;
--
-- Name: user_associated_accounts_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_associated_accounts_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_associated_accounts_id_seq OWNER TO falco;
--
-- Name: user_associated_accounts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_associated_accounts_id_seq OWNED BY public.user_associated_accounts.id;
--
-- Name: user_auth_token_logs; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_auth_token_logs (
id integer NOT NULL,
action character varying NOT NULL,
user_auth_token_id integer,
user_id integer,
client_ip inet,
user_agent character varying,
auth_token character varying,
created_at timestamp without time zone,
path character varying
);
ALTER TABLE public.user_auth_token_logs OWNER TO falco;
--
-- Name: user_auth_token_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_auth_token_logs_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_auth_token_logs_id_seq OWNER TO falco;
--
-- Name: user_auth_token_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_auth_token_logs_id_seq OWNED BY public.user_auth_token_logs.id;
--
-- Name: user_auth_tokens; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_auth_tokens (
id integer NOT NULL,
user_id integer NOT NULL,
auth_token character varying NOT NULL,
prev_auth_token character varying NOT NULL,
user_agent character varying,
auth_token_seen boolean DEFAULT false NOT NULL,
client_ip inet,
rotated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
seen_at timestamp without time zone
);
ALTER TABLE public.user_auth_tokens OWNER TO falco;
--
-- Name: user_auth_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_auth_tokens_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_auth_tokens_id_seq OWNER TO falco;
--
-- Name: user_auth_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_auth_tokens_id_seq OWNED BY public.user_auth_tokens.id;
--
-- Name: user_avatars; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_avatars (
id integer NOT NULL,
user_id integer NOT NULL,
custom_upload_id integer,
gravatar_upload_id integer,
last_gravatar_download_attempt timestamp without time zone,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.user_avatars OWNER TO falco;
--
-- Name: user_avatars_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_avatars_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_avatars_id_seq OWNER TO falco;
--
-- Name: user_avatars_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_avatars_id_seq OWNED BY public.user_avatars.id;
--
-- Name: user_badges; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_badges (
id integer NOT NULL,
badge_id integer NOT NULL,
user_id integer NOT NULL,
granted_at timestamp without time zone NOT NULL,
granted_by_id integer NOT NULL,
post_id integer,
notification_id integer,
seq integer DEFAULT 0 NOT NULL,
featured_rank integer,
created_at timestamp without time zone NOT NULL,
is_favorite boolean
);
ALTER TABLE public.user_badges OWNER TO falco;
--
-- Name: user_badges_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_badges_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_badges_id_seq OWNER TO falco;
--
-- Name: user_badges_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_badges_id_seq OWNED BY public.user_badges.id;
--
-- Name: user_custom_fields; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_custom_fields (
id integer NOT NULL,
user_id integer NOT NULL,
name character varying(256) NOT NULL,
value text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.user_custom_fields OWNER TO falco;
--
-- Name: user_custom_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_custom_fields_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_custom_fields_id_seq OWNER TO falco;
--
-- Name: user_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_custom_fields_id_seq OWNED BY public.user_custom_fields.id;
--
-- Name: user_emails; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_emails (
id integer NOT NULL,
user_id integer NOT NULL,
email character varying(513) NOT NULL,
"primary" boolean DEFAULT false NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.user_emails OWNER TO falco;
--
-- Name: user_emails_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_emails_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_emails_id_seq OWNER TO falco;
--
-- Name: user_emails_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_emails_id_seq OWNED BY public.user_emails.id;
--
-- Name: user_exports; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_exports (
id integer NOT NULL,
file_name character varying NOT NULL,
user_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
upload_id integer,
topic_id integer
);
ALTER TABLE public.user_exports OWNER TO falco;
--
-- Name: user_exports_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_exports_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_exports_id_seq OWNER TO falco;
--
-- Name: user_exports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_exports_id_seq OWNED BY public.user_exports.id;
--
-- Name: user_field_options; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_field_options (
id integer NOT NULL,
user_field_id integer NOT NULL,
value character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.user_field_options OWNER TO falco;
--
-- Name: user_field_options_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_field_options_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_field_options_id_seq OWNER TO falco;
--
-- Name: user_field_options_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_field_options_id_seq OWNED BY public.user_field_options.id;
--
-- Name: user_fields; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_fields (
id integer NOT NULL,
name character varying NOT NULL,
field_type character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
editable boolean DEFAULT false NOT NULL,
description character varying NOT NULL,
required boolean DEFAULT true NOT NULL,
show_on_profile boolean DEFAULT false NOT NULL,
"position" integer DEFAULT 0,
show_on_user_card boolean DEFAULT false NOT NULL,
external_name character varying,
external_type character varying,
searchable boolean DEFAULT false NOT NULL
);
ALTER TABLE public.user_fields OWNER TO falco;
--
-- Name: user_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_fields_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_fields_id_seq OWNER TO falco;
--
-- Name: user_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_fields_id_seq OWNED BY public.user_fields.id;
--
-- Name: user_histories; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_histories (
id integer NOT NULL,
action integer NOT NULL,
acting_user_id integer,
target_user_id integer,
details text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
context character varying,
ip_address character varying,
email character varying,
subject text,
previous_value text,
new_value text,
topic_id integer,
admin_only boolean DEFAULT false,
post_id integer,
custom_type character varying,
category_id integer
);
ALTER TABLE public.user_histories OWNER TO falco;
--
-- Name: user_histories_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_histories_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_histories_id_seq OWNER TO falco;
--
-- Name: user_histories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_histories_id_seq OWNED BY public.user_histories.id;
--
-- Name: user_ip_address_histories; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_ip_address_histories (
id bigint NOT NULL,
user_id integer NOT NULL,
ip_address inet NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
ALTER TABLE public.user_ip_address_histories OWNER TO falco;
--
-- Name: user_ip_address_histories_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_ip_address_histories_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_ip_address_histories_id_seq OWNER TO falco;
--
-- Name: user_ip_address_histories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_ip_address_histories_id_seq OWNED BY public.user_ip_address_histories.id;
--
-- Name: user_notification_schedules; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_notification_schedules (
id bigint NOT NULL,
user_id integer NOT NULL,
enabled boolean DEFAULT false NOT NULL,
day_0_start_time integer NOT NULL,
day_0_end_time integer NOT NULL,
day_1_start_time integer NOT NULL,
day_1_end_time integer NOT NULL,
day_2_start_time integer NOT NULL,
day_2_end_time integer NOT NULL,
day_3_start_time integer NOT NULL,
day_3_end_time integer NOT NULL,
day_4_start_time integer NOT NULL,
day_4_end_time integer NOT NULL,
day_5_start_time integer NOT NULL,
day_5_end_time integer NOT NULL,
day_6_start_time integer NOT NULL,
day_6_end_time integer NOT NULL
);
ALTER TABLE public.user_notification_schedules OWNER TO falco;
--
-- Name: user_notification_schedules_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_notification_schedules_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_notification_schedules_id_seq OWNER TO falco;
--
-- Name: user_notification_schedules_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_notification_schedules_id_seq OWNED BY public.user_notification_schedules.id;
--
-- Name: user_open_ids; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_open_ids (
id integer NOT NULL,
user_id integer NOT NULL,
email character varying NOT NULL,
url character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
active boolean NOT NULL
);
ALTER TABLE public.user_open_ids OWNER TO falco;
--
-- Name: user_open_ids_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_open_ids_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_open_ids_id_seq OWNER TO falco;
--
-- Name: user_open_ids_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_open_ids_id_seq OWNED BY public.user_open_ids.id;
--
-- Name: user_options; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_options (
user_id integer NOT NULL,
mailing_list_mode boolean DEFAULT false NOT NULL,
email_digests boolean,
external_links_in_new_tab boolean DEFAULT false NOT NULL,
enable_quoting boolean DEFAULT true NOT NULL,
dynamic_favicon boolean DEFAULT false NOT NULL,
automatically_unpin_topics boolean DEFAULT true NOT NULL,
digest_after_minutes integer,
auto_track_topics_after_msecs integer,
new_topic_duration_minutes integer,
last_redirected_to_top_at timestamp without time zone,
email_previous_replies integer DEFAULT 2 NOT NULL,
email_in_reply_to boolean DEFAULT true NOT NULL,
like_notification_frequency integer DEFAULT 1 NOT NULL,
mailing_list_mode_frequency integer DEFAULT 1 NOT NULL,
include_tl0_in_digests boolean DEFAULT false,
notification_level_when_replying integer,
theme_key_seq integer DEFAULT 0 NOT NULL,
allow_private_messages boolean DEFAULT true NOT NULL,
homepage_id integer,
theme_ids integer[] DEFAULT '{}'::integer[] NOT NULL,
hide_profile_and_presence boolean DEFAULT false NOT NULL,
text_size_key integer DEFAULT 0 NOT NULL,
text_size_seq integer DEFAULT 0 NOT NULL,
email_level integer DEFAULT 1 NOT NULL,
email_messages_level integer DEFAULT 0 NOT NULL,
title_count_mode_key integer DEFAULT 0 NOT NULL,
enable_defer boolean DEFAULT false NOT NULL,
timezone character varying,
enable_allowed_pm_users boolean DEFAULT false NOT NULL,
dark_scheme_id integer,
skip_new_user_tips boolean DEFAULT false NOT NULL,
color_scheme_id integer,
default_calendar integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.user_options OWNER TO falco;
--
-- Name: user_profile_views; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_profile_views (
id integer NOT NULL,
user_profile_id integer NOT NULL,
viewed_at timestamp without time zone NOT NULL,
ip_address inet,
user_id integer
);
ALTER TABLE public.user_profile_views OWNER TO falco;
--
-- Name: user_profile_views_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_profile_views_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_profile_views_id_seq OWNER TO falco;
--
-- Name: user_profile_views_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_profile_views_id_seq OWNED BY public.user_profile_views.id;
--
-- Name: user_profiles; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_profiles (
user_id integer NOT NULL,
location character varying,
website character varying,
bio_raw text,
bio_cooked text,
dismissed_banner_key integer,
bio_cooked_version integer,
badge_granted_title boolean DEFAULT false,
views integer DEFAULT 0 NOT NULL,
profile_background_upload_id integer,
card_background_upload_id integer,
granted_title_badge_id bigint,
featured_topic_id integer
);
ALTER TABLE public.user_profiles OWNER TO falco;
--
-- Name: user_search_data; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_search_data (
user_id integer NOT NULL,
search_data tsvector,
raw_data text,
locale text,
version integer DEFAULT 0
);
ALTER TABLE public.user_search_data OWNER TO falco;
--
-- Name: user_second_factors; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_second_factors (
id bigint NOT NULL,
user_id integer NOT NULL,
method integer NOT NULL,
data character varying NOT NULL,
enabled boolean DEFAULT false NOT NULL,
last_used timestamp without time zone,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
name character varying
);
ALTER TABLE public.user_second_factors OWNER TO falco;
--
-- Name: user_second_factors_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_second_factors_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_second_factors_id_seq OWNER TO falco;
--
-- Name: user_second_factors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_second_factors_id_seq OWNED BY public.user_second_factors.id;
--
-- Name: user_security_keys; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_security_keys (
id bigint NOT NULL,
user_id bigint NOT NULL,
credential_id character varying NOT NULL,
public_key character varying NOT NULL,
factor_type integer DEFAULT 0 NOT NULL,
enabled boolean DEFAULT true NOT NULL,
name character varying NOT NULL,
last_used timestamp without time zone,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.user_security_keys OWNER TO falco;
--
-- Name: user_security_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_security_keys_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_security_keys_id_seq OWNER TO falco;
--
-- Name: user_security_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_security_keys_id_seq OWNED BY public.user_security_keys.id;
--
-- Name: user_stats; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_stats (
user_id integer NOT NULL,
topics_entered integer DEFAULT 0 NOT NULL,
time_read integer DEFAULT 0 NOT NULL,
days_visited integer DEFAULT 0 NOT NULL,
posts_read_count integer DEFAULT 0 NOT NULL,
likes_given integer DEFAULT 0 NOT NULL,
likes_received integer DEFAULT 0 NOT NULL,
new_since timestamp without time zone NOT NULL,
read_faq timestamp without time zone,
first_post_created_at timestamp without time zone,
post_count integer DEFAULT 0 NOT NULL,
topic_count integer DEFAULT 0 NOT NULL,
bounce_score double precision DEFAULT 0 NOT NULL,
reset_bounce_score_after timestamp without time zone,
flags_agreed integer DEFAULT 0 NOT NULL,
flags_disagreed integer DEFAULT 0 NOT NULL,
flags_ignored integer DEFAULT 0 NOT NULL,
first_unread_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
distinct_badge_count integer DEFAULT 0 NOT NULL,
first_unread_pm_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
digest_attempted_at timestamp without time zone,
post_edits_count integer,
draft_count integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.user_stats OWNER TO falco;
--
-- Name: user_uploads; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_uploads (
id bigint NOT NULL,
upload_id integer NOT NULL,
user_id integer NOT NULL,
created_at timestamp without time zone NOT NULL
);
ALTER TABLE public.user_uploads OWNER TO falco;
--
-- Name: user_uploads_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_uploads_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_uploads_id_seq OWNER TO falco;
--
-- Name: user_uploads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_uploads_id_seq OWNED BY public.user_uploads.id;
--
-- Name: user_visits; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_visits (
id integer NOT NULL,
user_id integer NOT NULL,
visited_at date NOT NULL,
posts_read integer DEFAULT 0,
mobile boolean DEFAULT false,
time_read integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.user_visits OWNER TO falco;
--
-- Name: user_visits_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_visits_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_visits_id_seq OWNER TO falco;
--
-- Name: user_visits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_visits_id_seq OWNED BY public.user_visits.id;
--
-- Name: user_warnings; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.user_warnings (
id integer NOT NULL,
topic_id integer NOT NULL,
user_id integer NOT NULL,
created_by_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.user_warnings OWNER TO falco;
--
-- Name: user_warnings_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.user_warnings_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_warnings_id_seq OWNER TO falco;
--
-- Name: user_warnings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.user_warnings_id_seq OWNED BY public.user_warnings.id;
--
-- Name: users; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.users (
id integer NOT NULL,
username character varying(60) NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
name character varying,
seen_notification_id integer DEFAULT 0 NOT NULL,
last_posted_at timestamp without time zone,
password_hash character varying(64),
salt character varying(32),
active boolean DEFAULT false NOT NULL,
username_lower character varying(60) NOT NULL,
last_seen_at timestamp without time zone,
admin boolean DEFAULT false NOT NULL,
last_emailed_at timestamp without time zone,
trust_level integer NOT NULL,
approved boolean DEFAULT false NOT NULL,
approved_by_id integer,
approved_at timestamp without time zone,
previous_visit_at timestamp without time zone,
suspended_at timestamp without time zone,
suspended_till timestamp without time zone,
date_of_birth date,
views integer DEFAULT 0 NOT NULL,
flag_level integer DEFAULT 0 NOT NULL,
ip_address inet,
moderator boolean DEFAULT false,
title character varying,
uploaded_avatar_id integer,
locale character varying(10),
primary_group_id integer,
registration_ip_address inet,
staged boolean DEFAULT false NOT NULL,
first_seen_at timestamp without time zone,
silenced_till timestamp without time zone,
group_locked_trust_level integer,
manual_locked_trust_level integer,
secure_identifier character varying,
flair_group_id integer
);
ALTER TABLE public.users OWNER TO falco;
--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.users_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.users_id_seq OWNER TO falco;
--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
--
-- Name: watched_words; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.watched_words (
id integer NOT NULL,
word character varying NOT NULL,
action integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
replacement character varying
);
ALTER TABLE public.watched_words OWNER TO falco;
--
-- Name: watched_words_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.watched_words_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.watched_words_id_seq OWNER TO falco;
--
-- Name: watched_words_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.watched_words_id_seq OWNED BY public.watched_words.id;
--
-- Name: web_crawler_requests; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.web_crawler_requests (
id bigint NOT NULL,
date date NOT NULL,
user_agent character varying NOT NULL,
count integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.web_crawler_requests OWNER TO falco;
--
-- Name: web_crawler_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.web_crawler_requests_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.web_crawler_requests_id_seq OWNER TO falco;
--
-- Name: web_crawler_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.web_crawler_requests_id_seq OWNED BY public.web_crawler_requests.id;
--
-- Name: web_hook_event_types; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.web_hook_event_types (
id integer NOT NULL,
name character varying NOT NULL
);
ALTER TABLE public.web_hook_event_types OWNER TO falco;
--
-- Name: web_hook_event_types_hooks; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.web_hook_event_types_hooks (
web_hook_id integer NOT NULL,
web_hook_event_type_id integer NOT NULL
);
ALTER TABLE public.web_hook_event_types_hooks OWNER TO falco;
--
-- Name: web_hook_event_types_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.web_hook_event_types_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.web_hook_event_types_id_seq OWNER TO falco;
--
-- Name: web_hook_event_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.web_hook_event_types_id_seq OWNED BY public.web_hook_event_types.id;
--
-- Name: web_hook_events; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.web_hook_events (
id integer NOT NULL,
web_hook_id integer NOT NULL,
headers character varying,
payload text,
status integer DEFAULT 0,
response_headers character varying,
response_body text,
duration integer DEFAULT 0,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.web_hook_events OWNER TO falco;
--
-- Name: web_hook_events_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.web_hook_events_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.web_hook_events_id_seq OWNER TO falco;
--
-- Name: web_hook_events_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.web_hook_events_id_seq OWNED BY public.web_hook_events.id;
--
-- Name: web_hooks; Type: TABLE; Schema: public; Owner: falco
--
CREATE TABLE public.web_hooks (
id integer NOT NULL,
payload_url character varying NOT NULL,
content_type integer DEFAULT 1 NOT NULL,
last_delivery_status integer DEFAULT 1 NOT NULL,
status integer DEFAULT 1 NOT NULL,
secret character varying DEFAULT ''::character varying,
wildcard_web_hook boolean DEFAULT false NOT NULL,
verify_certificate boolean DEFAULT true NOT NULL,
active boolean DEFAULT false NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
ALTER TABLE public.web_hooks OWNER TO falco;
--
-- Name: web_hooks_id_seq; Type: SEQUENCE; Schema: public; Owner: falco
--
CREATE SEQUENCE public.web_hooks_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.web_hooks_id_seq OWNER TO falco;
--
-- Name: web_hooks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: falco
--
ALTER SEQUENCE public.web_hooks_id_seq OWNED BY public.web_hooks.id;
--
-- Name: allowed_pm_users id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.allowed_pm_users ALTER COLUMN id SET DEFAULT nextval('public.allowed_pm_users_id_seq'::regclass);
--
-- Name: anonymous_users id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.anonymous_users ALTER COLUMN id SET DEFAULT nextval('public.anonymous_users_id_seq'::regclass);
--
-- Name: api_key_scopes id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.api_key_scopes ALTER COLUMN id SET DEFAULT nextval('public.api_key_scopes_id_seq'::regclass);
--
-- Name: api_keys id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.api_keys ALTER COLUMN id SET DEFAULT nextval('public.api_keys_id_seq'::regclass);
--
-- Name: application_requests id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.application_requests ALTER COLUMN id SET DEFAULT nextval('public.application_requests_id_seq'::regclass);
--
-- Name: backup_draft_posts id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.backup_draft_posts ALTER COLUMN id SET DEFAULT nextval('public.backup_draft_posts_id_seq'::regclass);
--
-- Name: backup_draft_topics id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.backup_draft_topics ALTER COLUMN id SET DEFAULT nextval('public.backup_draft_topics_id_seq'::regclass);
--
-- Name: backup_metadata id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.backup_metadata ALTER COLUMN id SET DEFAULT nextval('public.backup_metadata_id_seq'::regclass);
--
-- Name: badge_groupings id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.badge_groupings ALTER COLUMN id SET DEFAULT nextval('public.badge_groupings_id_seq'::regclass);
--
-- Name: badge_types id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.badge_types ALTER COLUMN id SET DEFAULT nextval('public.badge_types_id_seq'::regclass);
--
-- Name: badges id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.badges ALTER COLUMN id SET DEFAULT nextval('public.badges_id_seq'::regclass);
--
-- Name: bookmarks id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.bookmarks ALTER COLUMN id SET DEFAULT nextval('public.bookmarks_id_seq'::regclass);
--
-- Name: calendar_events id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.calendar_events ALTER COLUMN id SET DEFAULT nextval('public.calendar_events_id_seq'::regclass);
--
-- Name: categories id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.categories ALTER COLUMN id SET DEFAULT nextval('public.categories_id_seq'::regclass);
--
-- Name: category_custom_fields id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_custom_fields ALTER COLUMN id SET DEFAULT nextval('public.category_custom_fields_id_seq'::regclass);
--
-- Name: category_featured_topics id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_featured_topics ALTER COLUMN id SET DEFAULT nextval('public.category_featured_topics_id_seq'::regclass);
--
-- Name: category_groups id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_groups ALTER COLUMN id SET DEFAULT nextval('public.category_groups_id_seq'::regclass);
--
-- Name: category_tag_groups id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_tag_groups ALTER COLUMN id SET DEFAULT nextval('public.category_tag_groups_id_seq'::regclass);
--
-- Name: category_tag_stats id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_tag_stats ALTER COLUMN id SET DEFAULT nextval('public.category_tag_stats_id_seq'::regclass);
--
-- Name: category_tags id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_tags ALTER COLUMN id SET DEFAULT nextval('public.category_tags_id_seq'::regclass);
--
-- Name: category_users id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_users ALTER COLUMN id SET DEFAULT nextval('public.category_users_id_seq'::regclass);
--
-- Name: child_themes id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.child_themes ALTER COLUMN id SET DEFAULT nextval('public.child_themes_id_seq'::regclass);
--
-- Name: color_scheme_colors id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.color_scheme_colors ALTER COLUMN id SET DEFAULT nextval('public.color_scheme_colors_id_seq'::regclass);
--
-- Name: color_schemes id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.color_schemes ALTER COLUMN id SET DEFAULT nextval('public.color_schemes_id_seq'::regclass);
--
-- Name: custom_emojis id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.custom_emojis ALTER COLUMN id SET DEFAULT nextval('public.custom_emojis_id_seq'::regclass);
--
-- Name: developers id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.developers ALTER COLUMN id SET DEFAULT nextval('public.developers_id_seq'::regclass);
--
-- Name: directory_columns id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.directory_columns ALTER COLUMN id SET DEFAULT nextval('public.directory_columns_id_seq'::regclass);
--
-- Name: directory_items id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.directory_items ALTER COLUMN id SET DEFAULT nextval('public.directory_items_id_seq'::regclass);
--
-- Name: discourse_calendar_post_event_dates id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.discourse_calendar_post_event_dates ALTER COLUMN id SET DEFAULT nextval('public.discourse_calendar_post_event_dates_id_seq'::regclass);
--
-- Name: discourse_post_event_events id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.discourse_post_event_events ALTER COLUMN id SET DEFAULT nextval('public.discourse_post_event_events_id_seq'::regclass);
--
-- Name: discourse_post_event_invitees id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.discourse_post_event_invitees ALTER COLUMN id SET DEFAULT nextval('public.discourse_post_event_invitees_id_seq'::regclass);
--
-- Name: dismissed_topic_users id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.dismissed_topic_users ALTER COLUMN id SET DEFAULT nextval('public.dismissed_topic_users_id_seq'::regclass);
--
-- Name: do_not_disturb_timings id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.do_not_disturb_timings ALTER COLUMN id SET DEFAULT nextval('public.do_not_disturb_timings_id_seq'::regclass);
--
-- Name: draft_sequences id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.draft_sequences ALTER COLUMN id SET DEFAULT nextval('public.draft_sequences_id_seq'::regclass);
--
-- Name: drafts id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.drafts ALTER COLUMN id SET DEFAULT nextval('public.drafts_id_seq'::regclass);
--
-- Name: email_change_requests id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.email_change_requests ALTER COLUMN id SET DEFAULT nextval('public.email_change_requests_id_seq'::regclass);
--
-- Name: email_logs id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.email_logs ALTER COLUMN id SET DEFAULT nextval('public.email_logs_id_seq'::regclass);
--
-- Name: email_tokens id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.email_tokens ALTER COLUMN id SET DEFAULT nextval('public.email_tokens_id_seq'::regclass);
--
-- Name: embeddable_hosts id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.embeddable_hosts ALTER COLUMN id SET DEFAULT nextval('public.embeddable_hosts_id_seq'::regclass);
--
-- Name: external_upload_stubs id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.external_upload_stubs ALTER COLUMN id SET DEFAULT nextval('public.external_upload_stubs_id_seq'::regclass);
--
-- Name: group_archived_messages id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_archived_messages ALTER COLUMN id SET DEFAULT nextval('public.group_archived_messages_id_seq'::regclass);
--
-- Name: group_category_notification_defaults id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_category_notification_defaults ALTER COLUMN id SET DEFAULT nextval('public.group_category_notification_defaults_id_seq'::regclass);
--
-- Name: group_custom_fields id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_custom_fields ALTER COLUMN id SET DEFAULT nextval('public.group_custom_fields_id_seq'::regclass);
--
-- Name: group_histories id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_histories ALTER COLUMN id SET DEFAULT nextval('public.group_histories_id_seq'::regclass);
--
-- Name: group_mentions id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_mentions ALTER COLUMN id SET DEFAULT nextval('public.group_mentions_id_seq'::regclass);
--
-- Name: group_requests id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_requests ALTER COLUMN id SET DEFAULT nextval('public.group_requests_id_seq'::regclass);
--
-- Name: group_tag_notification_defaults id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_tag_notification_defaults ALTER COLUMN id SET DEFAULT nextval('public.group_tag_notification_defaults_id_seq'::regclass);
--
-- Name: group_users id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_users ALTER COLUMN id SET DEFAULT nextval('public.group_users_id_seq'::regclass);
--
-- Name: groups id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.groups ALTER COLUMN id SET DEFAULT nextval('public.groups_id_seq'::regclass);
--
-- Name: ignored_users id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.ignored_users ALTER COLUMN id SET DEFAULT nextval('public.ignored_users_id_seq'::regclass);
--
-- Name: imap_sync_logs id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.imap_sync_logs ALTER COLUMN id SET DEFAULT nextval('public.imap_sync_logs_id_seq'::regclass);
--
-- Name: incoming_domains id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.incoming_domains ALTER COLUMN id SET DEFAULT nextval('public.incoming_domains_id_seq'::regclass);
--
-- Name: incoming_emails id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.incoming_emails ALTER COLUMN id SET DEFAULT nextval('public.incoming_emails_id_seq'::regclass);
--
-- Name: incoming_links id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.incoming_links ALTER COLUMN id SET DEFAULT nextval('public.incoming_links_id_seq'::regclass);
--
-- Name: incoming_referers id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.incoming_referers ALTER COLUMN id SET DEFAULT nextval('public.incoming_referers_id_seq'::regclass);
--
-- Name: invited_groups id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.invited_groups ALTER COLUMN id SET DEFAULT nextval('public.invited_groups_id_seq'::regclass);
--
-- Name: invited_users id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.invited_users ALTER COLUMN id SET DEFAULT nextval('public.invited_users_id_seq'::regclass);
--
-- Name: invites id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.invites ALTER COLUMN id SET DEFAULT nextval('public.invites_id_seq'::regclass);
--
-- Name: javascript_caches id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.javascript_caches ALTER COLUMN id SET DEFAULT nextval('public.javascript_caches_id_seq'::regclass);
--
-- Name: linked_topics id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.linked_topics ALTER COLUMN id SET DEFAULT nextval('public.linked_topics_id_seq'::regclass);
--
-- Name: message_bus id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.message_bus ALTER COLUMN id SET DEFAULT nextval('public.message_bus_id_seq'::regclass);
--
-- Name: muted_users id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.muted_users ALTER COLUMN id SET DEFAULT nextval('public.muted_users_id_seq'::regclass);
--
-- Name: notifications id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.notifications ALTER COLUMN id SET DEFAULT nextval('public.notifications_id_seq'::regclass);
--
-- Name: oauth2_user_infos id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.oauth2_user_infos ALTER COLUMN id SET DEFAULT nextval('public.oauth2_user_infos_id_seq'::regclass);
--
-- Name: onceoff_logs id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.onceoff_logs ALTER COLUMN id SET DEFAULT nextval('public.onceoff_logs_id_seq'::regclass);
--
-- Name: optimized_images id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.optimized_images ALTER COLUMN id SET DEFAULT nextval('public.optimized_images_id_seq'::regclass);
--
-- Name: permalinks id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.permalinks ALTER COLUMN id SET DEFAULT nextval('public.permalinks_id_seq'::regclass);
--
-- Name: plugin_store_rows id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.plugin_store_rows ALTER COLUMN id SET DEFAULT nextval('public.plugin_store_rows_id_seq'::regclass);
--
-- Name: poll_options id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.poll_options ALTER COLUMN id SET DEFAULT nextval('public.poll_options_id_seq'::regclass);
--
-- Name: polls id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.polls ALTER COLUMN id SET DEFAULT nextval('public.polls_id_seq'::regclass);
--
-- Name: post_action_types id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_action_types ALTER COLUMN id SET DEFAULT nextval('public.post_action_types_id_seq'::regclass);
--
-- Name: post_actions id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_actions ALTER COLUMN id SET DEFAULT nextval('public.post_actions_id_seq'::regclass);
--
-- Name: post_custom_fields id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_custom_fields ALTER COLUMN id SET DEFAULT nextval('public.post_custom_fields_id_seq'::regclass);
--
-- Name: post_details id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_details ALTER COLUMN id SET DEFAULT nextval('public.post_details_id_seq'::regclass);
--
-- Name: post_reply_keys id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_reply_keys ALTER COLUMN id SET DEFAULT nextval('public.post_reply_keys_id_seq'::regclass);
--
-- Name: post_revisions id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_revisions ALTER COLUMN id SET DEFAULT nextval('public.post_revisions_id_seq'::regclass);
--
-- Name: post_stats id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_stats ALTER COLUMN id SET DEFAULT nextval('public.post_stats_id_seq'::regclass);
--
-- Name: post_uploads id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_uploads ALTER COLUMN id SET DEFAULT nextval('public.post_uploads_id_seq'::regclass);
--
-- Name: posts id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.posts ALTER COLUMN id SET DEFAULT nextval('public.posts_id_seq'::regclass);
--
-- Name: published_pages id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.published_pages ALTER COLUMN id SET DEFAULT nextval('public.published_pages_id_seq'::regclass);
--
-- Name: push_subscriptions id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.push_subscriptions ALTER COLUMN id SET DEFAULT nextval('public.push_subscriptions_id_seq'::regclass);
--
-- Name: quoted_posts id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.quoted_posts ALTER COLUMN id SET DEFAULT nextval('public.quoted_posts_id_seq'::regclass);
--
-- Name: remote_themes id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.remote_themes ALTER COLUMN id SET DEFAULT nextval('public.remote_themes_id_seq'::regclass);
--
-- Name: reviewable_claimed_topics id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.reviewable_claimed_topics ALTER COLUMN id SET DEFAULT nextval('public.reviewable_claimed_topics_id_seq'::regclass);
--
-- Name: reviewable_histories id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.reviewable_histories ALTER COLUMN id SET DEFAULT nextval('public.reviewable_histories_id_seq'::regclass);
--
-- Name: reviewable_scores id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.reviewable_scores ALTER COLUMN id SET DEFAULT nextval('public.reviewable_scores_id_seq'::regclass);
--
-- Name: reviewables id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.reviewables ALTER COLUMN id SET DEFAULT nextval('public.reviewables_id_seq'::regclass);
--
-- Name: scheduler_stats id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.scheduler_stats ALTER COLUMN id SET DEFAULT nextval('public.scheduler_stats_id_seq'::regclass);
--
-- Name: schema_migration_details id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.schema_migration_details ALTER COLUMN id SET DEFAULT nextval('public.schema_migration_details_id_seq'::regclass);
--
-- Name: screened_emails id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.screened_emails ALTER COLUMN id SET DEFAULT nextval('public.screened_emails_id_seq'::regclass);
--
-- Name: screened_ip_addresses id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.screened_ip_addresses ALTER COLUMN id SET DEFAULT nextval('public.screened_ip_addresses_id_seq'::regclass);
--
-- Name: screened_urls id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.screened_urls ALTER COLUMN id SET DEFAULT nextval('public.screened_urls_id_seq'::regclass);
--
-- Name: search_logs id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.search_logs ALTER COLUMN id SET DEFAULT nextval('public.search_logs_id_seq'::regclass);
--
-- Name: shared_drafts id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.shared_drafts ALTER COLUMN id SET DEFAULT nextval('public.shared_drafts_id_seq'::regclass);
--
-- Name: shelved_notifications id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.shelved_notifications ALTER COLUMN id SET DEFAULT nextval('public.shelved_notifications_id_seq'::regclass);
--
-- Name: single_sign_on_records id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.single_sign_on_records ALTER COLUMN id SET DEFAULT nextval('public.single_sign_on_records_id_seq'::regclass);
--
-- Name: site_settings id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.site_settings ALTER COLUMN id SET DEFAULT nextval('public.site_settings_id_seq'::regclass);
--
-- Name: skipped_email_logs id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.skipped_email_logs ALTER COLUMN id SET DEFAULT nextval('public.skipped_email_logs_id_seq'::regclass);
--
-- Name: stylesheet_cache id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.stylesheet_cache ALTER COLUMN id SET DEFAULT nextval('public.stylesheet_cache_id_seq'::regclass);
--
-- Name: tag_group_memberships id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.tag_group_memberships ALTER COLUMN id SET DEFAULT nextval('public.tag_group_memberships_id_seq'::regclass);
--
-- Name: tag_group_permissions id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.tag_group_permissions ALTER COLUMN id SET DEFAULT nextval('public.tag_group_permissions_id_seq'::regclass);
--
-- Name: tag_groups id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.tag_groups ALTER COLUMN id SET DEFAULT nextval('public.tag_groups_id_seq'::regclass);
--
-- Name: tag_search_data tag_id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.tag_search_data ALTER COLUMN tag_id SET DEFAULT nextval('public.tag_search_data_tag_id_seq'::regclass);
--
-- Name: tag_users id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.tag_users ALTER COLUMN id SET DEFAULT nextval('public.tag_users_id_seq'::regclass);
--
-- Name: tags id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.tags ALTER COLUMN id SET DEFAULT nextval('public.tags_id_seq'::regclass);
--
-- Name: theme_fields id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.theme_fields ALTER COLUMN id SET DEFAULT nextval('public.theme_fields_id_seq'::regclass);
--
-- Name: theme_modifier_sets id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.theme_modifier_sets ALTER COLUMN id SET DEFAULT nextval('public.theme_modifier_sets_id_seq'::regclass);
--
-- Name: theme_settings id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.theme_settings ALTER COLUMN id SET DEFAULT nextval('public.theme_settings_id_seq'::regclass);
--
-- Name: theme_translation_overrides id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.theme_translation_overrides ALTER COLUMN id SET DEFAULT nextval('public.theme_translation_overrides_id_seq'::regclass);
--
-- Name: themes id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.themes ALTER COLUMN id SET DEFAULT nextval('public.themes_id_seq'::regclass);
--
-- Name: top_topics id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.top_topics ALTER COLUMN id SET DEFAULT nextval('public.top_topics_id_seq'::regclass);
--
-- Name: topic_allowed_groups id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_allowed_groups ALTER COLUMN id SET DEFAULT nextval('public.topic_allowed_groups_id_seq'::regclass);
--
-- Name: topic_allowed_users id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_allowed_users ALTER COLUMN id SET DEFAULT nextval('public.topic_allowed_users_id_seq'::regclass);
--
-- Name: topic_custom_fields id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_custom_fields ALTER COLUMN id SET DEFAULT nextval('public.topic_custom_fields_id_seq'::regclass);
--
-- Name: topic_embeds id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_embeds ALTER COLUMN id SET DEFAULT nextval('public.topic_embeds_id_seq'::regclass);
--
-- Name: topic_groups id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_groups ALTER COLUMN id SET DEFAULT nextval('public.topic_groups_id_seq'::regclass);
--
-- Name: topic_invites id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_invites ALTER COLUMN id SET DEFAULT nextval('public.topic_invites_id_seq'::regclass);
--
-- Name: topic_link_clicks id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_link_clicks ALTER COLUMN id SET DEFAULT nextval('public.topic_link_clicks_id_seq'::regclass);
--
-- Name: topic_links id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_links ALTER COLUMN id SET DEFAULT nextval('public.topic_links_id_seq'::regclass);
--
-- Name: topic_tags id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_tags ALTER COLUMN id SET DEFAULT nextval('public.topic_tags_id_seq'::regclass);
--
-- Name: topic_thumbnails id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_thumbnails ALTER COLUMN id SET DEFAULT nextval('public.topic_thumbnails_id_seq'::regclass);
--
-- Name: topic_timers id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_timers ALTER COLUMN id SET DEFAULT nextval('public.topic_timers_id_seq'::regclass);
--
-- Name: topic_users id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_users ALTER COLUMN id SET DEFAULT nextval('public.topic_users_id_seq'::regclass);
--
-- Name: topics id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topics ALTER COLUMN id SET DEFAULT nextval('public.topics_id_seq'::regclass);
--
-- Name: translation_overrides id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.translation_overrides ALTER COLUMN id SET DEFAULT nextval('public.translation_overrides_id_seq'::regclass);
--
-- Name: uploads id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.uploads ALTER COLUMN id SET DEFAULT nextval('public.uploads_id_seq'::regclass);
--
-- Name: user_actions id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_actions ALTER COLUMN id SET DEFAULT nextval('public.user_actions_id_seq'::regclass);
--
-- Name: user_api_key_scopes id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_api_key_scopes ALTER COLUMN id SET DEFAULT nextval('public.user_api_key_scopes_id_seq'::regclass);
--
-- Name: user_api_keys id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_api_keys ALTER COLUMN id SET DEFAULT nextval('public.user_api_keys_id_seq'::regclass);
--
-- Name: user_archived_messages id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_archived_messages ALTER COLUMN id SET DEFAULT nextval('public.user_archived_messages_id_seq'::regclass);
--
-- Name: user_associated_accounts id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_associated_accounts ALTER COLUMN id SET DEFAULT nextval('public.user_associated_accounts_id_seq'::regclass);
--
-- Name: user_auth_token_logs id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_auth_token_logs ALTER COLUMN id SET DEFAULT nextval('public.user_auth_token_logs_id_seq'::regclass);
--
-- Name: user_auth_tokens id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_auth_tokens ALTER COLUMN id SET DEFAULT nextval('public.user_auth_tokens_id_seq'::regclass);
--
-- Name: user_avatars id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_avatars ALTER COLUMN id SET DEFAULT nextval('public.user_avatars_id_seq'::regclass);
--
-- Name: user_badges id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_badges ALTER COLUMN id SET DEFAULT nextval('public.user_badges_id_seq'::regclass);
--
-- Name: user_custom_fields id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_custom_fields ALTER COLUMN id SET DEFAULT nextval('public.user_custom_fields_id_seq'::regclass);
--
-- Name: user_emails id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_emails ALTER COLUMN id SET DEFAULT nextval('public.user_emails_id_seq'::regclass);
--
-- Name: user_exports id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_exports ALTER COLUMN id SET DEFAULT nextval('public.user_exports_id_seq'::regclass);
--
-- Name: user_field_options id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_field_options ALTER COLUMN id SET DEFAULT nextval('public.user_field_options_id_seq'::regclass);
--
-- Name: user_fields id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_fields ALTER COLUMN id SET DEFAULT nextval('public.user_fields_id_seq'::regclass);
--
-- Name: user_histories id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_histories ALTER COLUMN id SET DEFAULT nextval('public.user_histories_id_seq'::regclass);
--
-- Name: user_ip_address_histories id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_ip_address_histories ALTER COLUMN id SET DEFAULT nextval('public.user_ip_address_histories_id_seq'::regclass);
--
-- Name: user_notification_schedules id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_notification_schedules ALTER COLUMN id SET DEFAULT nextval('public.user_notification_schedules_id_seq'::regclass);
--
-- Name: user_open_ids id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_open_ids ALTER COLUMN id SET DEFAULT nextval('public.user_open_ids_id_seq'::regclass);
--
-- Name: user_profile_views id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_profile_views ALTER COLUMN id SET DEFAULT nextval('public.user_profile_views_id_seq'::regclass);
--
-- Name: user_second_factors id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_second_factors ALTER COLUMN id SET DEFAULT nextval('public.user_second_factors_id_seq'::regclass);
--
-- Name: user_security_keys id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_security_keys ALTER COLUMN id SET DEFAULT nextval('public.user_security_keys_id_seq'::regclass);
--
-- Name: user_uploads id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_uploads ALTER COLUMN id SET DEFAULT nextval('public.user_uploads_id_seq'::regclass);
--
-- Name: user_visits id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_visits ALTER COLUMN id SET DEFAULT nextval('public.user_visits_id_seq'::regclass);
--
-- Name: user_warnings id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_warnings ALTER COLUMN id SET DEFAULT nextval('public.user_warnings_id_seq'::regclass);
--
-- Name: users id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
--
-- Name: watched_words id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.watched_words ALTER COLUMN id SET DEFAULT nextval('public.watched_words_id_seq'::regclass);
--
-- Name: web_crawler_requests id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.web_crawler_requests ALTER COLUMN id SET DEFAULT nextval('public.web_crawler_requests_id_seq'::regclass);
--
-- Name: web_hook_event_types id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.web_hook_event_types ALTER COLUMN id SET DEFAULT nextval('public.web_hook_event_types_id_seq'::regclass);
--
-- Name: web_hook_events id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.web_hook_events ALTER COLUMN id SET DEFAULT nextval('public.web_hook_events_id_seq'::regclass);
--
-- Name: web_hooks id; Type: DEFAULT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.web_hooks ALTER COLUMN id SET DEFAULT nextval('public.web_hooks_id_seq'::regclass);
--
-- Name: allowed_pm_users allowed_pm_users_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.allowed_pm_users
ADD CONSTRAINT allowed_pm_users_pkey PRIMARY KEY (id);
--
-- Name: anonymous_users anonymous_users_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.anonymous_users
ADD CONSTRAINT anonymous_users_pkey PRIMARY KEY (id);
--
-- Name: api_key_scopes api_key_scopes_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.api_key_scopes
ADD CONSTRAINT api_key_scopes_pkey PRIMARY KEY (id);
--
-- Name: api_keys api_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.api_keys
ADD CONSTRAINT api_keys_pkey PRIMARY KEY (id);
--
-- Name: application_requests application_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.application_requests
ADD CONSTRAINT application_requests_pkey PRIMARY KEY (id);
--
-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.ar_internal_metadata
ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
--
-- Name: backup_draft_posts backup_draft_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.backup_draft_posts
ADD CONSTRAINT backup_draft_posts_pkey PRIMARY KEY (id);
--
-- Name: backup_draft_topics backup_draft_topics_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.backup_draft_topics
ADD CONSTRAINT backup_draft_topics_pkey PRIMARY KEY (id);
--
-- Name: backup_metadata backup_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.backup_metadata
ADD CONSTRAINT backup_metadata_pkey PRIMARY KEY (id);
--
-- Name: badge_groupings badge_groupings_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.badge_groupings
ADD CONSTRAINT badge_groupings_pkey PRIMARY KEY (id);
--
-- Name: badge_types badge_types_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.badge_types
ADD CONSTRAINT badge_types_pkey PRIMARY KEY (id);
--
-- Name: badges badges_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.badges
ADD CONSTRAINT badges_pkey PRIMARY KEY (id);
--
-- Name: bookmarks bookmarks_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.bookmarks
ADD CONSTRAINT bookmarks_pkey PRIMARY KEY (id);
--
-- Name: calendar_events calendar_events_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.calendar_events
ADD CONSTRAINT calendar_events_pkey PRIMARY KEY (id);
--
-- Name: categories categories_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.categories
ADD CONSTRAINT categories_pkey PRIMARY KEY (id);
--
-- Name: category_search_data categories_search_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_search_data
ADD CONSTRAINT categories_search_pkey PRIMARY KEY (category_id);
--
-- Name: category_custom_fields category_custom_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_custom_fields
ADD CONSTRAINT category_custom_fields_pkey PRIMARY KEY (id);
--
-- Name: category_featured_topics category_featured_topics_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_featured_topics
ADD CONSTRAINT category_featured_topics_pkey PRIMARY KEY (id);
--
-- Name: category_groups category_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_groups
ADD CONSTRAINT category_groups_pkey PRIMARY KEY (id);
--
-- Name: category_tag_groups category_tag_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_tag_groups
ADD CONSTRAINT category_tag_groups_pkey PRIMARY KEY (id);
--
-- Name: category_tag_stats category_tag_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_tag_stats
ADD CONSTRAINT category_tag_stats_pkey PRIMARY KEY (id);
--
-- Name: category_tags category_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_tags
ADD CONSTRAINT category_tags_pkey PRIMARY KEY (id);
--
-- Name: category_users category_users_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.category_users
ADD CONSTRAINT category_users_pkey PRIMARY KEY (id);
--
-- Name: child_themes child_themes_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.child_themes
ADD CONSTRAINT child_themes_pkey PRIMARY KEY (id);
--
-- Name: color_scheme_colors color_scheme_colors_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.color_scheme_colors
ADD CONSTRAINT color_scheme_colors_pkey PRIMARY KEY (id);
--
-- Name: color_schemes color_schemes_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.color_schemes
ADD CONSTRAINT color_schemes_pkey PRIMARY KEY (id);
--
-- Name: custom_emojis custom_emojis_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.custom_emojis
ADD CONSTRAINT custom_emojis_pkey PRIMARY KEY (id);
--
-- Name: developers developers_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.developers
ADD CONSTRAINT developers_pkey PRIMARY KEY (id);
--
-- Name: unsubscribe_keys digest_unsubscribe_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.unsubscribe_keys
ADD CONSTRAINT digest_unsubscribe_keys_pkey PRIMARY KEY (key);
--
-- Name: directory_columns directory_columns_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.directory_columns
ADD CONSTRAINT directory_columns_pkey PRIMARY KEY (id);
--
-- Name: directory_items directory_items_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.directory_items
ADD CONSTRAINT directory_items_pkey PRIMARY KEY (id);
--
-- Name: discourse_calendar_post_event_dates discourse_calendar_post_event_dates_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.discourse_calendar_post_event_dates
ADD CONSTRAINT discourse_calendar_post_event_dates_pkey PRIMARY KEY (id);
--
-- Name: discourse_post_event_events discourse_post_event_events_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.discourse_post_event_events
ADD CONSTRAINT discourse_post_event_events_pkey PRIMARY KEY (id);
--
-- Name: discourse_post_event_invitees discourse_post_event_invitees_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.discourse_post_event_invitees
ADD CONSTRAINT discourse_post_event_invitees_pkey PRIMARY KEY (id);
--
-- Name: dismissed_topic_users dismissed_topic_users_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.dismissed_topic_users
ADD CONSTRAINT dismissed_topic_users_pkey PRIMARY KEY (id);
--
-- Name: do_not_disturb_timings do_not_disturb_timings_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.do_not_disturb_timings
ADD CONSTRAINT do_not_disturb_timings_pkey PRIMARY KEY (id);
--
-- Name: draft_sequences draft_sequences_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.draft_sequences
ADD CONSTRAINT draft_sequences_pkey PRIMARY KEY (id);
--
-- Name: drafts drafts_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.drafts
ADD CONSTRAINT drafts_pkey PRIMARY KEY (id);
--
-- Name: email_change_requests email_change_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.email_change_requests
ADD CONSTRAINT email_change_requests_pkey PRIMARY KEY (id);
--
-- Name: email_logs email_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.email_logs
ADD CONSTRAINT email_logs_pkey PRIMARY KEY (id);
--
-- Name: email_tokens email_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.email_tokens
ADD CONSTRAINT email_tokens_pkey PRIMARY KEY (id);
--
-- Name: embeddable_hosts embeddable_hosts_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.embeddable_hosts
ADD CONSTRAINT embeddable_hosts_pkey PRIMARY KEY (id);
--
-- Name: external_upload_stubs external_upload_stubs_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.external_upload_stubs
ADD CONSTRAINT external_upload_stubs_pkey PRIMARY KEY (id);
--
-- Name: group_archived_messages group_archived_messages_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_archived_messages
ADD CONSTRAINT group_archived_messages_pkey PRIMARY KEY (id);
--
-- Name: group_category_notification_defaults group_category_notification_defaults_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_category_notification_defaults
ADD CONSTRAINT group_category_notification_defaults_pkey PRIMARY KEY (id);
--
-- Name: group_custom_fields group_custom_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_custom_fields
ADD CONSTRAINT group_custom_fields_pkey PRIMARY KEY (id);
--
-- Name: group_histories group_histories_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_histories
ADD CONSTRAINT group_histories_pkey PRIMARY KEY (id);
--
-- Name: group_mentions group_mentions_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_mentions
ADD CONSTRAINT group_mentions_pkey PRIMARY KEY (id);
--
-- Name: group_requests group_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_requests
ADD CONSTRAINT group_requests_pkey PRIMARY KEY (id);
--
-- Name: group_tag_notification_defaults group_tag_notification_defaults_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_tag_notification_defaults
ADD CONSTRAINT group_tag_notification_defaults_pkey PRIMARY KEY (id);
--
-- Name: group_users group_users_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.group_users
ADD CONSTRAINT group_users_pkey PRIMARY KEY (id);
--
-- Name: groups groups_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.groups
ADD CONSTRAINT groups_pkey PRIMARY KEY (id);
--
-- Name: ignored_users ignored_users_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.ignored_users
ADD CONSTRAINT ignored_users_pkey PRIMARY KEY (id);
--
-- Name: imap_sync_logs imap_sync_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.imap_sync_logs
ADD CONSTRAINT imap_sync_logs_pkey PRIMARY KEY (id);
--
-- Name: incoming_domains incoming_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.incoming_domains
ADD CONSTRAINT incoming_domains_pkey PRIMARY KEY (id);
--
-- Name: incoming_emails incoming_emails_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.incoming_emails
ADD CONSTRAINT incoming_emails_pkey PRIMARY KEY (id);
--
-- Name: incoming_links incoming_links_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.incoming_links
ADD CONSTRAINT incoming_links_pkey PRIMARY KEY (id);
--
-- Name: incoming_referers incoming_referers_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.incoming_referers
ADD CONSTRAINT incoming_referers_pkey PRIMARY KEY (id);
--
-- Name: invited_groups invited_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.invited_groups
ADD CONSTRAINT invited_groups_pkey PRIMARY KEY (id);
--
-- Name: invited_users invited_users_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.invited_users
ADD CONSTRAINT invited_users_pkey PRIMARY KEY (id);
--
-- Name: invites invites_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.invites
ADD CONSTRAINT invites_pkey PRIMARY KEY (id);
--
-- Name: javascript_caches javascript_caches_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.javascript_caches
ADD CONSTRAINT javascript_caches_pkey PRIMARY KEY (id);
--
-- Name: linked_topics linked_topics_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.linked_topics
ADD CONSTRAINT linked_topics_pkey PRIMARY KEY (id);
--
-- Name: message_bus message_bus_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.message_bus
ADD CONSTRAINT message_bus_pkey PRIMARY KEY (id);
--
-- Name: muted_users muted_users_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.muted_users
ADD CONSTRAINT muted_users_pkey PRIMARY KEY (id);
--
-- Name: notifications notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.notifications
ADD CONSTRAINT notifications_pkey PRIMARY KEY (id);
--
-- Name: oauth2_user_infos oauth2_user_infos_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.oauth2_user_infos
ADD CONSTRAINT oauth2_user_infos_pkey PRIMARY KEY (id);
--
-- Name: onceoff_logs onceoff_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.onceoff_logs
ADD CONSTRAINT onceoff_logs_pkey PRIMARY KEY (id);
--
-- Name: optimized_images optimized_images_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.optimized_images
ADD CONSTRAINT optimized_images_pkey PRIMARY KEY (id);
--
-- Name: permalinks permalinks_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.permalinks
ADD CONSTRAINT permalinks_pkey PRIMARY KEY (id);
--
-- Name: plugin_store_rows plugin_store_rows_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.plugin_store_rows
ADD CONSTRAINT plugin_store_rows_pkey PRIMARY KEY (id);
--
-- Name: poll_options poll_options_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.poll_options
ADD CONSTRAINT poll_options_pkey PRIMARY KEY (id);
--
-- Name: polls polls_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.polls
ADD CONSTRAINT polls_pkey PRIMARY KEY (id);
--
-- Name: post_action_types post_action_types_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_action_types
ADD CONSTRAINT post_action_types_pkey PRIMARY KEY (id);
--
-- Name: post_actions post_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_actions
ADD CONSTRAINT post_actions_pkey PRIMARY KEY (id);
--
-- Name: post_custom_fields post_custom_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_custom_fields
ADD CONSTRAINT post_custom_fields_pkey PRIMARY KEY (id);
--
-- Name: post_details post_details_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_details
ADD CONSTRAINT post_details_pkey PRIMARY KEY (id);
--
-- Name: post_reply_keys post_reply_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_reply_keys
ADD CONSTRAINT post_reply_keys_pkey PRIMARY KEY (id);
--
-- Name: post_revisions post_revisions_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_revisions
ADD CONSTRAINT post_revisions_pkey PRIMARY KEY (id);
--
-- Name: post_stats post_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_stats
ADD CONSTRAINT post_stats_pkey PRIMARY KEY (id);
--
-- Name: post_uploads post_uploads_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_uploads
ADD CONSTRAINT post_uploads_pkey PRIMARY KEY (id);
--
-- Name: posts posts_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.posts
ADD CONSTRAINT posts_pkey PRIMARY KEY (id);
--
-- Name: post_search_data posts_search_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.post_search_data
ADD CONSTRAINT posts_search_pkey PRIMARY KEY (post_id);
--
-- Name: published_pages published_pages_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.published_pages
ADD CONSTRAINT published_pages_pkey PRIMARY KEY (id);
--
-- Name: push_subscriptions push_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.push_subscriptions
ADD CONSTRAINT push_subscriptions_pkey PRIMARY KEY (id);
--
-- Name: quoted_posts quoted_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.quoted_posts
ADD CONSTRAINT quoted_posts_pkey PRIMARY KEY (id);
--
-- Name: remote_themes remote_themes_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.remote_themes
ADD CONSTRAINT remote_themes_pkey PRIMARY KEY (id);
--
-- Name: reviewable_claimed_topics reviewable_claimed_topics_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.reviewable_claimed_topics
ADD CONSTRAINT reviewable_claimed_topics_pkey PRIMARY KEY (id);
--
-- Name: reviewable_histories reviewable_histories_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.reviewable_histories
ADD CONSTRAINT reviewable_histories_pkey PRIMARY KEY (id);
--
-- Name: reviewable_scores reviewable_scores_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.reviewable_scores
ADD CONSTRAINT reviewable_scores_pkey PRIMARY KEY (id);
--
-- Name: reviewables reviewables_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.reviewables
ADD CONSTRAINT reviewables_pkey PRIMARY KEY (id);
--
-- Name: scheduler_stats scheduler_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.scheduler_stats
ADD CONSTRAINT scheduler_stats_pkey PRIMARY KEY (id);
--
-- Name: schema_migration_details schema_migration_details_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.schema_migration_details
ADD CONSTRAINT schema_migration_details_pkey PRIMARY KEY (id);
--
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
--
-- Name: screened_emails screened_emails_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.screened_emails
ADD CONSTRAINT screened_emails_pkey PRIMARY KEY (id);
--
-- Name: screened_ip_addresses screened_ip_addresses_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.screened_ip_addresses
ADD CONSTRAINT screened_ip_addresses_pkey PRIMARY KEY (id);
--
-- Name: screened_urls screened_urls_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.screened_urls
ADD CONSTRAINT screened_urls_pkey PRIMARY KEY (id);
--
-- Name: search_logs search_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.search_logs
ADD CONSTRAINT search_logs_pkey PRIMARY KEY (id);
--
-- Name: shared_drafts shared_drafts_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.shared_drafts
ADD CONSTRAINT shared_drafts_pkey PRIMARY KEY (id);
--
-- Name: shelved_notifications shelved_notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.shelved_notifications
ADD CONSTRAINT shelved_notifications_pkey PRIMARY KEY (id);
--
-- Name: single_sign_on_records single_sign_on_records_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.single_sign_on_records
ADD CONSTRAINT single_sign_on_records_pkey PRIMARY KEY (id);
--
-- Name: site_settings site_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.site_settings
ADD CONSTRAINT site_settings_pkey PRIMARY KEY (id);
--
-- Name: skipped_email_logs skipped_email_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.skipped_email_logs
ADD CONSTRAINT skipped_email_logs_pkey PRIMARY KEY (id);
--
-- Name: stylesheet_cache stylesheet_cache_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.stylesheet_cache
ADD CONSTRAINT stylesheet_cache_pkey PRIMARY KEY (id);
--
-- Name: tag_group_memberships tag_group_memberships_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.tag_group_memberships
ADD CONSTRAINT tag_group_memberships_pkey PRIMARY KEY (id);
--
-- Name: tag_group_permissions tag_group_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.tag_group_permissions
ADD CONSTRAINT tag_group_permissions_pkey PRIMARY KEY (id);
--
-- Name: tag_groups tag_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.tag_groups
ADD CONSTRAINT tag_groups_pkey PRIMARY KEY (id);
--
-- Name: tag_search_data tag_search_data_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.tag_search_data
ADD CONSTRAINT tag_search_data_pkey PRIMARY KEY (tag_id);
--
-- Name: tag_users tag_users_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.tag_users
ADD CONSTRAINT tag_users_pkey PRIMARY KEY (id);
--
-- Name: tags tags_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.tags
ADD CONSTRAINT tags_pkey PRIMARY KEY (id);
--
-- Name: theme_fields theme_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.theme_fields
ADD CONSTRAINT theme_fields_pkey PRIMARY KEY (id);
--
-- Name: theme_modifier_sets theme_modifier_sets_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.theme_modifier_sets
ADD CONSTRAINT theme_modifier_sets_pkey PRIMARY KEY (id);
--
-- Name: theme_settings theme_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.theme_settings
ADD CONSTRAINT theme_settings_pkey PRIMARY KEY (id);
--
-- Name: theme_translation_overrides theme_translation_overrides_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.theme_translation_overrides
ADD CONSTRAINT theme_translation_overrides_pkey PRIMARY KEY (id);
--
-- Name: themes themes_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.themes
ADD CONSTRAINT themes_pkey PRIMARY KEY (id);
--
-- Name: top_topics top_topics_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.top_topics
ADD CONSTRAINT top_topics_pkey PRIMARY KEY (id);
--
-- Name: topic_allowed_groups topic_allowed_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_allowed_groups
ADD CONSTRAINT topic_allowed_groups_pkey PRIMARY KEY (id);
--
-- Name: topic_allowed_users topic_allowed_users_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_allowed_users
ADD CONSTRAINT topic_allowed_users_pkey PRIMARY KEY (id);
--
-- Name: topic_custom_fields topic_custom_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_custom_fields
ADD CONSTRAINT topic_custom_fields_pkey PRIMARY KEY (id);
--
-- Name: topic_embeds topic_embeds_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_embeds
ADD CONSTRAINT topic_embeds_pkey PRIMARY KEY (id);
--
-- Name: topic_groups topic_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_groups
ADD CONSTRAINT topic_groups_pkey PRIMARY KEY (id);
--
-- Name: topic_invites topic_invites_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_invites
ADD CONSTRAINT topic_invites_pkey PRIMARY KEY (id);
--
-- Name: topic_link_clicks topic_link_clicks_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_link_clicks
ADD CONSTRAINT topic_link_clicks_pkey PRIMARY KEY (id);
--
-- Name: topic_links topic_links_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_links
ADD CONSTRAINT topic_links_pkey PRIMARY KEY (id);
--
-- Name: topic_search_data topic_search_data_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_search_data
ADD CONSTRAINT topic_search_data_pkey PRIMARY KEY (topic_id);
--
-- Name: topic_tags topic_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_tags
ADD CONSTRAINT topic_tags_pkey PRIMARY KEY (id);
--
-- Name: topic_thumbnails topic_thumbnails_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_thumbnails
ADD CONSTRAINT topic_thumbnails_pkey PRIMARY KEY (id);
--
-- Name: topic_timers topic_timers_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_timers
ADD CONSTRAINT topic_timers_pkey PRIMARY KEY (id);
--
-- Name: topic_users topic_users_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topic_users
ADD CONSTRAINT topic_users_pkey PRIMARY KEY (id);
--
-- Name: topics topics_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.topics
ADD CONSTRAINT topics_pkey PRIMARY KEY (id);
--
-- Name: translation_overrides translation_overrides_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.translation_overrides
ADD CONSTRAINT translation_overrides_pkey PRIMARY KEY (id);
--
-- Name: uploads uploads_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.uploads
ADD CONSTRAINT uploads_pkey PRIMARY KEY (id);
--
-- Name: user_actions user_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_actions
ADD CONSTRAINT user_actions_pkey PRIMARY KEY (id);
--
-- Name: user_api_key_scopes user_api_key_scopes_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_api_key_scopes
ADD CONSTRAINT user_api_key_scopes_pkey PRIMARY KEY (id);
--
-- Name: user_api_keys user_api_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_api_keys
ADD CONSTRAINT user_api_keys_pkey PRIMARY KEY (id);
--
-- Name: user_archived_messages user_archived_messages_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_archived_messages
ADD CONSTRAINT user_archived_messages_pkey PRIMARY KEY (id);
--
-- Name: user_associated_accounts user_associated_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_associated_accounts
ADD CONSTRAINT user_associated_accounts_pkey PRIMARY KEY (id);
--
-- Name: user_auth_token_logs user_auth_token_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_auth_token_logs
ADD CONSTRAINT user_auth_token_logs_pkey PRIMARY KEY (id);
--
-- Name: user_auth_tokens user_auth_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_auth_tokens
ADD CONSTRAINT user_auth_tokens_pkey PRIMARY KEY (id);
--
-- Name: user_avatars user_avatars_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_avatars
ADD CONSTRAINT user_avatars_pkey PRIMARY KEY (id);
--
-- Name: user_badges user_badges_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_badges
ADD CONSTRAINT user_badges_pkey PRIMARY KEY (id);
--
-- Name: user_custom_fields user_custom_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_custom_fields
ADD CONSTRAINT user_custom_fields_pkey PRIMARY KEY (id);
--
-- Name: user_emails user_emails_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_emails
ADD CONSTRAINT user_emails_pkey PRIMARY KEY (id);
--
-- Name: user_exports user_exports_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_exports
ADD CONSTRAINT user_exports_pkey PRIMARY KEY (id);
--
-- Name: user_field_options user_field_options_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_field_options
ADD CONSTRAINT user_field_options_pkey PRIMARY KEY (id);
--
-- Name: user_fields user_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_fields
ADD CONSTRAINT user_fields_pkey PRIMARY KEY (id);
--
-- Name: user_histories user_histories_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_histories
ADD CONSTRAINT user_histories_pkey PRIMARY KEY (id);
--
-- Name: user_ip_address_histories user_ip_address_histories_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_ip_address_histories
ADD CONSTRAINT user_ip_address_histories_pkey PRIMARY KEY (id);
--
-- Name: user_notification_schedules user_notification_schedules_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_notification_schedules
ADD CONSTRAINT user_notification_schedules_pkey PRIMARY KEY (id);
--
-- Name: user_open_ids user_open_ids_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_open_ids
ADD CONSTRAINT user_open_ids_pkey PRIMARY KEY (id);
--
-- Name: user_profile_views user_profile_views_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_profile_views
ADD CONSTRAINT user_profile_views_pkey PRIMARY KEY (id);
--
-- Name: user_profiles user_profiles_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_profiles
ADD CONSTRAINT user_profiles_pkey PRIMARY KEY (user_id);
--
-- Name: user_second_factors user_second_factors_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_second_factors
ADD CONSTRAINT user_second_factors_pkey PRIMARY KEY (id);
--
-- Name: user_security_keys user_security_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_security_keys
ADD CONSTRAINT user_security_keys_pkey PRIMARY KEY (id);
--
-- Name: user_stats user_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_stats
ADD CONSTRAINT user_stats_pkey PRIMARY KEY (user_id);
--
-- Name: user_uploads user_uploads_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_uploads
ADD CONSTRAINT user_uploads_pkey PRIMARY KEY (id);
--
-- Name: user_visits user_visits_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_visits
ADD CONSTRAINT user_visits_pkey PRIMARY KEY (id);
--
-- Name: user_warnings user_warnings_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_warnings
ADD CONSTRAINT user_warnings_pkey PRIMARY KEY (id);
--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
--
-- Name: user_search_data users_search_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_search_data
ADD CONSTRAINT users_search_pkey PRIMARY KEY (user_id);
--
-- Name: watched_words watched_words_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.watched_words
ADD CONSTRAINT watched_words_pkey PRIMARY KEY (id);
--
-- Name: web_crawler_requests web_crawler_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.web_crawler_requests
ADD CONSTRAINT web_crawler_requests_pkey PRIMARY KEY (id);
--
-- Name: web_hook_event_types web_hook_event_types_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.web_hook_event_types
ADD CONSTRAINT web_hook_event_types_pkey PRIMARY KEY (id);
--
-- Name: web_hook_events web_hook_events_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.web_hook_events
ADD CONSTRAINT web_hook_events_pkey PRIMARY KEY (id);
--
-- Name: web_hooks web_hooks_pkey; Type: CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.web_hooks
ADD CONSTRAINT web_hooks_pkey PRIMARY KEY (id);
--
-- Name: associated_accounts_provider_uid; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX associated_accounts_provider_uid ON public.user_associated_accounts USING btree (provider_name, provider_uid);
--
-- Name: associated_accounts_provider_user; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX associated_accounts_provider_user ON public.user_associated_accounts USING btree (provider_name, user_id);
--
-- Name: by_link; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX by_link ON public.topic_link_clicks USING btree (topic_link_id);
--
-- Name: cat_featured_threads; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX cat_featured_threads ON public.category_featured_topics USING btree (category_id, topic_id);
--
-- Name: directory_column_index; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX directory_column_index ON public.directory_columns USING btree (enabled, "position", user_field_id);
--
-- Name: discourse_post_event_invitees_post_id_user_id_idx; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX discourse_post_event_invitees_post_id_user_id_idx ON public.discourse_post_event_invitees USING btree (post_id, user_id);
--
-- Name: idx_category_tag_groups_ix1; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_category_tag_groups_ix1 ON public.category_tag_groups USING btree (category_id, tag_group_id);
--
-- Name: idx_category_tags_ix1; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_category_tags_ix1 ON public.category_tags USING btree (category_id, tag_id);
--
-- Name: idx_category_tags_ix2; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_category_tags_ix2 ON public.category_tags USING btree (tag_id, category_id);
--
-- Name: idx_category_users_category_id_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_category_users_category_id_user_id ON public.category_users USING btree (category_id, user_id);
--
-- Name: idx_category_users_user_id_category_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_category_users_user_id_category_id ON public.category_users USING btree (user_id, category_id);
--
-- Name: idx_email_change_requests_on_requested_by; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_email_change_requests_on_requested_by ON public.email_change_requests USING btree (requested_by_user_id);
--
-- Name: idx_group_category_notification_defaults_unique; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_group_category_notification_defaults_unique ON public.group_category_notification_defaults USING btree (group_id, category_id);
--
-- Name: idx_group_tag_notification_defaults_unique; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_group_tag_notification_defaults_unique ON public.group_tag_notification_defaults USING btree (group_id, tag_id);
--
-- Name: idx_notifications_speedup_unread_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_notifications_speedup_unread_count ON public.notifications USING btree (user_id, notification_type) WHERE (NOT read);
--
-- Name: idx_post_custom_fields_akismet; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_post_custom_fields_akismet ON public.post_custom_fields USING btree (post_id) WHERE (((name)::text = 'AKISMET_STATE'::text) AND (value = 'needs_review'::text));
--
-- Name: idx_posts_created_at_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_posts_created_at_topic_id ON public.posts USING btree (created_at, topic_id) WHERE (deleted_at IS NULL);
--
-- Name: idx_posts_deleted_posts; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_posts_deleted_posts ON public.posts USING btree (topic_id, post_number) WHERE (deleted_at IS NOT NULL);
--
-- Name: idx_posts_user_id_deleted_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_posts_user_id_deleted_at ON public.posts USING btree (user_id) WHERE (deleted_at IS NULL);
--
-- Name: idx_search_category; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_search_category ON public.category_search_data USING gin (search_data);
--
-- Name: idx_search_post; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_search_post ON public.post_search_data USING gin (search_data);
--
-- Name: idx_search_tag; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_search_tag ON public.tag_search_data USING gin (search_data);
--
-- Name: idx_search_topic; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_search_topic ON public.topic_search_data USING gin (search_data);
--
-- Name: idx_search_user; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_search_user ON public.user_search_data USING gin (search_data);
--
-- Name: idx_tag_users_ix1; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_tag_users_ix1 ON public.tag_users USING btree (user_id, tag_id, notification_level);
--
-- Name: idx_tag_users_ix2; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_tag_users_ix2 ON public.tag_users USING btree (tag_id, user_id, notification_level);
--
-- Name: idx_topic_custom_fields_topic_post_event_ends_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_topic_custom_fields_topic_post_event_ends_at ON public.topic_custom_fields USING btree (name, topic_id) WHERE ((name)::text = 'TopicEventEndsAt'::text);
--
-- Name: idx_topic_custom_fields_topic_post_event_starts_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_topic_custom_fields_topic_post_event_starts_at ON public.topic_custom_fields USING btree (name, topic_id) WHERE ((name)::text = 'TopicEventStartsAt'::text);
--
-- Name: idx_topic_id_public_type_deleted_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_topic_id_public_type_deleted_at ON public.topic_timers USING btree (topic_id) WHERE ((public_type = true) AND (deleted_at IS NULL));
--
-- Name: idx_topics_front_page; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_topics_front_page ON public.topics USING btree (deleted_at, visible, archetype, category_id, id);
--
-- Name: idx_topics_user_id_deleted_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_topics_user_id_deleted_at ON public.topics USING btree (user_id) WHERE (deleted_at IS NULL);
--
-- Name: idx_unique_actions; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_unique_actions ON public.post_actions USING btree (user_id, post_action_type_id, post_id, targets_topic) WHERE ((deleted_at IS NULL) AND (disagreed_at IS NULL) AND (deferred_at IS NULL));
--
-- Name: idx_unique_flags; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_unique_flags ON public.post_actions USING btree (user_id, post_id, targets_topic) WHERE ((deleted_at IS NULL) AND (disagreed_at IS NULL) AND (deferred_at IS NULL) AND (post_action_type_id = ANY (ARRAY[3, 4, 7, 8])));
--
-- Name: idx_unique_post_uploads; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_unique_post_uploads ON public.post_uploads USING btree (post_id, upload_id);
--
-- Name: idx_unique_rows; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_unique_rows ON public.user_actions USING btree (action_type, user_id, target_topic_id, target_post_id, acting_user_id);
--
-- Name: idx_uploads_on_verification_status; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_uploads_on_verification_status ON public.uploads USING btree (verification_status);
--
-- Name: idx_user_actions_speed_up_user_all; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_user_actions_speed_up_user_all ON public.user_actions USING btree (user_id, created_at, action_type);
--
-- Name: idx_user_custom_fields_on_holiday; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_user_custom_fields_on_holiday ON public.user_custom_fields USING btree (name, user_id) WHERE ((name)::text = 'on_holiday'::text);
--
-- Name: idx_users_admin; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_users_admin ON public.users USING btree (id) WHERE admin;
--
-- Name: idx_users_moderator; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idx_users_moderator ON public.users USING btree (id) WHERE moderator;
--
-- Name: idx_web_hook_event_types_hooks_on_ids; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX idx_web_hook_event_types_hooks_on_ids ON public.web_hook_event_types_hooks USING btree (web_hook_event_type_id, web_hook_id);
--
-- Name: idxtopicslug; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX idxtopicslug ON public.topics USING btree (slug) WHERE ((deleted_at IS NULL) AND (slug IS NOT NULL));
--
-- Name: index_allowed_pm_users_on_allowed_pm_user_id_and_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_allowed_pm_users_on_allowed_pm_user_id_and_user_id ON public.allowed_pm_users USING btree (allowed_pm_user_id, user_id);
--
-- Name: index_allowed_pm_users_on_user_id_and_allowed_pm_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_allowed_pm_users_on_user_id_and_allowed_pm_user_id ON public.allowed_pm_users USING btree (user_id, allowed_pm_user_id);
--
-- Name: index_anonymous_users_on_master_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_anonymous_users_on_master_user_id ON public.anonymous_users USING btree (master_user_id) WHERE active;
--
-- Name: index_anonymous_users_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_anonymous_users_on_user_id ON public.anonymous_users USING btree (user_id);
--
-- Name: index_api_key_scopes_on_api_key_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_api_key_scopes_on_api_key_id ON public.api_key_scopes USING btree (api_key_id);
--
-- Name: index_api_keys_on_key_hash; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_api_keys_on_key_hash ON public.api_keys USING btree (key_hash);
--
-- Name: index_api_keys_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_api_keys_on_user_id ON public.api_keys USING btree (user_id);
--
-- Name: index_application_requests_on_date_and_req_type; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_application_requests_on_date_and_req_type ON public.application_requests USING btree (date, req_type);
--
-- Name: index_backup_draft_posts_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_backup_draft_posts_on_post_id ON public.backup_draft_posts USING btree (post_id);
--
-- Name: index_backup_draft_posts_on_user_id_and_key; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_backup_draft_posts_on_user_id_and_key ON public.backup_draft_posts USING btree (user_id, key);
--
-- Name: index_backup_draft_topics_on_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_backup_draft_topics_on_topic_id ON public.backup_draft_topics USING btree (topic_id);
--
-- Name: index_backup_draft_topics_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_backup_draft_topics_on_user_id ON public.backup_draft_topics USING btree (user_id);
--
-- Name: index_badge_types_on_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_badge_types_on_name ON public.badge_types USING btree (name);
--
-- Name: index_badges_on_badge_type_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_badges_on_badge_type_id ON public.badges USING btree (badge_type_id);
--
-- Name: index_badges_on_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_badges_on_name ON public.badges USING btree (name);
--
-- Name: index_bookmarks_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_bookmarks_on_post_id ON public.bookmarks USING btree (post_id);
--
-- Name: index_bookmarks_on_reminder_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_bookmarks_on_reminder_at ON public.bookmarks USING btree (reminder_at);
--
-- Name: index_bookmarks_on_reminder_set_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_bookmarks_on_reminder_set_at ON public.bookmarks USING btree (reminder_set_at);
--
-- Name: index_bookmarks_on_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_bookmarks_on_topic_id ON public.bookmarks USING btree (topic_id);
--
-- Name: index_bookmarks_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_bookmarks_on_user_id ON public.bookmarks USING btree (user_id);
--
-- Name: index_bookmarks_on_user_id_and_post_id_and_for_topic; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_bookmarks_on_user_id_and_post_id_and_for_topic ON public.bookmarks USING btree (user_id, post_id, for_topic);
--
-- Name: index_calendar_events_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_calendar_events_on_post_id ON public.calendar_events USING btree (post_id);
--
-- Name: index_calendar_events_on_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_calendar_events_on_topic_id ON public.calendar_events USING btree (topic_id);
--
-- Name: index_calendar_events_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_calendar_events_on_user_id ON public.calendar_events USING btree (user_id);
--
-- Name: index_categories_on_email_in; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_categories_on_email_in ON public.categories USING btree (email_in);
--
-- Name: index_categories_on_reviewable_by_group_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_categories_on_reviewable_by_group_id ON public.categories USING btree (reviewable_by_group_id);
--
-- Name: index_categories_on_search_priority; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_categories_on_search_priority ON public.categories USING btree (search_priority);
--
-- Name: index_categories_on_topic_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_categories_on_topic_count ON public.categories USING btree (topic_count);
--
-- Name: index_categories_web_hooks_on_web_hook_id_and_category_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_categories_web_hooks_on_web_hook_id_and_category_id ON public.categories_web_hooks USING btree (web_hook_id, category_id);
--
-- Name: index_category_custom_fields_on_category_id_and_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_category_custom_fields_on_category_id_and_name ON public.category_custom_fields USING btree (category_id, name);
--
-- Name: index_category_featured_topics_on_category_id_and_rank; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_category_featured_topics_on_category_id_and_rank ON public.category_featured_topics USING btree (category_id, rank);
--
-- Name: index_category_groups_on_group_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_category_groups_on_group_id ON public.category_groups USING btree (group_id);
--
-- Name: index_category_tag_stats_on_category_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_category_tag_stats_on_category_id ON public.category_tag_stats USING btree (category_id);
--
-- Name: index_category_tag_stats_on_category_id_and_tag_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_category_tag_stats_on_category_id_and_tag_id ON public.category_tag_stats USING btree (category_id, tag_id);
--
-- Name: index_category_tag_stats_on_category_id_and_topic_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_category_tag_stats_on_category_id_and_topic_count ON public.category_tag_stats USING btree (category_id, topic_count);
--
-- Name: index_category_tag_stats_on_tag_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_category_tag_stats_on_tag_id ON public.category_tag_stats USING btree (tag_id);
--
-- Name: index_category_users_on_user_id_and_last_seen_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_category_users_on_user_id_and_last_seen_at ON public.category_users USING btree (user_id, last_seen_at);
--
-- Name: index_child_themes_on_child_theme_id_and_parent_theme_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_child_themes_on_child_theme_id_and_parent_theme_id ON public.child_themes USING btree (child_theme_id, parent_theme_id);
--
-- Name: index_child_themes_on_parent_theme_id_and_child_theme_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_child_themes_on_parent_theme_id_and_child_theme_id ON public.child_themes USING btree (parent_theme_id, child_theme_id);
--
-- Name: index_color_scheme_colors_on_color_scheme_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_color_scheme_colors_on_color_scheme_id ON public.color_scheme_colors USING btree (color_scheme_id);
--
-- Name: index_custom_emojis_on_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_custom_emojis_on_name ON public.custom_emojis USING btree (name);
--
-- Name: index_developers_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_developers_on_user_id ON public.developers USING btree (user_id);
--
-- Name: index_directory_items_on_days_visited; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_directory_items_on_days_visited ON public.directory_items USING btree (days_visited);
--
-- Name: index_directory_items_on_likes_given; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_directory_items_on_likes_given ON public.directory_items USING btree (likes_given);
--
-- Name: index_directory_items_on_likes_received; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_directory_items_on_likes_received ON public.directory_items USING btree (likes_received);
--
-- Name: index_directory_items_on_period_type_and_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_directory_items_on_period_type_and_user_id ON public.directory_items USING btree (period_type, user_id);
--
-- Name: index_directory_items_on_post_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_directory_items_on_post_count ON public.directory_items USING btree (post_count);
--
-- Name: index_directory_items_on_posts_read; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_directory_items_on_posts_read ON public.directory_items USING btree (posts_read);
--
-- Name: index_directory_items_on_topic_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_directory_items_on_topic_count ON public.directory_items USING btree (topic_count);
--
-- Name: index_directory_items_on_topics_entered; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_directory_items_on_topics_entered ON public.directory_items USING btree (topics_entered);
--
-- Name: index_discourse_calendar_post_event_dates_on_event_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_discourse_calendar_post_event_dates_on_event_id ON public.discourse_calendar_post_event_dates USING btree (event_id);
--
-- Name: index_discourse_calendar_post_event_dates_on_finished_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_discourse_calendar_post_event_dates_on_finished_at ON public.discourse_calendar_post_event_dates USING btree (finished_at);
--
-- Name: index_dismissed_topic_users_on_user_id_and_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_dismissed_topic_users_on_user_id_and_topic_id ON public.dismissed_topic_users USING btree (user_id, topic_id);
--
-- Name: index_do_not_disturb_timings_on_ends_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_do_not_disturb_timings_on_ends_at ON public.do_not_disturb_timings USING btree (ends_at);
--
-- Name: index_do_not_disturb_timings_on_scheduled; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_do_not_disturb_timings_on_scheduled ON public.do_not_disturb_timings USING btree (scheduled);
--
-- Name: index_do_not_disturb_timings_on_starts_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_do_not_disturb_timings_on_starts_at ON public.do_not_disturb_timings USING btree (starts_at);
--
-- Name: index_do_not_disturb_timings_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_do_not_disturb_timings_on_user_id ON public.do_not_disturb_timings USING btree (user_id);
--
-- Name: index_draft_sequences_on_user_id_and_draft_key; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_draft_sequences_on_user_id_and_draft_key ON public.draft_sequences USING btree (user_id, draft_key);
--
-- Name: index_drafts_on_user_id_and_draft_key; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_drafts_on_user_id_and_draft_key ON public.drafts USING btree (user_id, draft_key);
--
-- Name: index_email_change_requests_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_email_change_requests_on_user_id ON public.email_change_requests USING btree (user_id);
--
-- Name: index_email_logs_on_bounce_key; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_email_logs_on_bounce_key ON public.email_logs USING btree (bounce_key) WHERE (bounce_key IS NOT NULL);
--
-- Name: index_email_logs_on_bounced; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_email_logs_on_bounced ON public.email_logs USING btree (bounced);
--
-- Name: index_email_logs_on_created_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_email_logs_on_created_at ON public.email_logs USING btree (created_at DESC);
--
-- Name: index_email_logs_on_message_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_email_logs_on_message_id ON public.email_logs USING btree (message_id);
--
-- Name: index_email_logs_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_email_logs_on_post_id ON public.email_logs USING btree (post_id);
--
-- Name: index_email_logs_on_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_email_logs_on_topic_id ON public.email_logs USING btree (topic_id) WHERE (topic_id IS NOT NULL);
--
-- Name: index_email_logs_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_email_logs_on_user_id ON public.email_logs USING btree (user_id);
--
-- Name: index_email_tokens_on_token; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_email_tokens_on_token ON public.email_tokens USING btree (token);
--
-- Name: index_email_tokens_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_email_tokens_on_user_id ON public.email_tokens USING btree (user_id);
--
-- Name: index_external_upload_stubs_on_created_by_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_external_upload_stubs_on_created_by_id ON public.external_upload_stubs USING btree (created_by_id);
--
-- Name: index_external_upload_stubs_on_external_upload_identifier; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_external_upload_stubs_on_external_upload_identifier ON public.external_upload_stubs USING btree (external_upload_identifier);
--
-- Name: index_external_upload_stubs_on_key; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_external_upload_stubs_on_key ON public.external_upload_stubs USING btree (key);
--
-- Name: index_external_upload_stubs_on_status; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_external_upload_stubs_on_status ON public.external_upload_stubs USING btree (status);
--
-- Name: index_for_rebake_old; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_for_rebake_old ON public.posts USING btree (id DESC) WHERE (((baked_version IS NULL) OR (baked_version < 2)) AND (deleted_at IS NULL));
--
-- Name: index_given_daily_likes_on_limit_reached_and_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_given_daily_likes_on_limit_reached_and_user_id ON public.given_daily_likes USING btree (limit_reached, user_id);
--
-- Name: index_given_daily_likes_on_user_id_and_given_date; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_given_daily_likes_on_user_id_and_given_date ON public.given_daily_likes USING btree (user_id, given_date);
--
-- Name: index_group_archived_messages_on_group_id_and_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_group_archived_messages_on_group_id_and_topic_id ON public.group_archived_messages USING btree (group_id, topic_id);
--
-- Name: index_group_custom_fields_on_group_id_and_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_group_custom_fields_on_group_id_and_name ON public.group_custom_fields USING btree (group_id, name);
--
-- Name: index_group_histories_on_acting_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_group_histories_on_acting_user_id ON public.group_histories USING btree (acting_user_id);
--
-- Name: index_group_histories_on_action; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_group_histories_on_action ON public.group_histories USING btree (action);
--
-- Name: index_group_histories_on_group_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_group_histories_on_group_id ON public.group_histories USING btree (group_id);
--
-- Name: index_group_histories_on_target_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_group_histories_on_target_user_id ON public.group_histories USING btree (target_user_id);
--
-- Name: index_group_mentions_on_group_id_and_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_group_mentions_on_group_id_and_post_id ON public.group_mentions USING btree (group_id, post_id);
--
-- Name: index_group_mentions_on_post_id_and_group_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_group_mentions_on_post_id_and_group_id ON public.group_mentions USING btree (post_id, group_id);
--
-- Name: index_group_requests_on_group_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_group_requests_on_group_id ON public.group_requests USING btree (group_id);
--
-- Name: index_group_requests_on_group_id_and_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_group_requests_on_group_id_and_user_id ON public.group_requests USING btree (group_id, user_id);
--
-- Name: index_group_requests_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_group_requests_on_user_id ON public.group_requests USING btree (user_id);
--
-- Name: index_group_users_on_group_id_and_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_group_users_on_group_id_and_user_id ON public.group_users USING btree (group_id, user_id);
--
-- Name: index_group_users_on_user_id_and_group_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_group_users_on_user_id_and_group_id ON public.group_users USING btree (user_id, group_id);
--
-- Name: index_groups_on_incoming_email; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_groups_on_incoming_email ON public.groups USING btree (incoming_email);
--
-- Name: index_groups_on_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_groups_on_name ON public.groups USING btree (name);
--
-- Name: index_groups_web_hooks_on_web_hook_id_and_group_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_groups_web_hooks_on_web_hook_id_and_group_id ON public.groups_web_hooks USING btree (web_hook_id, group_id);
--
-- Name: index_ignored_users_on_ignored_user_id_and_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_ignored_users_on_ignored_user_id_and_user_id ON public.ignored_users USING btree (ignored_user_id, user_id);
--
-- Name: index_ignored_users_on_user_id_and_ignored_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_ignored_users_on_user_id_and_ignored_user_id ON public.ignored_users USING btree (user_id, ignored_user_id);
--
-- Name: index_imap_sync_logs_on_group_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_imap_sync_logs_on_group_id ON public.imap_sync_logs USING btree (group_id);
--
-- Name: index_imap_sync_logs_on_level; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_imap_sync_logs_on_level ON public.imap_sync_logs USING btree (level);
--
-- Name: index_incoming_domains_on_name_and_https_and_port; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_incoming_domains_on_name_and_https_and_port ON public.incoming_domains USING btree (name, https, port);
--
-- Name: index_incoming_emails_on_created_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_incoming_emails_on_created_at ON public.incoming_emails USING btree (created_at);
--
-- Name: index_incoming_emails_on_error; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_incoming_emails_on_error ON public.incoming_emails USING btree (error);
--
-- Name: index_incoming_emails_on_imap_group_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_incoming_emails_on_imap_group_id ON public.incoming_emails USING btree (imap_group_id);
--
-- Name: index_incoming_emails_on_imap_sync; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_incoming_emails_on_imap_sync ON public.incoming_emails USING btree (imap_sync);
--
-- Name: index_incoming_emails_on_message_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_incoming_emails_on_message_id ON public.incoming_emails USING btree (message_id);
--
-- Name: index_incoming_emails_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_incoming_emails_on_post_id ON public.incoming_emails USING btree (post_id);
--
-- Name: index_incoming_emails_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_incoming_emails_on_user_id ON public.incoming_emails USING btree (user_id) WHERE (user_id IS NOT NULL);
--
-- Name: index_incoming_links_on_created_at_and_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_incoming_links_on_created_at_and_user_id ON public.incoming_links USING btree (created_at, user_id);
--
-- Name: index_incoming_links_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_incoming_links_on_post_id ON public.incoming_links USING btree (post_id);
--
-- Name: index_incoming_referers_on_path_and_incoming_domain_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_incoming_referers_on_path_and_incoming_domain_id ON public.incoming_referers USING btree (path, incoming_domain_id);
--
-- Name: index_invited_groups_on_group_id_and_invite_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_invited_groups_on_group_id_and_invite_id ON public.invited_groups USING btree (group_id, invite_id);
--
-- Name: index_invited_users_on_invite_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_invited_users_on_invite_id ON public.invited_users USING btree (invite_id);
--
-- Name: index_invited_users_on_user_id_and_invite_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_invited_users_on_user_id_and_invite_id ON public.invited_users USING btree (user_id, invite_id) WHERE (user_id IS NOT NULL);
--
-- Name: index_invites_on_email_and_invited_by_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_invites_on_email_and_invited_by_id ON public.invites USING btree (email, invited_by_id);
--
-- Name: index_invites_on_emailed_status; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_invites_on_emailed_status ON public.invites USING btree (emailed_status);
--
-- Name: index_invites_on_invite_key; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_invites_on_invite_key ON public.invites USING btree (invite_key);
--
-- Name: index_invites_on_invited_by_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_invites_on_invited_by_id ON public.invites USING btree (invited_by_id);
--
-- Name: index_javascript_caches_on_digest; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_javascript_caches_on_digest ON public.javascript_caches USING btree (digest);
--
-- Name: index_javascript_caches_on_theme_field_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_javascript_caches_on_theme_field_id ON public.javascript_caches USING btree (theme_field_id);
--
-- Name: index_javascript_caches_on_theme_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_javascript_caches_on_theme_id ON public.javascript_caches USING btree (theme_id);
--
-- Name: index_linked_topics_on_topic_id_and_original_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_linked_topics_on_topic_id_and_original_topic_id ON public.linked_topics USING btree (topic_id, original_topic_id);
--
-- Name: index_linked_topics_on_topic_id_and_sequence; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_linked_topics_on_topic_id_and_sequence ON public.linked_topics USING btree (topic_id, sequence);
--
-- Name: index_message_bus_on_created_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_message_bus_on_created_at ON public.message_bus USING btree (created_at);
--
-- Name: index_muted_users_on_muted_user_id_and_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_muted_users_on_muted_user_id_and_user_id ON public.muted_users USING btree (muted_user_id, user_id);
--
-- Name: index_muted_users_on_user_id_and_muted_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_muted_users_on_user_id_and_muted_user_id ON public.muted_users USING btree (user_id, muted_user_id);
--
-- Name: index_notifications_on_post_action_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_notifications_on_post_action_id ON public.notifications USING btree (post_action_id);
--
-- Name: index_notifications_on_topic_id_and_post_number; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_notifications_on_topic_id_and_post_number ON public.notifications USING btree (topic_id, post_number);
--
-- Name: index_notifications_on_user_id_and_created_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_notifications_on_user_id_and_created_at ON public.notifications USING btree (user_id, created_at);
--
-- Name: index_notifications_on_user_id_and_topic_id_and_post_number; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_notifications_on_user_id_and_topic_id_and_post_number ON public.notifications USING btree (user_id, topic_id, post_number);
--
-- Name: index_notifications_read_or_not_high_priority; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_notifications_read_or_not_high_priority ON public.notifications USING btree (user_id, id DESC, read, topic_id) WHERE (read OR (high_priority = false));
--
-- Name: index_notifications_unique_unread_high_priority; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_notifications_unique_unread_high_priority ON public.notifications USING btree (user_id, id) WHERE ((NOT read) AND (high_priority = true));
--
-- Name: index_oauth2_user_infos_on_uid_and_provider; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_oauth2_user_infos_on_uid_and_provider ON public.oauth2_user_infos USING btree (uid, provider);
--
-- Name: index_oauth2_user_infos_on_user_id_and_provider; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_oauth2_user_infos_on_user_id_and_provider ON public.oauth2_user_infos USING btree (user_id, provider);
--
-- Name: index_onceoff_logs_on_job_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_onceoff_logs_on_job_name ON public.onceoff_logs USING btree (job_name);
--
-- Name: index_optimized_images_on_etag; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_optimized_images_on_etag ON public.optimized_images USING btree (etag);
--
-- Name: index_optimized_images_on_upload_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_optimized_images_on_upload_id ON public.optimized_images USING btree (upload_id);
--
-- Name: index_optimized_images_on_upload_id_and_width_and_height; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_optimized_images_on_upload_id_and_width_and_height ON public.optimized_images USING btree (upload_id, width, height);
--
-- Name: index_permalinks_on_url; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_permalinks_on_url ON public.permalinks USING btree (url);
--
-- Name: index_plugin_store_rows_on_plugin_name_and_key; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_plugin_store_rows_on_plugin_name_and_key ON public.plugin_store_rows USING btree (plugin_name, key);
--
-- Name: index_poll_options_on_poll_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_poll_options_on_poll_id ON public.poll_options USING btree (poll_id);
--
-- Name: index_poll_options_on_poll_id_and_digest; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_poll_options_on_poll_id_and_digest ON public.poll_options USING btree (poll_id, digest);
--
-- Name: index_poll_votes_on_poll_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_poll_votes_on_poll_id ON public.poll_votes USING btree (poll_id);
--
-- Name: index_poll_votes_on_poll_id_and_poll_option_id_and_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_poll_votes_on_poll_id_and_poll_option_id_and_user_id ON public.poll_votes USING btree (poll_id, poll_option_id, user_id);
--
-- Name: index_poll_votes_on_poll_option_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_poll_votes_on_poll_option_id ON public.poll_votes USING btree (poll_option_id);
--
-- Name: index_poll_votes_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_poll_votes_on_user_id ON public.poll_votes USING btree (user_id);
--
-- Name: index_polls_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_polls_on_post_id ON public.polls USING btree (post_id);
--
-- Name: index_polls_on_post_id_and_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_polls_on_post_id_and_name ON public.polls USING btree (post_id, name);
--
-- Name: index_post_actions_on_post_action_type_id_and_disagreed_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_actions_on_post_action_type_id_and_disagreed_at ON public.post_actions USING btree (post_action_type_id, disagreed_at) WHERE (disagreed_at IS NULL);
--
-- Name: index_post_actions_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_actions_on_post_id ON public.post_actions USING btree (post_id);
--
-- Name: index_post_actions_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_actions_on_user_id ON public.post_actions USING btree (user_id);
--
-- Name: index_post_actions_on_user_id_and_post_action_type_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_actions_on_user_id_and_post_action_type_id ON public.post_actions USING btree (user_id, post_action_type_id) WHERE (deleted_at IS NULL);
--
-- Name: index_post_custom_fields_on_name_and_value; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_custom_fields_on_name_and_value ON public.post_custom_fields USING btree (name, "left"(value, 200));
--
-- Name: index_post_custom_fields_on_notice; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_post_custom_fields_on_notice ON public.post_custom_fields USING btree (post_id) WHERE ((name)::text = 'notice'::text);
--
-- Name: index_post_custom_fields_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_post_custom_fields_on_post_id ON public.post_custom_fields USING btree (post_id) WHERE ((name)::text = 'missing uploads'::text);
--
-- Name: index_post_custom_fields_on_post_id_and_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_custom_fields_on_post_id_and_name ON public.post_custom_fields USING btree (post_id, name);
--
-- Name: index_post_details_on_post_id_and_key; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_post_details_on_post_id_and_key ON public.post_details USING btree (post_id, key);
--
-- Name: index_post_id_where_missing_uploads_ignored; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_post_id_where_missing_uploads_ignored ON public.post_custom_fields USING btree (post_id) WHERE ((name)::text = 'missing uploads ignored'::text);
--
-- Name: index_post_replies_on_post_id_and_reply_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_post_replies_on_post_id_and_reply_post_id ON public.post_replies USING btree (post_id, reply_post_id);
--
-- Name: index_post_replies_on_reply_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_replies_on_reply_post_id ON public.post_replies USING btree (reply_post_id);
--
-- Name: index_post_reply_keys_on_reply_key; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_post_reply_keys_on_reply_key ON public.post_reply_keys USING btree (reply_key);
--
-- Name: index_post_reply_keys_on_user_id_and_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_post_reply_keys_on_user_id_and_post_id ON public.post_reply_keys USING btree (user_id, post_id);
--
-- Name: index_post_revisions_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_revisions_on_post_id ON public.post_revisions USING btree (post_id);
--
-- Name: index_post_revisions_on_post_id_and_number; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_revisions_on_post_id_and_number ON public.post_revisions USING btree (post_id, number);
--
-- Name: index_post_revisions_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_revisions_on_user_id ON public.post_revisions USING btree (user_id);
--
-- Name: index_post_search_data_on_post_id_and_version_and_locale; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_search_data_on_post_id_and_version_and_locale ON public.post_search_data USING btree (post_id, version, locale);
--
-- Name: index_post_stats_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_stats_on_post_id ON public.post_stats USING btree (post_id);
--
-- Name: index_post_timings_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_timings_on_user_id ON public.post_timings USING btree (user_id);
--
-- Name: index_post_uploads_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_uploads_on_post_id ON public.post_uploads USING btree (post_id);
--
-- Name: index_post_uploads_on_upload_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_post_uploads_on_upload_id ON public.post_uploads USING btree (upload_id);
--
-- Name: index_posts_on_id_and_baked_version; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_posts_on_id_and_baked_version ON public.posts USING btree (id DESC, baked_version) WHERE (deleted_at IS NULL);
--
-- Name: index_posts_on_image_upload_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_posts_on_image_upload_id ON public.posts USING btree (image_upload_id);
--
-- Name: index_posts_on_reply_to_post_number; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_posts_on_reply_to_post_number ON public.posts USING btree (reply_to_post_number);
--
-- Name: index_posts_on_topic_id_and_percent_rank; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_posts_on_topic_id_and_percent_rank ON public.posts USING btree (topic_id, percent_rank);
--
-- Name: index_posts_on_topic_id_and_post_number; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_posts_on_topic_id_and_post_number ON public.posts USING btree (topic_id, post_number);
--
-- Name: index_posts_on_topic_id_and_sort_order; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_posts_on_topic_id_and_sort_order ON public.posts USING btree (topic_id, sort_order);
--
-- Name: index_posts_on_user_id_and_created_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_posts_on_user_id_and_created_at ON public.posts USING btree (user_id, created_at);
--
-- Name: index_posts_user_and_likes; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_posts_user_and_likes ON public.posts USING btree (user_id, like_count DESC, created_at DESC) WHERE (post_number > 1);
--
-- Name: index_published_pages_on_slug; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_published_pages_on_slug ON public.published_pages USING btree (slug);
--
-- Name: index_published_pages_on_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_published_pages_on_topic_id ON public.published_pages USING btree (topic_id);
--
-- Name: index_quoted_posts_on_post_id_and_quoted_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_quoted_posts_on_post_id_and_quoted_post_id ON public.quoted_posts USING btree (post_id, quoted_post_id);
--
-- Name: index_quoted_posts_on_quoted_post_id_and_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_quoted_posts_on_quoted_post_id_and_post_id ON public.quoted_posts USING btree (quoted_post_id, post_id);
--
-- Name: index_reviewable_claimed_topics_on_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_reviewable_claimed_topics_on_topic_id ON public.reviewable_claimed_topics USING btree (topic_id);
--
-- Name: index_reviewable_histories_on_created_by_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_reviewable_histories_on_created_by_id ON public.reviewable_histories USING btree (created_by_id);
--
-- Name: index_reviewable_histories_on_reviewable_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_reviewable_histories_on_reviewable_id ON public.reviewable_histories USING btree (reviewable_id);
--
-- Name: index_reviewable_scores_on_reviewable_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_reviewable_scores_on_reviewable_id ON public.reviewable_scores USING btree (reviewable_id);
--
-- Name: index_reviewable_scores_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_reviewable_scores_on_user_id ON public.reviewable_scores USING btree (user_id);
--
-- Name: index_reviewables_on_reviewable_by_group_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_reviewables_on_reviewable_by_group_id ON public.reviewables USING btree (reviewable_by_group_id);
--
-- Name: index_reviewables_on_status_and_created_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_reviewables_on_status_and_created_at ON public.reviewables USING btree (status, created_at);
--
-- Name: index_reviewables_on_status_and_score; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_reviewables_on_status_and_score ON public.reviewables USING btree (status, score);
--
-- Name: index_reviewables_on_status_and_type; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_reviewables_on_status_and_type ON public.reviewables USING btree (status, type);
--
-- Name: index_reviewables_on_target_id_where_post_type_eq_post; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_reviewables_on_target_id_where_post_type_eq_post ON public.reviewables USING btree (target_id) WHERE ((target_type)::text = 'Post'::text);
--
-- Name: index_reviewables_on_topic_id_and_status_and_created_by_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_reviewables_on_topic_id_and_status_and_created_by_id ON public.reviewables USING btree (topic_id, status, created_by_id);
--
-- Name: index_reviewables_on_type_and_target_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_reviewables_on_type_and_target_id ON public.reviewables USING btree (type, target_id);
--
-- Name: index_schema_migration_details_on_version; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_schema_migration_details_on_version ON public.schema_migration_details USING btree (version);
--
-- Name: index_screened_emails_on_email; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_screened_emails_on_email ON public.screened_emails USING btree (email);
--
-- Name: index_screened_emails_on_last_match_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_screened_emails_on_last_match_at ON public.screened_emails USING btree (last_match_at);
--
-- Name: index_screened_ip_addresses_on_ip_address; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_screened_ip_addresses_on_ip_address ON public.screened_ip_addresses USING btree (ip_address);
--
-- Name: index_screened_ip_addresses_on_last_match_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_screened_ip_addresses_on_last_match_at ON public.screened_ip_addresses USING btree (last_match_at);
--
-- Name: index_screened_urls_on_last_match_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_screened_urls_on_last_match_at ON public.screened_urls USING btree (last_match_at);
--
-- Name: index_screened_urls_on_url; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_screened_urls_on_url ON public.screened_urls USING btree (url);
--
-- Name: index_search_logs_on_created_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_search_logs_on_created_at ON public.search_logs USING btree (created_at);
--
-- Name: index_shared_drafts_on_category_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_shared_drafts_on_category_id ON public.shared_drafts USING btree (category_id);
--
-- Name: index_shared_drafts_on_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_shared_drafts_on_topic_id ON public.shared_drafts USING btree (topic_id);
--
-- Name: index_shelved_notifications_on_notification_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_shelved_notifications_on_notification_id ON public.shelved_notifications USING btree (notification_id);
--
-- Name: index_single_sign_on_records_on_external_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_single_sign_on_records_on_external_id ON public.single_sign_on_records USING btree (external_id);
--
-- Name: index_single_sign_on_records_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_single_sign_on_records_on_user_id ON public.single_sign_on_records USING btree (user_id);
--
-- Name: index_site_settings_on_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_site_settings_on_name ON public.site_settings USING btree (name);
--
-- Name: index_skipped_email_logs_on_created_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_skipped_email_logs_on_created_at ON public.skipped_email_logs USING btree (created_at);
--
-- Name: index_skipped_email_logs_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_skipped_email_logs_on_post_id ON public.skipped_email_logs USING btree (post_id);
--
-- Name: index_skipped_email_logs_on_reason_type; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_skipped_email_logs_on_reason_type ON public.skipped_email_logs USING btree (reason_type);
--
-- Name: index_skipped_email_logs_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_skipped_email_logs_on_user_id ON public.skipped_email_logs USING btree (user_id);
--
-- Name: index_stylesheet_cache_on_target_and_digest; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_stylesheet_cache_on_target_and_digest ON public.stylesheet_cache USING btree (target, digest);
--
-- Name: index_tag_group_memberships_on_tag_group_id_and_tag_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_tag_group_memberships_on_tag_group_id_and_tag_id ON public.tag_group_memberships USING btree (tag_group_id, tag_id);
--
-- Name: index_tag_group_permissions_on_group_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_tag_group_permissions_on_group_id ON public.tag_group_permissions USING btree (group_id);
--
-- Name: index_tag_group_permissions_on_tag_group_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_tag_group_permissions_on_tag_group_id ON public.tag_group_permissions USING btree (tag_group_id);
--
-- Name: index_tags_on_lower_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_tags_on_lower_name ON public.tags USING btree (lower((name)::text));
--
-- Name: index_tags_on_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_tags_on_name ON public.tags USING btree (name);
--
-- Name: index_theme_modifier_sets_on_theme_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_theme_modifier_sets_on_theme_id ON public.theme_modifier_sets USING btree (theme_id);
--
-- Name: index_theme_translation_overrides_on_theme_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_theme_translation_overrides_on_theme_id ON public.theme_translation_overrides USING btree (theme_id);
--
-- Name: index_themes_on_remote_theme_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_themes_on_remote_theme_id ON public.themes USING btree (remote_theme_id);
--
-- Name: index_top_topics_on_all_score; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_all_score ON public.top_topics USING btree (all_score);
--
-- Name: index_top_topics_on_daily_likes_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_daily_likes_count ON public.top_topics USING btree (daily_likes_count DESC);
--
-- Name: index_top_topics_on_daily_op_likes_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_daily_op_likes_count ON public.top_topics USING btree (daily_op_likes_count);
--
-- Name: index_top_topics_on_daily_posts_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_daily_posts_count ON public.top_topics USING btree (daily_posts_count DESC);
--
-- Name: index_top_topics_on_daily_score; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_daily_score ON public.top_topics USING btree (daily_score);
--
-- Name: index_top_topics_on_daily_views_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_daily_views_count ON public.top_topics USING btree (daily_views_count DESC);
--
-- Name: index_top_topics_on_monthly_likes_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_monthly_likes_count ON public.top_topics USING btree (monthly_likes_count DESC);
--
-- Name: index_top_topics_on_monthly_op_likes_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_monthly_op_likes_count ON public.top_topics USING btree (monthly_op_likes_count);
--
-- Name: index_top_topics_on_monthly_posts_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_monthly_posts_count ON public.top_topics USING btree (monthly_posts_count DESC);
--
-- Name: index_top_topics_on_monthly_score; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_monthly_score ON public.top_topics USING btree (monthly_score);
--
-- Name: index_top_topics_on_monthly_views_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_monthly_views_count ON public.top_topics USING btree (monthly_views_count DESC);
--
-- Name: index_top_topics_on_quarterly_likes_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_quarterly_likes_count ON public.top_topics USING btree (quarterly_likes_count);
--
-- Name: index_top_topics_on_quarterly_op_likes_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_quarterly_op_likes_count ON public.top_topics USING btree (quarterly_op_likes_count);
--
-- Name: index_top_topics_on_quarterly_posts_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_quarterly_posts_count ON public.top_topics USING btree (quarterly_posts_count);
--
-- Name: index_top_topics_on_quarterly_views_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_quarterly_views_count ON public.top_topics USING btree (quarterly_views_count);
--
-- Name: index_top_topics_on_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_top_topics_on_topic_id ON public.top_topics USING btree (topic_id);
--
-- Name: index_top_topics_on_weekly_likes_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_weekly_likes_count ON public.top_topics USING btree (weekly_likes_count DESC);
--
-- Name: index_top_topics_on_weekly_op_likes_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_weekly_op_likes_count ON public.top_topics USING btree (weekly_op_likes_count);
--
-- Name: index_top_topics_on_weekly_posts_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_weekly_posts_count ON public.top_topics USING btree (weekly_posts_count DESC);
--
-- Name: index_top_topics_on_weekly_score; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_weekly_score ON public.top_topics USING btree (weekly_score);
--
-- Name: index_top_topics_on_weekly_views_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_weekly_views_count ON public.top_topics USING btree (weekly_views_count DESC);
--
-- Name: index_top_topics_on_yearly_likes_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_yearly_likes_count ON public.top_topics USING btree (yearly_likes_count DESC);
--
-- Name: index_top_topics_on_yearly_op_likes_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_yearly_op_likes_count ON public.top_topics USING btree (yearly_op_likes_count);
--
-- Name: index_top_topics_on_yearly_posts_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_yearly_posts_count ON public.top_topics USING btree (yearly_posts_count DESC);
--
-- Name: index_top_topics_on_yearly_score; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_yearly_score ON public.top_topics USING btree (yearly_score);
--
-- Name: index_top_topics_on_yearly_views_count; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_top_topics_on_yearly_views_count ON public.top_topics USING btree (yearly_views_count DESC);
--
-- Name: index_topic_allowed_groups_on_group_id_and_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_topic_allowed_groups_on_group_id_and_topic_id ON public.topic_allowed_groups USING btree (group_id, topic_id);
--
-- Name: index_topic_allowed_groups_on_topic_id_and_group_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_topic_allowed_groups_on_topic_id_and_group_id ON public.topic_allowed_groups USING btree (topic_id, group_id);
--
-- Name: index_topic_allowed_users_on_topic_id_and_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_topic_allowed_users_on_topic_id_and_user_id ON public.topic_allowed_users USING btree (topic_id, user_id);
--
-- Name: index_topic_allowed_users_on_user_id_and_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_topic_allowed_users_on_user_id_and_topic_id ON public.topic_allowed_users USING btree (user_id, topic_id);
--
-- Name: index_topic_custom_fields_on_topic_id_and_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_custom_fields_on_topic_id_and_name ON public.topic_custom_fields USING btree (topic_id, name);
--
-- Name: index_topic_embeds_on_embed_url; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_topic_embeds_on_embed_url ON public.topic_embeds USING btree (embed_url);
--
-- Name: index_topic_groups_on_group_id_and_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_topic_groups_on_group_id_and_topic_id ON public.topic_groups USING btree (group_id, topic_id);
--
-- Name: index_topic_invites_on_invite_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_invites_on_invite_id ON public.topic_invites USING btree (invite_id);
--
-- Name: index_topic_invites_on_topic_id_and_invite_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_topic_invites_on_topic_id_and_invite_id ON public.topic_invites USING btree (topic_id, invite_id);
--
-- Name: index_topic_links_on_extension; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_links_on_extension ON public.topic_links USING btree (extension);
--
-- Name: index_topic_links_on_link_post_id_and_reflection; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_links_on_link_post_id_and_reflection ON public.topic_links USING btree (link_post_id, reflection);
--
-- Name: index_topic_links_on_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_links_on_post_id ON public.topic_links USING btree (post_id);
--
-- Name: index_topic_links_on_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_links_on_topic_id ON public.topic_links USING btree (topic_id);
--
-- Name: index_topic_links_on_user_and_clicks; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_links_on_user_and_clicks ON public.topic_links USING btree (user_id, clicks DESC, created_at DESC) WHERE ((NOT reflection) AND (NOT quote) AND (NOT internal));
--
-- Name: index_topic_links_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_links_on_user_id ON public.topic_links USING btree (user_id);
--
-- Name: index_topic_search_data_on_topic_id_and_version_and_locale; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_search_data_on_topic_id_and_version_and_locale ON public.topic_search_data USING btree (topic_id, version, locale);
--
-- Name: index_topic_tags_on_topic_id_and_tag_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_topic_tags_on_topic_id_and_tag_id ON public.topic_tags USING btree (topic_id, tag_id);
--
-- Name: index_topic_thumbnails_on_optimized_image_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_thumbnails_on_optimized_image_id ON public.topic_thumbnails USING btree (optimized_image_id);
--
-- Name: index_topic_thumbnails_on_upload_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_thumbnails_on_upload_id ON public.topic_thumbnails USING btree (upload_id);
--
-- Name: index_topic_timers_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_timers_on_user_id ON public.topic_timers USING btree (user_id);
--
-- Name: index_topic_users_on_topic_id_and_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_topic_users_on_topic_id_and_user_id ON public.topic_users USING btree (topic_id, user_id);
--
-- Name: index_topic_users_on_user_id_and_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_topic_users_on_user_id_and_topic_id ON public.topic_users USING btree (user_id, topic_id);
--
-- Name: index_topic_views_on_topic_id_and_viewed_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_views_on_topic_id_and_viewed_at ON public.topic_views USING btree (topic_id, viewed_at);
--
-- Name: index_topic_views_on_user_id_and_viewed_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_views_on_user_id_and_viewed_at ON public.topic_views USING btree (user_id, viewed_at);
--
-- Name: index_topic_views_on_viewed_at_and_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topic_views_on_viewed_at_and_topic_id ON public.topic_views USING btree (viewed_at, topic_id);
--
-- Name: index_topics_on_bannered_until; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topics_on_bannered_until ON public.topics USING btree (bannered_until) WHERE (bannered_until IS NOT NULL);
--
-- Name: index_topics_on_bumped_at_public; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topics_on_bumped_at_public ON public.topics USING btree (bumped_at) WHERE ((deleted_at IS NULL) AND ((archetype)::text <> 'private_message'::text));
--
-- Name: index_topics_on_created_at_and_visible; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topics_on_created_at_and_visible ON public.topics USING btree (created_at, visible) WHERE ((deleted_at IS NULL) AND ((archetype)::text <> 'private_message'::text));
--
-- Name: index_topics_on_id_and_deleted_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topics_on_id_and_deleted_at ON public.topics USING btree (id, deleted_at);
--
-- Name: index_topics_on_id_filtered_banner; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_topics_on_id_filtered_banner ON public.topics USING btree (id) WHERE (((archetype)::text = 'banner'::text) AND (deleted_at IS NULL));
--
-- Name: index_topics_on_image_upload_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topics_on_image_upload_id ON public.topics USING btree (image_upload_id);
--
-- Name: index_topics_on_lower_title; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topics_on_lower_title ON public.topics USING btree (lower((title)::text));
--
-- Name: index_topics_on_pinned_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topics_on_pinned_at ON public.topics USING btree (pinned_at) WHERE (pinned_at IS NOT NULL);
--
-- Name: index_topics_on_pinned_globally; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topics_on_pinned_globally ON public.topics USING btree (pinned_globally) WHERE pinned_globally;
--
-- Name: index_topics_on_pinned_until; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topics_on_pinned_until ON public.topics USING btree (pinned_until) WHERE (pinned_until IS NOT NULL);
--
-- Name: index_topics_on_timestamps_private; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topics_on_timestamps_private ON public.topics USING btree (bumped_at, created_at, updated_at) WHERE ((deleted_at IS NULL) AND ((archetype)::text = 'private_message'::text));
--
-- Name: index_topics_on_updated_at_public; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_topics_on_updated_at_public ON public.topics USING btree (updated_at, visible, highest_staff_post_number, highest_post_number, category_id, created_at, id) WHERE (((archetype)::text <> 'private_message'::text) AND (deleted_at IS NULL));
--
-- Name: index_translation_overrides_on_locale_and_translation_key; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_translation_overrides_on_locale_and_translation_key ON public.translation_overrides USING btree (locale, translation_key);
--
-- Name: index_unsubscribe_keys_on_created_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_unsubscribe_keys_on_created_at ON public.unsubscribe_keys USING btree (created_at);
--
-- Name: index_uploads_on_access_control_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_uploads_on_access_control_post_id ON public.uploads USING btree (access_control_post_id);
--
-- Name: index_uploads_on_etag; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_uploads_on_etag ON public.uploads USING btree (etag);
--
-- Name: index_uploads_on_extension; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_uploads_on_extension ON public.uploads USING btree (lower((extension)::text));
--
-- Name: index_uploads_on_id_and_url; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_uploads_on_id_and_url ON public.uploads USING btree (id, url);
--
-- Name: index_uploads_on_original_sha1; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_uploads_on_original_sha1 ON public.uploads USING btree (original_sha1);
--
-- Name: index_uploads_on_sha1; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_uploads_on_sha1 ON public.uploads USING btree (sha1);
--
-- Name: index_uploads_on_url; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_uploads_on_url ON public.uploads USING btree (url);
--
-- Name: index_uploads_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_uploads_on_user_id ON public.uploads USING btree (user_id);
--
-- Name: index_user_actions_on_acting_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_actions_on_acting_user_id ON public.user_actions USING btree (acting_user_id);
--
-- Name: index_user_actions_on_action_type_and_created_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_actions_on_action_type_and_created_at ON public.user_actions USING btree (action_type, created_at);
--
-- Name: index_user_actions_on_target_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_actions_on_target_post_id ON public.user_actions USING btree (target_post_id);
--
-- Name: index_user_actions_on_target_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_actions_on_target_user_id ON public.user_actions USING btree (target_user_id) WHERE (target_user_id IS NOT NULL);
--
-- Name: index_user_actions_on_user_id_and_action_type; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_actions_on_user_id_and_action_type ON public.user_actions USING btree (user_id, action_type);
--
-- Name: index_user_api_key_scopes_on_user_api_key_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_api_key_scopes_on_user_api_key_id ON public.user_api_key_scopes USING btree (user_api_key_id);
--
-- Name: index_user_api_keys_on_client_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_api_keys_on_client_id ON public.user_api_keys USING btree (client_id);
--
-- Name: index_user_api_keys_on_key_hash; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_api_keys_on_key_hash ON public.user_api_keys USING btree (key_hash);
--
-- Name: index_user_api_keys_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_api_keys_on_user_id ON public.user_api_keys USING btree (user_id);
--
-- Name: index_user_archived_messages_on_user_id_and_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_archived_messages_on_user_id_and_topic_id ON public.user_archived_messages USING btree (user_id, topic_id);
--
-- Name: index_user_auth_token_logs_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_auth_token_logs_on_user_id ON public.user_auth_token_logs USING btree (user_id);
--
-- Name: index_user_auth_tokens_on_auth_token; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_auth_tokens_on_auth_token ON public.user_auth_tokens USING btree (auth_token);
--
-- Name: index_user_auth_tokens_on_prev_auth_token; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_auth_tokens_on_prev_auth_token ON public.user_auth_tokens USING btree (prev_auth_token);
--
-- Name: index_user_auth_tokens_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_auth_tokens_on_user_id ON public.user_auth_tokens USING btree (user_id);
--
-- Name: index_user_avatars_on_custom_upload_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_avatars_on_custom_upload_id ON public.user_avatars USING btree (custom_upload_id);
--
-- Name: index_user_avatars_on_gravatar_upload_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_avatars_on_gravatar_upload_id ON public.user_avatars USING btree (gravatar_upload_id);
--
-- Name: index_user_avatars_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_avatars_on_user_id ON public.user_avatars USING btree (user_id);
--
-- Name: index_user_badges_on_badge_id_and_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_badges_on_badge_id_and_user_id ON public.user_badges USING btree (badge_id, user_id);
--
-- Name: index_user_badges_on_badge_id_and_user_id_and_post_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_badges_on_badge_id_and_user_id_and_post_id ON public.user_badges USING btree (badge_id, user_id, post_id) WHERE (post_id IS NOT NULL);
--
-- Name: index_user_badges_on_badge_id_and_user_id_and_seq; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_badges_on_badge_id_and_user_id_and_seq ON public.user_badges USING btree (badge_id, user_id, seq) WHERE (post_id IS NULL);
--
-- Name: index_user_badges_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_badges_on_user_id ON public.user_badges USING btree (user_id);
--
-- Name: index_user_custom_fields_on_user_id_and_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_custom_fields_on_user_id_and_name ON public.user_custom_fields USING btree (user_id, name);
--
-- Name: index_user_emails_on_email; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_emails_on_email ON public.user_emails USING btree (lower((email)::text));
--
-- Name: index_user_emails_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_emails_on_user_id ON public.user_emails USING btree (user_id);
--
-- Name: index_user_emails_on_user_id_and_primary; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_emails_on_user_id_and_primary ON public.user_emails USING btree (user_id, "primary") WHERE "primary";
--
-- Name: index_user_histories_on_acting_user_id_and_action_and_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_histories_on_acting_user_id_and_action_and_id ON public.user_histories USING btree (acting_user_id, action, id);
--
-- Name: index_user_histories_on_action_and_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_histories_on_action_and_id ON public.user_histories USING btree (action, id);
--
-- Name: index_user_histories_on_category_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_histories_on_category_id ON public.user_histories USING btree (category_id);
--
-- Name: index_user_histories_on_subject_and_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_histories_on_subject_and_id ON public.user_histories USING btree (subject, id);
--
-- Name: index_user_histories_on_target_user_id_and_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_histories_on_target_user_id_and_id ON public.user_histories USING btree (target_user_id, id);
--
-- Name: index_user_histories_on_topic_id_and_target_user_id_and_action; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_histories_on_topic_id_and_target_user_id_and_action ON public.user_histories USING btree (topic_id, target_user_id, action);
--
-- Name: index_user_ip_address_histories_on_user_id_and_ip_address; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_ip_address_histories_on_user_id_and_ip_address ON public.user_ip_address_histories USING btree (user_id, ip_address);
--
-- Name: index_user_notification_schedules_on_enabled; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_notification_schedules_on_enabled ON public.user_notification_schedules USING btree (enabled);
--
-- Name: index_user_notification_schedules_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_notification_schedules_on_user_id ON public.user_notification_schedules USING btree (user_id);
--
-- Name: index_user_open_ids_on_url; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_open_ids_on_url ON public.user_open_ids USING btree (url);
--
-- Name: index_user_options_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_options_on_user_id ON public.user_options USING btree (user_id);
--
-- Name: index_user_options_on_user_id_and_default_calendar; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_options_on_user_id_and_default_calendar ON public.user_options USING btree (user_id, default_calendar);
--
-- Name: index_user_profile_views_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_profile_views_on_user_id ON public.user_profile_views USING btree (user_id);
--
-- Name: index_user_profile_views_on_user_profile_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_profile_views_on_user_profile_id ON public.user_profile_views USING btree (user_profile_id);
--
-- Name: index_user_profiles_on_bio_cooked_version; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_profiles_on_bio_cooked_version ON public.user_profiles USING btree (bio_cooked_version);
--
-- Name: index_user_profiles_on_card_background_upload_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_profiles_on_card_background_upload_id ON public.user_profiles USING btree (card_background_upload_id);
--
-- Name: index_user_profiles_on_granted_title_badge_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_profiles_on_granted_title_badge_id ON public.user_profiles USING btree (granted_title_badge_id);
--
-- Name: index_user_profiles_on_profile_background_upload_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_profiles_on_profile_background_upload_id ON public.user_profiles USING btree (profile_background_upload_id);
--
-- Name: index_user_second_factors_on_method_and_enabled; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_second_factors_on_method_and_enabled ON public.user_second_factors USING btree (method, enabled);
--
-- Name: index_user_second_factors_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_second_factors_on_user_id ON public.user_second_factors USING btree (user_id);
--
-- Name: index_user_security_keys_on_credential_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_security_keys_on_credential_id ON public.user_security_keys USING btree (credential_id);
--
-- Name: index_user_security_keys_on_factor_type; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_security_keys_on_factor_type ON public.user_security_keys USING btree (factor_type);
--
-- Name: index_user_security_keys_on_factor_type_and_enabled; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_security_keys_on_factor_type_and_enabled ON public.user_security_keys USING btree (factor_type, enabled);
--
-- Name: index_user_security_keys_on_last_used; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_security_keys_on_last_used ON public.user_security_keys USING btree (last_used);
--
-- Name: index_user_security_keys_on_public_key; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_security_keys_on_public_key ON public.user_security_keys USING btree (public_key);
--
-- Name: index_user_security_keys_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_security_keys_on_user_id ON public.user_security_keys USING btree (user_id);
--
-- Name: index_user_uploads_on_upload_id_and_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_uploads_on_upload_id_and_user_id ON public.user_uploads USING btree (upload_id, user_id);
--
-- Name: index_user_uploads_on_user_id_and_upload_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_uploads_on_user_id_and_upload_id ON public.user_uploads USING btree (user_id, upload_id);
--
-- Name: index_user_visits_on_user_id_and_visited_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_visits_on_user_id_and_visited_at ON public.user_visits USING btree (user_id, visited_at);
--
-- Name: index_user_visits_on_user_id_and_visited_at_and_time_read; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_visits_on_user_id_and_visited_at_and_time_read ON public.user_visits USING btree (user_id, visited_at, time_read);
--
-- Name: index_user_visits_on_visited_at_and_mobile; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_visits_on_visited_at_and_mobile ON public.user_visits USING btree (visited_at, mobile);
--
-- Name: index_user_warnings_on_topic_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_user_warnings_on_topic_id ON public.user_warnings USING btree (topic_id);
--
-- Name: index_user_warnings_on_user_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_user_warnings_on_user_id ON public.user_warnings USING btree (user_id);
--
-- Name: index_users_on_last_posted_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_users_on_last_posted_at ON public.users USING btree (last_posted_at);
--
-- Name: index_users_on_last_seen_at; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_users_on_last_seen_at ON public.users USING btree (last_seen_at);
--
-- Name: index_users_on_secure_identifier; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_users_on_secure_identifier ON public.users USING btree (secure_identifier);
--
-- Name: index_users_on_uploaded_avatar_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_users_on_uploaded_avatar_id ON public.users USING btree (uploaded_avatar_id);
--
-- Name: index_users_on_username; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_users_on_username ON public.users USING btree (username);
--
-- Name: index_users_on_username_lower; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_users_on_username_lower ON public.users USING btree (username_lower);
--
-- Name: index_watched_words_on_action_and_word; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_watched_words_on_action_and_word ON public.watched_words USING btree (action, word);
--
-- Name: index_web_crawler_requests_on_date_and_user_agent; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX index_web_crawler_requests_on_date_and_user_agent ON public.web_crawler_requests USING btree (date, user_agent);
--
-- Name: index_web_hook_events_on_web_hook_id; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX index_web_hook_events_on_web_hook_id ON public.web_hook_events USING btree (web_hook_id);
--
-- Name: post_custom_field_broken_images_idx; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX post_custom_field_broken_images_idx ON public.post_custom_fields USING btree (post_id) WHERE ((name)::text = 'broken_images'::text);
--
-- Name: post_custom_field_downloaded_images_idx; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX post_custom_field_downloaded_images_idx ON public.post_custom_fields USING btree (post_id) WHERE ((name)::text = 'downloaded_images'::text);
--
-- Name: post_custom_field_large_images_idx; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX post_custom_field_large_images_idx ON public.post_custom_fields USING btree (post_id) WHERE ((name)::text = 'large_images'::text);
--
-- Name: post_timings_unique; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX post_timings_unique ON public.post_timings USING btree (topic_id, post_number, user_id);
--
-- Name: theme_field_unique_index; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX theme_field_unique_index ON public.theme_fields USING btree (theme_id, target_id, type_id, name);
--
-- Name: theme_translation_overrides_unique; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX theme_translation_overrides_unique ON public.theme_translation_overrides USING btree (theme_id, locale, translation_key);
--
-- Name: topic_custom_fields_value_key_idx; Type: INDEX; Schema: public; Owner: falco
--
CREATE INDEX topic_custom_fields_value_key_idx ON public.topic_custom_fields USING btree (value, name) WHERE ((value IS NOT NULL) AND (char_length(value) < 400));
--
-- Name: uniq_ip_or_user_id_topic_views; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX uniq_ip_or_user_id_topic_views ON public.topic_views USING btree (user_id, ip_address, topic_id);
--
-- Name: unique_index_categories_on_name; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX unique_index_categories_on_name ON public.categories USING btree (COALESCE(parent_category_id, '-1'::integer), name);
--
-- Name: unique_index_categories_on_slug; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX unique_index_categories_on_slug ON public.categories USING btree (COALESCE(parent_category_id, '-1'::integer), lower((slug)::text)) WHERE ((slug)::text <> ''::text);
--
-- Name: unique_post_links; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX unique_post_links ON public.topic_links USING btree (topic_id, post_id, url);
--
-- Name: unique_profile_view_user_or_ip; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX unique_profile_view_user_or_ip ON public.user_profile_views USING btree (viewed_at, user_id, ip_address, user_profile_id);
--
-- Name: unique_topic_thumbnails; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX unique_topic_thumbnails ON public.topic_thumbnails USING btree (upload_id, max_width, max_height);
--
-- Name: web_hooks_tags; Type: INDEX; Schema: public; Owner: falco
--
CREATE UNIQUE INDEX web_hooks_tags ON public.tags_web_hooks USING btree (web_hook_id, tag_id);
--
-- Name: bookmarks bookmarks_reminder_type_readonly; Type: TRIGGER; Schema: public; Owner: falco
--
CREATE TRIGGER bookmarks_reminder_type_readonly BEFORE INSERT OR UPDATE OF reminder_type ON public.bookmarks FOR EACH ROW WHEN ((new.reminder_type IS NOT NULL)) EXECUTE FUNCTION discourse_functions.raise_bookmarks_reminder_type_readonly();
--
-- Name: bookmarks bookmarks_topic_id_readonly; Type: TRIGGER; Schema: public; Owner: falco
--
CREATE TRIGGER bookmarks_topic_id_readonly BEFORE INSERT OR UPDATE OF topic_id ON public.bookmarks FOR EACH ROW WHEN ((new.topic_id IS NOT NULL)) EXECUTE FUNCTION discourse_functions.raise_bookmarks_topic_id_readonly();
--
-- Name: invites invites_redeemed_at_readonly; Type: TRIGGER; Schema: public; Owner: falco
--
CREATE TRIGGER invites_redeemed_at_readonly BEFORE INSERT OR UPDATE OF redeemed_at ON public.invites FOR EACH ROW WHEN ((new.redeemed_at IS NOT NULL)) EXECUTE FUNCTION discourse_functions.raise_invites_redeemed_at_readonly();
--
-- Name: invites invites_user_id_readonly; Type: TRIGGER; Schema: public; Owner: falco
--
CREATE TRIGGER invites_user_id_readonly BEFORE INSERT OR UPDATE OF user_id ON public.invites FOR EACH ROW WHEN ((new.user_id IS NOT NULL)) EXECUTE FUNCTION discourse_functions.raise_invites_user_id_readonly();
--
-- Name: user_api_keys user_api_keys_scopes_readonly; Type: TRIGGER; Schema: public; Owner: falco
--
CREATE TRIGGER user_api_keys_scopes_readonly BEFORE INSERT OR UPDATE OF scopes ON public.user_api_keys FOR EACH ROW WHEN ((new.scopes IS NOT NULL)) EXECUTE FUNCTION discourse_functions.raise_user_api_keys_scopes_readonly();
--
-- Name: user_profiles fk_rails_1d362f2e97; Type: FK CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_profiles
ADD CONSTRAINT fk_rails_1d362f2e97 FOREIGN KEY (profile_background_upload_id) REFERENCES public.uploads(id);
--
-- Name: user_profiles fk_rails_38ea484ed4; Type: FK CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_profiles
ADD CONSTRAINT fk_rails_38ea484ed4 FOREIGN KEY (granted_title_badge_id) REFERENCES public.badges(id);
--
-- Name: javascript_caches fk_rails_58f94aecc4; Type: FK CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.javascript_caches
ADD CONSTRAINT fk_rails_58f94aecc4 FOREIGN KEY (theme_id) REFERENCES public.themes(id) ON DELETE CASCADE;
--
-- Name: poll_votes fk_rails_848ece0184; Type: FK CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.poll_votes
ADD CONSTRAINT fk_rails_848ece0184 FOREIGN KEY (poll_option_id) REFERENCES public.poll_options(id);
--
-- Name: user_security_keys fk_rails_90999b0454; Type: FK CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_security_keys
ADD CONSTRAINT fk_rails_90999b0454 FOREIGN KEY (user_id) REFERENCES public.users(id);
--
-- Name: poll_votes fk_rails_a6e6974b7e; Type: FK CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.poll_votes
ADD CONSTRAINT fk_rails_a6e6974b7e FOREIGN KEY (poll_id) REFERENCES public.polls(id);
--
-- Name: poll_options fk_rails_aa85becb42; Type: FK CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.poll_options
ADD CONSTRAINT fk_rails_aa85becb42 FOREIGN KEY (poll_id) REFERENCES public.polls(id);
--
-- Name: polls fk_rails_b50b782d08; Type: FK CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.polls
ADD CONSTRAINT fk_rails_b50b782d08 FOREIGN KEY (post_id) REFERENCES public.posts(id);
--
-- Name: poll_votes fk_rails_b64de9b025; Type: FK CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.poll_votes
ADD CONSTRAINT fk_rails_b64de9b025 FOREIGN KEY (user_id) REFERENCES public.users(id);
--
-- Name: user_profiles fk_rails_ca64aa462b; Type: FK CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.user_profiles
ADD CONSTRAINT fk_rails_ca64aa462b FOREIGN KEY (card_background_upload_id) REFERENCES public.uploads(id);
--
-- Name: javascript_caches fk_rails_ed33506dbd; Type: FK CONSTRAINT; Schema: public; Owner: falco
--
ALTER TABLE ONLY public.javascript_caches
ADD CONSTRAINT fk_rails_ed33506dbd FOREIGN KEY (theme_field_id) REFERENCES public.theme_fields(id) ON DELETE CASCADE;
--
-- PostgreSQL database dump complete
--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment