Created
December 5, 2015 19:39
-
-
Save adopilot/6378aa46c4cc458aaa51 to your computer and use it in GitHub Desktop.
discouse pg_dump for version 1.5.0.beta6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- PostgreSQL database dump | |
-- | |
-- Dumped from database version 9.3.10 | |
-- Dumped by pg_dump version 9.3.1 | |
-- Started on 2015-12-05 20:38:18 | |
SET statement_timeout = 0; | |
SET lock_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = on; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; | |
-- | |
-- TOC entry 4453 (class 1262 OID 16384) | |
-- Name: discourse; Type: DATABASE; Schema: -; Owner: postgres | |
-- | |
CREATE DATABASE discourse WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8'; | |
ALTER DATABASE discourse OWNER TO postgres; | |
\connect discourse | |
SET statement_timeout = 0; | |
SET lock_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = on; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; | |
-- | |
-- TOC entry 9 (class 2615 OID 39479) | |
-- Name: backup; Type: SCHEMA; Schema: -; Owner: discourse | |
-- | |
CREATE SCHEMA backup; | |
ALTER SCHEMA backup OWNER TO discourse; | |
-- | |
-- TOC entry 10 (class 2615 OID 45036) | |
-- Name: restore; Type: SCHEMA; Schema: -; Owner: discourse | |
-- | |
CREATE SCHEMA restore; | |
ALTER SCHEMA restore OWNER TO discourse; | |
-- | |
-- TOC entry 515 (class 3079 OID 11789) | |
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: | |
-- | |
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; | |
-- | |
-- TOC entry 4456 (class 0 OID 0) | |
-- Dependencies: 515 | |
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: | |
-- | |
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; | |
-- | |
-- TOC entry 517 (class 3079 OID 16557) | |
-- Name: hstore; Type: EXTENSION; Schema: -; Owner: | |
-- | |
CREATE EXTENSION IF NOT EXISTS hstore WITH SCHEMA public; | |
-- | |
-- TOC entry 4457 (class 0 OID 0) | |
-- Dependencies: 517 | |
-- Name: EXTENSION hstore; Type: COMMENT; Schema: -; Owner: | |
-- | |
COMMENT ON EXTENSION hstore IS 'data type for storing sets of (key, value) pairs'; | |
-- | |
-- TOC entry 516 (class 3079 OID 16677) | |
-- Name: pg_trgm; Type: EXTENSION; Schema: -; Owner: | |
-- | |
CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public; | |
-- | |
-- TOC entry 4458 (class 0 OID 0) | |
-- Dependencies: 516 | |
-- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner: | |
-- | |
COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams'; | |
SET search_path = backup, pg_catalog; | |
SET default_tablespace = ''; | |
SET default_with_oids = false; | |
-- | |
-- TOC entry 174 (class 1259 OID 36844) | |
-- Name: api_keys; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE api_keys ( | |
id integer NOT NULL, | |
key character varying(64) 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 | |
); | |
ALTER TABLE backup.api_keys OWNER TO discourse; | |
-- | |
-- TOC entry 175 (class 1259 OID 36847) | |
-- Name: api_keys_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE api_keys_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.api_keys_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4459 (class 0 OID 0) | |
-- Dependencies: 175 | |
-- Name: api_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE api_keys_id_seq OWNED BY api_keys.id; | |
-- | |
-- TOC entry 331 (class 1259 OID 40672) | |
-- Name: application_requests; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE application_requests ( | |
id integer NOT NULL, | |
date date NOT NULL, | |
req_type integer NOT NULL, | |
count integer DEFAULT 0 NOT NULL | |
); | |
ALTER TABLE backup.application_requests OWNER TO discourse; | |
-- | |
-- TOC entry 330 (class 1259 OID 40670) | |
-- Name: application_requests_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE application_requests_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.application_requests_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4460 (class 0 OID 0) | |
-- Dependencies: 330 | |
-- Name: application_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE application_requests_id_seq OWNED BY application_requests.id; | |
-- | |
-- TOC entry 176 (class 1259 OID 36849) | |
-- Name: badge_groupings; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE badge_groupings ( | |
id integer NOT NULL, | |
name character varying(255) 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 backup.badge_groupings OWNER TO discourse; | |
-- | |
-- TOC entry 177 (class 1259 OID 36855) | |
-- Name: badge_groupings_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE badge_groupings_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.badge_groupings_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4461 (class 0 OID 0) | |
-- Dependencies: 177 | |
-- Name: badge_groupings_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE badge_groupings_id_seq OWNED BY badge_groupings.id; | |
-- | |
-- TOC entry 178 (class 1259 OID 36857) | |
-- Name: categories; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE categories ( | |
id integer NOT NULL, | |
name character varying(50) NOT NULL, | |
color character varying(6) DEFAULT 'AB9364'::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(255) 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(255), | |
email_in_allow_strangers boolean DEFAULT false, | |
topics_day integer DEFAULT 0, | |
posts_day integer DEFAULT 0, | |
logo_url character varying(255), | |
background_url character varying(255), | |
allow_badges boolean DEFAULT true NOT NULL, | |
name_lower character varying(50) NOT NULL, | |
auto_close_based_on_last_post boolean DEFAULT false | |
); | |
ALTER TABLE backup.categories OWNER TO discourse; | |
-- | |
-- TOC entry 179 (class 1259 OID 36878) | |
-- Name: posts; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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, | |
avg_time integer, | |
score double precision, | |
reads integer DEFAULT 0 NOT NULL, | |
post_type integer DEFAULT 1 NOT NULL, | |
vote_count integer DEFAULT 0 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(255), | |
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 | |
); | |
ALTER TABLE backup.posts OWNER TO discourse; | |
-- | |
-- TOC entry 180 (class 1259 OID 36908) | |
-- Name: topics; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE topics ( | |
id integer NOT NULL, | |
title character varying(255) 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, | |
avg_time integer, | |
deleted_at timestamp without time zone, | |
highest_post_number integer DEFAULT 0 NOT NULL, | |
image_url character varying(255), | |
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, | |
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, | |
vote_count integer DEFAULT 0 NOT NULL, | |
archetype character varying(255) 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, | |
illegal_count integer DEFAULT 0 NOT NULL, | |
inappropriate_count integer DEFAULT 0 NOT NULL, | |
pinned_at timestamp without time zone, | |
score double precision, | |
percent_rank double precision DEFAULT 1.0 NOT NULL, | |
notify_user_count integer DEFAULT 0 NOT NULL, | |
subtype character varying(255), | |
slug character varying(255), | |
auto_close_at timestamp without time zone, | |
auto_close_user_id integer, | |
auto_close_started_at timestamp without time zone, | |
deleted_by_id integer, | |
participant_count integer DEFAULT 1, | |
word_count integer, | |
excerpt character varying(1000), | |
pinned_globally boolean DEFAULT false NOT NULL, | |
auto_close_based_on_last_post boolean DEFAULT false, | |
auto_close_hours double precision, | |
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 backup.topics OWNER TO discourse; | |
-- | |
-- TOC entry 181 (class 1259 OID 36940) | |
-- Name: badge_posts; Type: VIEW; Schema: backup; Owner: discourse | |
-- | |
CREATE VIEW 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.avg_time, | |
p.score, | |
p.reads, | |
p.post_type, | |
p.vote_count, | |
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 | |
FROM ((posts p | |
JOIN topics t ON ((t.id = p.topic_id))) | |
JOIN 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); | |
ALTER TABLE backup.badge_posts OWNER TO discourse; | |
-- | |
-- TOC entry 182 (class 1259 OID 36945) | |
-- Name: badge_types; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE badge_types ( | |
id integer NOT NULL, | |
name character varying(255) NOT NULL, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE backup.badge_types OWNER TO discourse; | |
-- | |
-- TOC entry 183 (class 1259 OID 36948) | |
-- Name: badge_types_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE badge_types_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.badge_types_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4462 (class 0 OID 0) | |
-- Dependencies: 183 | |
-- Name: badge_types_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE badge_types_id_seq OWNED BY badge_types.id; | |
-- | |
-- TOC entry 184 (class 1259 OID 36950) | |
-- Name: badges; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE badges ( | |
id integer NOT NULL, | |
name character varying(255) 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(255) 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 | |
); | |
ALTER TABLE backup.badges OWNER TO discourse; | |
-- | |
-- TOC entry 185 (class 1259 OID 36967) | |
-- Name: badges_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE badges_id_seq | |
START WITH 100 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.badges_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4463 (class 0 OID 0) | |
-- Dependencies: 185 | |
-- Name: badges_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE badges_id_seq OWNED BY badges.id; | |
-- | |
-- TOC entry 186 (class 1259 OID 36969) | |
-- Name: categories_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE categories_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.categories_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4464 (class 0 OID 0) | |
-- Dependencies: 186 | |
-- Name: categories_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE categories_id_seq OWNED BY categories.id; | |
-- | |
-- TOC entry 187 (class 1259 OID 36971) | |
-- Name: category_custom_fields; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.category_custom_fields OWNER TO discourse; | |
-- | |
-- TOC entry 188 (class 1259 OID 36977) | |
-- Name: category_custom_fields_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE category_custom_fields_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.category_custom_fields_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4465 (class 0 OID 0) | |
-- Dependencies: 188 | |
-- Name: category_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE category_custom_fields_id_seq OWNED BY category_custom_fields.id; | |
-- | |
-- TOC entry 189 (class 1259 OID 36979) | |
-- Name: category_featured_topics; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.category_featured_topics OWNER TO discourse; | |
-- | |
-- TOC entry 190 (class 1259 OID 36983) | |
-- Name: category_featured_topics_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE category_featured_topics_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.category_featured_topics_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4466 (class 0 OID 0) | |
-- Dependencies: 190 | |
-- Name: category_featured_topics_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE category_featured_topics_id_seq OWNED BY category_featured_topics.id; | |
-- | |
-- TOC entry 191 (class 1259 OID 36985) | |
-- Name: category_featured_users; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE category_featured_users ( | |
id integer NOT NULL, | |
category_id integer, | |
user_id integer, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE backup.category_featured_users OWNER TO discourse; | |
-- | |
-- TOC entry 192 (class 1259 OID 36988) | |
-- Name: category_featured_users_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE category_featured_users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.category_featured_users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4467 (class 0 OID 0) | |
-- Dependencies: 192 | |
-- Name: category_featured_users_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE category_featured_users_id_seq OWNED BY category_featured_users.id; | |
-- | |
-- TOC entry 193 (class 1259 OID 36990) | |
-- Name: category_groups; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.category_groups OWNER TO discourse; | |
-- | |
-- TOC entry 194 (class 1259 OID 36994) | |
-- Name: category_groups_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE category_groups_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.category_groups_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4468 (class 0 OID 0) | |
-- Dependencies: 194 | |
-- Name: category_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE category_groups_id_seq OWNED BY category_groups.id; | |
-- | |
-- TOC entry 195 (class 1259 OID 36996) | |
-- Name: category_search_data; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE category_search_data ( | |
category_id integer NOT NULL, | |
search_data tsvector, | |
raw_data text, | |
locale text | |
); | |
ALTER TABLE backup.category_search_data OWNER TO discourse; | |
-- | |
-- TOC entry 196 (class 1259 OID 37002) | |
-- Name: category_users; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE category_users ( | |
id integer NOT NULL, | |
category_id integer NOT NULL, | |
user_id integer NOT NULL, | |
notification_level integer NOT NULL | |
); | |
ALTER TABLE backup.category_users OWNER TO discourse; | |
-- | |
-- TOC entry 197 (class 1259 OID 37005) | |
-- Name: category_users_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE category_users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.category_users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4469 (class 0 OID 0) | |
-- Dependencies: 197 | |
-- Name: category_users_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE category_users_id_seq OWNED BY category_users.id; | |
-- | |
-- TOC entry 198 (class 1259 OID 37007) | |
-- Name: color_scheme_colors; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE color_scheme_colors ( | |
id integer NOT NULL, | |
name character varying(255) NOT NULL, | |
hex character varying(255) 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 backup.color_scheme_colors OWNER TO discourse; | |
-- | |
-- TOC entry 199 (class 1259 OID 37013) | |
-- Name: color_scheme_colors_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE color_scheme_colors_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.color_scheme_colors_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4470 (class 0 OID 0) | |
-- Dependencies: 199 | |
-- Name: color_scheme_colors_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE color_scheme_colors_id_seq OWNED BY color_scheme_colors.id; | |
-- | |
-- TOC entry 200 (class 1259 OID 37015) | |
-- Name: color_schemes; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE color_schemes ( | |
id integer NOT NULL, | |
name character varying(255) NOT NULL, | |
enabled boolean DEFAULT false NOT NULL, | |
versioned_id integer, | |
version integer DEFAULT 1 NOT NULL, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE backup.color_schemes OWNER TO discourse; | |
-- | |
-- TOC entry 201 (class 1259 OID 37020) | |
-- Name: color_schemes_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE color_schemes_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.color_schemes_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4471 (class 0 OID 0) | |
-- Dependencies: 201 | |
-- Name: color_schemes_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE color_schemes_id_seq OWNED BY color_schemes.id; | |
-- | |
-- TOC entry 332 (class 1259 OID 40686) | |
-- Name: digest_unsubscribe_keys; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE digest_unsubscribe_keys ( | |
key character varying(64) NOT NULL, | |
user_id integer NOT NULL, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE backup.digest_unsubscribe_keys OWNER TO discourse; | |
-- | |
-- TOC entry 334 (class 1259 OID 40797) | |
-- Name: directory_items; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.directory_items OWNER TO discourse; | |
-- | |
-- TOC entry 333 (class 1259 OID 40795) | |
-- Name: directory_items_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE directory_items_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.directory_items_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4472 (class 0 OID 0) | |
-- Dependencies: 333 | |
-- Name: directory_items_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE directory_items_id_seq OWNED BY directory_items.id; | |
-- | |
-- TOC entry 202 (class 1259 OID 37022) | |
-- Name: draft_sequences; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE draft_sequences ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
draft_key character varying(255) NOT NULL, | |
sequence integer NOT NULL | |
); | |
ALTER TABLE backup.draft_sequences OWNER TO discourse; | |
-- | |
-- TOC entry 203 (class 1259 OID 37025) | |
-- Name: draft_sequences_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE draft_sequences_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.draft_sequences_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4473 (class 0 OID 0) | |
-- Dependencies: 203 | |
-- Name: draft_sequences_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE draft_sequences_id_seq OWNED BY draft_sequences.id; | |
-- | |
-- TOC entry 204 (class 1259 OID 37027) | |
-- Name: drafts; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE drafts ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
draft_key character varying(255) NOT NULL, | |
data text NOT NULL, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL, | |
sequence integer DEFAULT 0 NOT NULL | |
); | |
ALTER TABLE backup.drafts OWNER TO discourse; | |
-- | |
-- TOC entry 205 (class 1259 OID 37034) | |
-- Name: drafts_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE drafts_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.drafts_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4474 (class 0 OID 0) | |
-- Dependencies: 205 | |
-- Name: drafts_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE drafts_id_seq OWNED BY drafts.id; | |
-- | |
-- TOC entry 206 (class 1259 OID 37036) | |
-- Name: email_logs; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE email_logs ( | |
id integer NOT NULL, | |
to_address character varying(255) NOT NULL, | |
email_type character varying(255) NOT NULL, | |
user_id integer, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL, | |
reply_key character varying(32), | |
post_id integer, | |
topic_id integer, | |
skipped boolean DEFAULT false, | |
skipped_reason character varying(255) | |
); | |
ALTER TABLE backup.email_logs OWNER TO discourse; | |
-- | |
-- TOC entry 207 (class 1259 OID 37043) | |
-- Name: email_logs_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE email_logs_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.email_logs_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4475 (class 0 OID 0) | |
-- Dependencies: 207 | |
-- Name: email_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE email_logs_id_seq OWNED BY email_logs.id; | |
-- | |
-- TOC entry 208 (class 1259 OID 37045) | |
-- Name: email_tokens; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE email_tokens ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
email character varying(255) NOT NULL, | |
token character varying(255) 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 backup.email_tokens OWNER TO discourse; | |
-- | |
-- TOC entry 209 (class 1259 OID 37053) | |
-- Name: email_tokens_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE email_tokens_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.email_tokens_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4476 (class 0 OID 0) | |
-- Dependencies: 209 | |
-- Name: email_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE email_tokens_id_seq OWNED BY email_tokens.id; | |
-- | |
-- TOC entry 210 (class 1259 OID 37055) | |
-- Name: facebook_user_infos; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE facebook_user_infos ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
facebook_user_id bigint NOT NULL, | |
username character varying(255), | |
first_name character varying(255), | |
last_name character varying(255), | |
email character varying(255), | |
gender character varying(255), | |
name character varying(255), | |
link character varying(255), | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE backup.facebook_user_infos OWNER TO discourse; | |
-- | |
-- TOC entry 211 (class 1259 OID 37061) | |
-- Name: facebook_user_infos_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE facebook_user_infos_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.facebook_user_infos_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4477 (class 0 OID 0) | |
-- Dependencies: 211 | |
-- Name: facebook_user_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE facebook_user_infos_id_seq OWNED BY facebook_user_infos.id; | |
-- | |
-- TOC entry 212 (class 1259 OID 37063) | |
-- Name: github_user_infos; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE github_user_infos ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
screen_name character varying(255) NOT NULL, | |
github_user_id integer NOT NULL, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE backup.github_user_infos OWNER TO discourse; | |
-- | |
-- TOC entry 213 (class 1259 OID 37066) | |
-- Name: github_user_infos_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE github_user_infos_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.github_user_infos_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4478 (class 0 OID 0) | |
-- Dependencies: 213 | |
-- Name: github_user_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE github_user_infos_id_seq OWNED BY github_user_infos.id; | |
-- | |
-- TOC entry 214 (class 1259 OID 37068) | |
-- Name: google_user_infos; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE google_user_infos ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
google_user_id character varying(255) NOT NULL, | |
first_name character varying(255), | |
last_name character varying(255), | |
email character varying(255), | |
gender character varying(255), | |
name character varying(255), | |
link character varying(255), | |
profile_link character varying(255), | |
picture character varying(255), | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE backup.google_user_infos OWNER TO discourse; | |
-- | |
-- TOC entry 215 (class 1259 OID 37074) | |
-- Name: google_user_infos_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE google_user_infos_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.google_user_infos_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4479 (class 0 OID 0) | |
-- Dependencies: 215 | |
-- Name: google_user_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE google_user_infos_id_seq OWNED BY google_user_infos.id; | |
-- | |
-- TOC entry 216 (class 1259 OID 37076) | |
-- Name: group_custom_fields; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.group_custom_fields OWNER TO discourse; | |
-- | |
-- TOC entry 217 (class 1259 OID 37082) | |
-- Name: group_custom_fields_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE group_custom_fields_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.group_custom_fields_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4480 (class 0 OID 0) | |
-- Dependencies: 217 | |
-- Name: group_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE group_custom_fields_id_seq OWNED BY group_custom_fields.id; | |
-- | |
-- TOC entry 329 (class 1259 OID 40642) | |
-- Name: group_managers; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE group_managers ( | |
id integer NOT NULL, | |
group_id integer NOT NULL, | |
user_id integer NOT NULL, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE backup.group_managers OWNER TO discourse; | |
-- | |
-- TOC entry 328 (class 1259 OID 40640) | |
-- Name: group_managers_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE group_managers_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.group_managers_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4481 (class 0 OID 0) | |
-- Dependencies: 328 | |
-- Name: group_managers_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE group_managers_id_seq OWNED BY group_managers.id; | |
-- | |
-- TOC entry 218 (class 1259 OID 37084) | |
-- Name: group_users; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 | |
); | |
ALTER TABLE backup.group_users OWNER TO discourse; | |
-- | |
-- TOC entry 219 (class 1259 OID 37087) | |
-- Name: group_users_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE group_users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.group_users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4482 (class 0 OID 0) | |
-- Dependencies: 219 | |
-- Name: group_users_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE group_users_id_seq OWNED BY group_users.id; | |
-- | |
-- TOC entry 220 (class 1259 OID 37089) | |
-- Name: groups; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE groups ( | |
id integer NOT NULL, | |
name character varying(255) 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, | |
alias_level integer DEFAULT 0, | |
visible boolean DEFAULT true NOT NULL, | |
automatic_membership_email_domains text, | |
automatic_membership_retroactive boolean DEFAULT false, | |
primary_group boolean DEFAULT false NOT NULL, | |
title character varying(255) | |
); | |
ALTER TABLE backup.groups OWNER TO discourse; | |
-- | |
-- TOC entry 221 (class 1259 OID 37096) | |
-- Name: groups_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE groups_id_seq | |
START WITH 100 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.groups_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4483 (class 0 OID 0) | |
-- Dependencies: 221 | |
-- Name: groups_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE groups_id_seq OWNED BY groups.id; | |
-- | |
-- TOC entry 222 (class 1259 OID 37098) | |
-- Name: incoming_domains; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE incoming_domains ( | |
id integer NOT NULL, | |
name character varying(100) NOT NULL, | |
https boolean DEFAULT false NOT NULL, | |
port integer NOT NULL | |
); | |
ALTER TABLE backup.incoming_domains OWNER TO discourse; | |
-- | |
-- TOC entry 223 (class 1259 OID 37102) | |
-- Name: incoming_domains_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE incoming_domains_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.incoming_domains_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4484 (class 0 OID 0) | |
-- Dependencies: 223 | |
-- Name: incoming_domains_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE incoming_domains_id_seq OWNED BY incoming_domains.id; | |
-- | |
-- TOC entry 224 (class 1259 OID 37104) | |
-- Name: incoming_links; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.incoming_links OWNER TO discourse; | |
-- | |
-- TOC entry 225 (class 1259 OID 37110) | |
-- Name: incoming_links_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE incoming_links_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.incoming_links_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4485 (class 0 OID 0) | |
-- Dependencies: 225 | |
-- Name: incoming_links_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE incoming_links_id_seq OWNED BY incoming_links.id; | |
-- | |
-- TOC entry 226 (class 1259 OID 37112) | |
-- Name: incoming_referers; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE incoming_referers ( | |
id integer NOT NULL, | |
path character varying(1000) NOT NULL, | |
incoming_domain_id integer NOT NULL | |
); | |
ALTER TABLE backup.incoming_referers OWNER TO discourse; | |
-- | |
-- TOC entry 227 (class 1259 OID 37118) | |
-- Name: incoming_referers_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE incoming_referers_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.incoming_referers_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4486 (class 0 OID 0) | |
-- Dependencies: 227 | |
-- Name: incoming_referers_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE incoming_referers_id_seq OWNED BY incoming_referers.id; | |
-- | |
-- TOC entry 228 (class 1259 OID 37120) | |
-- Name: invited_groups; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.invited_groups OWNER TO discourse; | |
-- | |
-- TOC entry 229 (class 1259 OID 37123) | |
-- Name: invited_groups_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE invited_groups_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.invited_groups_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4487 (class 0 OID 0) | |
-- Dependencies: 229 | |
-- Name: invited_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE invited_groups_id_seq OWNED BY invited_groups.id; | |
-- | |
-- TOC entry 230 (class 1259 OID 37125) | |
-- Name: invites; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE invites ( | |
id integer NOT NULL, | |
invite_key character varying(32) NOT NULL, | |
email character varying(255), | |
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 | |
); | |
ALTER TABLE backup.invites OWNER TO discourse; | |
-- | |
-- TOC entry 231 (class 1259 OID 37128) | |
-- Name: invites_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE invites_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.invites_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4488 (class 0 OID 0) | |
-- Dependencies: 231 | |
-- Name: invites_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE invites_id_seq OWNED BY invites.id; | |
-- | |
-- TOC entry 232 (class 1259 OID 37130) | |
-- Name: message_bus; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE message_bus ( | |
id integer NOT NULL, | |
name character varying(255), | |
context character varying(255), | |
data text, | |
created_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE backup.message_bus OWNER TO discourse; | |
-- | |
-- TOC entry 233 (class 1259 OID 37136) | |
-- Name: message_bus_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE message_bus_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.message_bus_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4489 (class 0 OID 0) | |
-- Dependencies: 233 | |
-- Name: message_bus_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE message_bus_id_seq OWNED BY message_bus.id; | |
-- | |
-- TOC entry 336 (class 1259 OID 40815) | |
-- Name: muted_users; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE muted_users ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
muted_user_id integer NOT NULL, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE backup.muted_users OWNER TO discourse; | |
-- | |
-- TOC entry 335 (class 1259 OID 40813) | |
-- Name: muted_users_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE muted_users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.muted_users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4490 (class 0 OID 0) | |
-- Dependencies: 335 | |
-- Name: muted_users_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE muted_users_id_seq OWNED BY muted_users.id; | |
-- | |
-- TOC entry 234 (class 1259 OID 37138) | |
-- Name: notifications; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 | |
); | |
ALTER TABLE backup.notifications OWNER TO discourse; | |
-- | |
-- TOC entry 235 (class 1259 OID 37145) | |
-- Name: notifications_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE notifications_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.notifications_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4491 (class 0 OID 0) | |
-- Dependencies: 235 | |
-- Name: notifications_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE notifications_id_seq OWNED BY notifications.id; | |
-- | |
-- TOC entry 236 (class 1259 OID 37147) | |
-- Name: oauth2_user_infos; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE oauth2_user_infos ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
uid character varying(255) NOT NULL, | |
provider character varying(255) NOT NULL, | |
email character varying(255), | |
name character varying(255), | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE backup.oauth2_user_infos OWNER TO discourse; | |
-- | |
-- TOC entry 237 (class 1259 OID 37153) | |
-- Name: oauth2_user_infos_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE oauth2_user_infos_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.oauth2_user_infos_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4492 (class 0 OID 0) | |
-- Dependencies: 237 | |
-- Name: oauth2_user_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE oauth2_user_infos_id_seq OWNED BY oauth2_user_infos.id; | |
-- | |
-- TOC entry 238 (class 1259 OID 37155) | |
-- Name: optimized_images; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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(255) NOT NULL | |
); | |
ALTER TABLE backup.optimized_images OWNER TO discourse; | |
-- | |
-- TOC entry 239 (class 1259 OID 37158) | |
-- Name: optimized_images_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE optimized_images_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.optimized_images_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4493 (class 0 OID 0) | |
-- Dependencies: 239 | |
-- Name: optimized_images_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE optimized_images_id_seq OWNED BY optimized_images.id; | |
-- | |
-- TOC entry 240 (class 1259 OID 37160) | |
-- Name: permalinks; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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, | |
updated_at timestamp without time zone, | |
external_url character varying(1000) | |
); | |
ALTER TABLE backup.permalinks OWNER TO discourse; | |
-- | |
-- TOC entry 241 (class 1259 OID 37166) | |
-- Name: permalinks_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE permalinks_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.permalinks_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4494 (class 0 OID 0) | |
-- Dependencies: 241 | |
-- Name: permalinks_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE permalinks_id_seq OWNED BY permalinks.id; | |
-- | |
-- TOC entry 242 (class 1259 OID 37168) | |
-- Name: plugin_store_rows; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE plugin_store_rows ( | |
id integer NOT NULL, | |
plugin_name character varying(255) NOT NULL, | |
key character varying(255) NOT NULL, | |
type_name character varying(255) NOT NULL, | |
value text | |
); | |
ALTER TABLE backup.plugin_store_rows OWNER TO discourse; | |
-- | |
-- TOC entry 243 (class 1259 OID 37174) | |
-- Name: plugin_store_rows_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE plugin_store_rows_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.plugin_store_rows_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4495 (class 0 OID 0) | |
-- Dependencies: 243 | |
-- Name: plugin_store_rows_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE plugin_store_rows_id_seq OWNED BY plugin_store_rows.id; | |
-- | |
-- TOC entry 244 (class 1259 OID 37176) | |
-- Name: post_action_types; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 | |
); | |
ALTER TABLE backup.post_action_types OWNER TO discourse; | |
-- | |
-- TOC entry 245 (class 1259 OID 37181) | |
-- Name: post_action_types_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE post_action_types_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.post_action_types_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4496 (class 0 OID 0) | |
-- Dependencies: 245 | |
-- Name: post_action_types_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE post_action_types_id_seq OWNED BY post_action_types.id; | |
-- | |
-- TOC entry 246 (class 1259 OID 37183) | |
-- Name: post_actions; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.post_actions OWNER TO discourse; | |
-- | |
-- TOC entry 247 (class 1259 OID 37188) | |
-- Name: post_actions_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE post_actions_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.post_actions_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4497 (class 0 OID 0) | |
-- Dependencies: 247 | |
-- Name: post_actions_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE post_actions_id_seq OWNED BY post_actions.id; | |
-- | |
-- TOC entry 248 (class 1259 OID 37190) | |
-- Name: post_custom_fields; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.post_custom_fields OWNER TO discourse; | |
-- | |
-- TOC entry 249 (class 1259 OID 37196) | |
-- Name: post_custom_fields_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE post_custom_fields_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.post_custom_fields_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4498 (class 0 OID 0) | |
-- Dependencies: 249 | |
-- Name: post_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE post_custom_fields_id_seq OWNED BY post_custom_fields.id; | |
-- | |
-- TOC entry 250 (class 1259 OID 37198) | |
-- Name: post_details; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE post_details ( | |
id integer NOT NULL, | |
post_id integer, | |
key character varying(255), | |
value character varying(255), | |
extra text, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE backup.post_details OWNER TO discourse; | |
-- | |
-- TOC entry 251 (class 1259 OID 37204) | |
-- Name: post_details_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE post_details_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.post_details_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4499 (class 0 OID 0) | |
-- Dependencies: 251 | |
-- Name: post_details_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE post_details_id_seq OWNED BY post_details.id; | |
-- | |
-- TOC entry 252 (class 1259 OID 37206) | |
-- Name: post_replies; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE post_replies ( | |
post_id integer, | |
reply_id integer, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE backup.post_replies OWNER TO discourse; | |
-- | |
-- TOC entry 253 (class 1259 OID 37209) | |
-- Name: post_revisions; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.post_revisions OWNER TO discourse; | |
-- | |
-- TOC entry 254 (class 1259 OID 37215) | |
-- Name: post_revisions_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE post_revisions_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.post_revisions_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4500 (class 0 OID 0) | |
-- Dependencies: 254 | |
-- Name: post_revisions_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE post_revisions_id_seq OWNED BY post_revisions.id; | |
-- | |
-- TOC entry 255 (class 1259 OID 37217) | |
-- Name: post_search_data; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE post_search_data ( | |
post_id integer NOT NULL, | |
search_data tsvector, | |
raw_data text, | |
locale character varying(255) | |
); | |
ALTER TABLE backup.post_search_data OWNER TO discourse; | |
-- | |
-- TOC entry 256 (class 1259 OID 37223) | |
-- Name: post_timings; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE post_timings ( | |
topic_id integer NOT NULL, | |
post_number integer NOT NULL, | |
user_id integer NOT NULL, | |
msecs integer NOT NULL | |
); | |
ALTER TABLE backup.post_timings OWNER TO discourse; | |
-- | |
-- TOC entry 257 (class 1259 OID 37226) | |
-- Name: post_uploads; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE post_uploads ( | |
id integer NOT NULL, | |
post_id integer NOT NULL, | |
upload_id integer NOT NULL | |
); | |
ALTER TABLE backup.post_uploads OWNER TO discourse; | |
-- | |
-- TOC entry 258 (class 1259 OID 37229) | |
-- Name: post_uploads_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE post_uploads_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.post_uploads_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4501 (class 0 OID 0) | |
-- Dependencies: 258 | |
-- Name: post_uploads_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE post_uploads_id_seq OWNED BY post_uploads.id; | |
-- | |
-- TOC entry 259 (class 1259 OID 37231) | |
-- Name: posts_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE posts_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.posts_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4502 (class 0 OID 0) | |
-- Dependencies: 259 | |
-- Name: posts_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE posts_id_seq OWNED BY posts.id; | |
-- | |
-- TOC entry 338 (class 1259 OID 40837) | |
-- Name: queued_posts; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE queued_posts ( | |
id integer NOT NULL, | |
queue character varying(255) NOT NULL, | |
state integer NOT NULL, | |
user_id integer NOT NULL, | |
raw text NOT NULL, | |
post_options json NOT NULL, | |
topic_id integer, | |
approved_by_id integer, | |
approved_at timestamp without time zone, | |
rejected_by_id integer, | |
rejected_at timestamp without time zone, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE backup.queued_posts OWNER TO discourse; | |
-- | |
-- TOC entry 337 (class 1259 OID 40835) | |
-- Name: queued_posts_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE queued_posts_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.queued_posts_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4503 (class 0 OID 0) | |
-- Dependencies: 337 | |
-- Name: queued_posts_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE queued_posts_id_seq OWNED BY queued_posts.id; | |
-- | |
-- TOC entry 260 (class 1259 OID 37233) | |
-- Name: quoted_posts; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.quoted_posts OWNER TO discourse; | |
-- | |
-- TOC entry 261 (class 1259 OID 37236) | |
-- Name: quoted_posts_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE quoted_posts_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.quoted_posts_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4504 (class 0 OID 0) | |
-- Dependencies: 261 | |
-- Name: quoted_posts_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE quoted_posts_id_seq OWNED BY quoted_posts.id; | |
-- | |
-- TOC entry 262 (class 1259 OID 37238) | |
-- Name: schema_migrations; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE schema_migrations ( | |
version character varying(255) NOT NULL | |
); | |
ALTER TABLE backup.schema_migrations OWNER TO discourse; | |
-- | |
-- TOC entry 263 (class 1259 OID 37241) | |
-- Name: screened_emails; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE screened_emails ( | |
id integer NOT NULL, | |
email character varying(255) 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 backup.screened_emails OWNER TO discourse; | |
-- | |
-- TOC entry 264 (class 1259 OID 37248) | |
-- Name: screened_emails_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE screened_emails_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.screened_emails_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4505 (class 0 OID 0) | |
-- Dependencies: 264 | |
-- Name: screened_emails_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE screened_emails_id_seq OWNED BY screened_emails.id; | |
-- | |
-- TOC entry 265 (class 1259 OID 37250) | |
-- Name: screened_ip_addresses; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.screened_ip_addresses OWNER TO discourse; | |
-- | |
-- TOC entry 266 (class 1259 OID 37257) | |
-- Name: screened_ip_addresses_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE screened_ip_addresses_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.screened_ip_addresses_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4506 (class 0 OID 0) | |
-- Dependencies: 266 | |
-- Name: screened_ip_addresses_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE screened_ip_addresses_id_seq OWNED BY screened_ip_addresses.id; | |
-- | |
-- TOC entry 267 (class 1259 OID 37259) | |
-- Name: screened_urls; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE screened_urls ( | |
id integer NOT NULL, | |
url character varying(255) NOT NULL, | |
domain character varying(255) 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 backup.screened_urls OWNER TO discourse; | |
-- | |
-- TOC entry 268 (class 1259 OID 37266) | |
-- Name: screened_urls_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE screened_urls_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.screened_urls_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4507 (class 0 OID 0) | |
-- Dependencies: 268 | |
-- Name: screened_urls_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE screened_urls_id_seq OWNED BY screened_urls.id; | |
-- | |
-- TOC entry 269 (class 1259 OID 37268) | |
-- Name: single_sign_on_records; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE single_sign_on_records ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
external_id character varying(255) 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(255), | |
external_email character varying(255), | |
external_name character varying(255), | |
external_avatar_url character varying(255) | |
); | |
ALTER TABLE backup.single_sign_on_records OWNER TO discourse; | |
-- | |
-- TOC entry 270 (class 1259 OID 37274) | |
-- Name: single_sign_on_records_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE single_sign_on_records_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.single_sign_on_records_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4508 (class 0 OID 0) | |
-- Dependencies: 270 | |
-- Name: single_sign_on_records_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE single_sign_on_records_id_seq OWNED BY single_sign_on_records.id; | |
-- | |
-- TOC entry 272 (class 1259 OID 37282) | |
-- Name: site_customizations; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE site_customizations ( | |
id integer NOT NULL, | |
name character varying(255) NOT NULL, | |
stylesheet text, | |
header text, | |
user_id integer NOT NULL, | |
enabled boolean NOT NULL, | |
key character varying(255) NOT NULL, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL, | |
stylesheet_baked text DEFAULT ''::text NOT NULL, | |
mobile_stylesheet text, | |
mobile_header text, | |
mobile_stylesheet_baked text, | |
footer text, | |
mobile_footer text, | |
head_tag text, | |
body_tag text, | |
top text, | |
mobile_top text | |
); | |
ALTER TABLE backup.site_customizations OWNER TO discourse; | |
-- | |
-- TOC entry 273 (class 1259 OID 37290) | |
-- Name: site_customizations_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE site_customizations_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.site_customizations_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4509 (class 0 OID 0) | |
-- Dependencies: 273 | |
-- Name: site_customizations_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE site_customizations_id_seq OWNED BY site_customizations.id; | |
-- | |
-- TOC entry 274 (class 1259 OID 37292) | |
-- Name: site_settings; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE site_settings ( | |
id integer NOT NULL, | |
name character varying(255) 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 backup.site_settings OWNER TO discourse; | |
-- | |
-- TOC entry 275 (class 1259 OID 37298) | |
-- Name: site_settings_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE site_settings_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.site_settings_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4510 (class 0 OID 0) | |
-- Dependencies: 275 | |
-- Name: site_settings_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE site_settings_id_seq OWNED BY site_settings.id; | |
-- | |
-- TOC entry 271 (class 1259 OID 37276) | |
-- Name: site_texts; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE site_texts ( | |
text_type character varying(255) NOT NULL, | |
value text NOT NULL, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE backup.site_texts OWNER TO discourse; | |
-- | |
-- TOC entry 340 (class 1259 OID 40864) | |
-- Name: stylesheet_cache; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE stylesheet_cache ( | |
id integer NOT NULL, | |
target character varying(255) NOT NULL, | |
digest character varying(255) NOT NULL, | |
content text NOT NULL, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE backup.stylesheet_cache OWNER TO discourse; | |
-- | |
-- TOC entry 339 (class 1259 OID 40862) | |
-- Name: stylesheet_cache_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE stylesheet_cache_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.stylesheet_cache_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4511 (class 0 OID 0) | |
-- Dependencies: 339 | |
-- Name: stylesheet_cache_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE stylesheet_cache_id_seq OWNED BY stylesheet_cache.id; | |
-- | |
-- TOC entry 276 (class 1259 OID 37300) | |
-- Name: top_topics; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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, | |
yearly_score double precision DEFAULT 0, | |
monthly_score double precision DEFAULT 0, | |
weekly_score double precision DEFAULT 0, | |
daily_score double precision DEFAULT 0, | |
all_score double precision DEFAULT 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 | |
); | |
ALTER TABLE backup.top_topics OWNER TO discourse; | |
-- | |
-- TOC entry 277 (class 1259 OID 37319) | |
-- Name: top_topics_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE top_topics_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.top_topics_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4512 (class 0 OID 0) | |
-- Dependencies: 277 | |
-- Name: top_topics_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE top_topics_id_seq OWNED BY top_topics.id; | |
-- | |
-- TOC entry 278 (class 1259 OID 37321) | |
-- Name: topic_allowed_groups; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE topic_allowed_groups ( | |
id integer NOT NULL, | |
group_id integer NOT NULL, | |
topic_id integer NOT NULL | |
); | |
ALTER TABLE backup.topic_allowed_groups OWNER TO discourse; | |
-- | |
-- TOC entry 279 (class 1259 OID 37324) | |
-- Name: topic_allowed_groups_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_allowed_groups_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.topic_allowed_groups_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4513 (class 0 OID 0) | |
-- Dependencies: 279 | |
-- Name: topic_allowed_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_allowed_groups_id_seq OWNED BY topic_allowed_groups.id; | |
-- | |
-- TOC entry 280 (class 1259 OID 37326) | |
-- Name: topic_allowed_users; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.topic_allowed_users OWNER TO discourse; | |
-- | |
-- TOC entry 281 (class 1259 OID 37329) | |
-- Name: topic_allowed_users_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_allowed_users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.topic_allowed_users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4514 (class 0 OID 0) | |
-- Dependencies: 281 | |
-- Name: topic_allowed_users_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_allowed_users_id_seq OWNED BY topic_allowed_users.id; | |
-- | |
-- TOC entry 282 (class 1259 OID 37331) | |
-- Name: topic_custom_fields; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.topic_custom_fields OWNER TO discourse; | |
-- | |
-- TOC entry 283 (class 1259 OID 37337) | |
-- Name: topic_custom_fields_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_custom_fields_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.topic_custom_fields_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4515 (class 0 OID 0) | |
-- Dependencies: 283 | |
-- Name: topic_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_custom_fields_id_seq OWNED BY topic_custom_fields.id; | |
-- | |
-- TOC entry 284 (class 1259 OID 37339) | |
-- Name: topic_embeds; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 | |
); | |
ALTER TABLE backup.topic_embeds OWNER TO discourse; | |
-- | |
-- TOC entry 285 (class 1259 OID 37342) | |
-- Name: topic_embeds_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_embeds_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.topic_embeds_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4516 (class 0 OID 0) | |
-- Dependencies: 285 | |
-- Name: topic_embeds_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_embeds_id_seq OWNED BY topic_embeds.id; | |
-- | |
-- TOC entry 286 (class 1259 OID 37344) | |
-- Name: topic_invites; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.topic_invites OWNER TO discourse; | |
-- | |
-- TOC entry 287 (class 1259 OID 37347) | |
-- Name: topic_invites_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_invites_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.topic_invites_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4517 (class 0 OID 0) | |
-- Dependencies: 287 | |
-- Name: topic_invites_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_invites_id_seq OWNED BY topic_invites.id; | |
-- | |
-- TOC entry 288 (class 1259 OID 37349) | |
-- Name: topic_link_clicks; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 NOT NULL | |
); | |
ALTER TABLE backup.topic_link_clicks OWNER TO discourse; | |
-- | |
-- TOC entry 289 (class 1259 OID 37355) | |
-- Name: topic_link_clicks_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_link_clicks_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.topic_link_clicks_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4518 (class 0 OID 0) | |
-- Dependencies: 289 | |
-- Name: topic_link_clicks_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_link_clicks_id_seq OWNED BY topic_link_clicks.id; | |
-- | |
-- TOC entry 290 (class 1259 OID 37357) | |
-- Name: topic_links; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE topic_links ( | |
id integer NOT NULL, | |
topic_id integer NOT NULL, | |
post_id integer, | |
user_id integer NOT NULL, | |
url character varying(500) 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(255), | |
crawled_at timestamp without time zone, | |
quote boolean DEFAULT false NOT NULL | |
); | |
ALTER TABLE backup.topic_links OWNER TO discourse; | |
-- | |
-- TOC entry 291 (class 1259 OID 37367) | |
-- Name: topic_links_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_links_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.topic_links_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4519 (class 0 OID 0) | |
-- Dependencies: 291 | |
-- Name: topic_links_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_links_id_seq OWNED BY topic_links.id; | |
-- | |
-- TOC entry 292 (class 1259 OID 37369) | |
-- Name: topic_search_data; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE topic_search_data ( | |
topic_id integer NOT NULL, | |
raw_data text, | |
locale character varying(255) NOT NULL, | |
search_data tsvector | |
); | |
ALTER TABLE backup.topic_search_data OWNER TO discourse; | |
-- | |
-- TOC entry 293 (class 1259 OID 37375) | |
-- Name: topic_users; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE topic_users ( | |
user_id integer NOT NULL, | |
topic_id integer NOT NULL, | |
posted boolean DEFAULT false NOT NULL, | |
last_read_post_number integer, | |
highest_seen_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 | |
); | |
ALTER TABLE backup.topic_users OWNER TO discourse; | |
-- | |
-- TOC entry 294 (class 1259 OID 37383) | |
-- Name: topic_users_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.topic_users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4520 (class 0 OID 0) | |
-- Dependencies: 294 | |
-- Name: topic_users_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_users_id_seq OWNED BY topic_users.id; | |
-- | |
-- TOC entry 295 (class 1259 OID 37385) | |
-- Name: topic_views; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE topic_views ( | |
topic_id integer NOT NULL, | |
viewed_at date NOT NULL, | |
user_id integer, | |
ip_address inet NOT NULL | |
); | |
ALTER TABLE backup.topic_views OWNER TO discourse; | |
-- | |
-- TOC entry 296 (class 1259 OID 37391) | |
-- Name: topics_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE topics_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.topics_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4521 (class 0 OID 0) | |
-- Dependencies: 296 | |
-- Name: topics_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE topics_id_seq OWNED BY topics.id; | |
-- | |
-- TOC entry 297 (class 1259 OID 37393) | |
-- Name: twitter_user_infos; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE twitter_user_infos ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
screen_name character varying(255) NOT NULL, | |
twitter_user_id bigint NOT NULL, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE backup.twitter_user_infos OWNER TO discourse; | |
-- | |
-- TOC entry 298 (class 1259 OID 37396) | |
-- Name: twitter_user_infos_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE twitter_user_infos_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.twitter_user_infos_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4522 (class 0 OID 0) | |
-- Dependencies: 298 | |
-- Name: twitter_user_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE twitter_user_infos_id_seq OWNED BY twitter_user_infos.id; | |
-- | |
-- TOC entry 299 (class 1259 OID 37398) | |
-- Name: uploads; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE uploads ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
original_filename character varying(255) NOT NULL, | |
filesize integer NOT NULL, | |
width integer, | |
height integer, | |
url character varying(255) 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 | |
); | |
ALTER TABLE backup.uploads OWNER TO discourse; | |
-- | |
-- TOC entry 300 (class 1259 OID 37404) | |
-- Name: uploads_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE uploads_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.uploads_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4523 (class 0 OID 0) | |
-- Dependencies: 300 | |
-- Name: uploads_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE uploads_id_seq OWNED BY uploads.id; | |
-- | |
-- TOC entry 301 (class 1259 OID 37406) | |
-- Name: user_actions; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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, | |
queued_post_id integer | |
); | |
ALTER TABLE backup.user_actions OWNER TO discourse; | |
-- | |
-- TOC entry 302 (class 1259 OID 37409) | |
-- Name: user_actions_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE user_actions_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.user_actions_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4524 (class 0 OID 0) | |
-- Dependencies: 302 | |
-- Name: user_actions_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE user_actions_id_seq OWNED BY user_actions.id; | |
-- | |
-- TOC entry 303 (class 1259 OID 37411) | |
-- Name: user_avatars; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.user_avatars OWNER TO discourse; | |
-- | |
-- TOC entry 304 (class 1259 OID 37414) | |
-- Name: user_avatars_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE user_avatars_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.user_avatars_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4525 (class 0 OID 0) | |
-- Dependencies: 304 | |
-- Name: user_avatars_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE user_avatars_id_seq OWNED BY user_avatars.id; | |
-- | |
-- TOC entry 305 (class 1259 OID 37416) | |
-- Name: user_badges; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 | |
); | |
ALTER TABLE backup.user_badges OWNER TO discourse; | |
-- | |
-- TOC entry 306 (class 1259 OID 37420) | |
-- Name: user_badges_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE user_badges_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.user_badges_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4526 (class 0 OID 0) | |
-- Dependencies: 306 | |
-- Name: user_badges_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE user_badges_id_seq OWNED BY user_badges.id; | |
-- | |
-- TOC entry 307 (class 1259 OID 37422) | |
-- Name: user_custom_fields; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 backup.user_custom_fields OWNER TO discourse; | |
-- | |
-- TOC entry 308 (class 1259 OID 37428) | |
-- Name: user_custom_fields_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE user_custom_fields_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.user_custom_fields_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4527 (class 0 OID 0) | |
-- Dependencies: 308 | |
-- Name: user_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE user_custom_fields_id_seq OWNED BY user_custom_fields.id; | |
-- | |
-- TOC entry 327 (class 1259 OID 40619) | |
-- Name: user_exports; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE user_exports ( | |
id integer NOT NULL, | |
file_name character varying(255) NOT NULL, | |
user_id integer NOT NULL, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE backup.user_exports OWNER TO discourse; | |
-- | |
-- TOC entry 326 (class 1259 OID 40617) | |
-- Name: user_exports_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE user_exports_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.user_exports_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4528 (class 0 OID 0) | |
-- Dependencies: 326 | |
-- Name: user_exports_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE user_exports_id_seq OWNED BY user_exports.id; | |
-- | |
-- TOC entry 325 (class 1259 OID 39496) | |
-- Name: user_fields; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE user_fields ( | |
id integer NOT NULL, | |
name character varying(255) NOT NULL, | |
field_type character varying(255) NOT NULL, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone, | |
editable boolean DEFAULT false NOT NULL, | |
description character varying(255) NOT NULL, | |
required boolean DEFAULT true NOT NULL, | |
show_on_profile boolean DEFAULT false NOT NULL | |
); | |
ALTER TABLE backup.user_fields OWNER TO discourse; | |
-- | |
-- TOC entry 324 (class 1259 OID 39494) | |
-- Name: user_fields_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE user_fields_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.user_fields_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4529 (class 0 OID 0) | |
-- Dependencies: 324 | |
-- Name: user_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE user_fields_id_seq OWNED BY user_fields.id; | |
-- | |
-- TOC entry 309 (class 1259 OID 37430) | |
-- Name: user_histories; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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(255), | |
ip_address character varying(255), | |
email character varying(255), | |
subject text, | |
previous_value text, | |
new_value text, | |
topic_id integer, | |
admin_only boolean DEFAULT false, | |
post_id integer, | |
custom_type character varying(255) | |
); | |
ALTER TABLE backup.user_histories OWNER TO discourse; | |
-- | |
-- TOC entry 310 (class 1259 OID 37437) | |
-- Name: user_histories_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE user_histories_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.user_histories_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4530 (class 0 OID 0) | |
-- Dependencies: 310 | |
-- Name: user_histories_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE user_histories_id_seq OWNED BY user_histories.id; | |
-- | |
-- TOC entry 311 (class 1259 OID 37439) | |
-- Name: user_open_ids; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE user_open_ids ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
email character varying(255) NOT NULL, | |
url character varying(255) NOT NULL, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL, | |
active boolean NOT NULL | |
); | |
ALTER TABLE backup.user_open_ids OWNER TO discourse; | |
-- | |
-- TOC entry 312 (class 1259 OID 37445) | |
-- Name: user_open_ids_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE user_open_ids_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.user_open_ids_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4531 (class 0 OID 0) | |
-- Dependencies: 312 | |
-- Name: user_open_ids_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE user_open_ids_id_seq OWNED BY user_open_ids.id; | |
-- | |
-- TOC entry 313 (class 1259 OID 37447) | |
-- Name: user_profiles; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE user_profiles ( | |
user_id integer NOT NULL, | |
location character varying(255), | |
website character varying(255), | |
bio_raw text, | |
bio_cooked text, | |
dismissed_banner_key integer, | |
profile_background character varying(255), | |
bio_cooked_version integer, | |
badge_granted_title boolean DEFAULT false, | |
card_background character varying(255), | |
card_image_badge_id integer | |
); | |
ALTER TABLE backup.user_profiles OWNER TO discourse; | |
-- | |
-- TOC entry 314 (class 1259 OID 37453) | |
-- Name: user_search_data; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE user_search_data ( | |
user_id integer NOT NULL, | |
search_data tsvector, | |
raw_data text, | |
locale text | |
); | |
ALTER TABLE backup.user_search_data OWNER TO discourse; | |
-- | |
-- TOC entry 315 (class 1259 OID 37459) | |
-- Name: user_stats; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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, | |
topic_reply_count 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 | |
); | |
ALTER TABLE backup.user_stats OWNER TO discourse; | |
-- | |
-- TOC entry 316 (class 1259 OID 37471) | |
-- Name: user_visits; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE user_visits ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
visited_at date NOT NULL, | |
posts_read integer DEFAULT 0 | |
); | |
ALTER TABLE backup.user_visits OWNER TO discourse; | |
-- | |
-- TOC entry 317 (class 1259 OID 37475) | |
-- Name: user_visits_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE user_visits_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.user_visits_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4532 (class 0 OID 0) | |
-- Dependencies: 317 | |
-- Name: user_visits_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE user_visits_id_seq OWNED BY user_visits.id; | |
-- | |
-- TOC entry 318 (class 1259 OID 37477) | |
-- Name: users; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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(255), | |
seen_notification_id integer DEFAULT 0 NOT NULL, | |
last_posted_at timestamp without time zone, | |
email character varying(256) NOT NULL, | |
password_hash character varying(64), | |
salt character varying(32), | |
active boolean DEFAULT false NOT NULL, | |
username_lower character varying(60) NOT NULL, | |
auth_token character varying(32), | |
last_seen_at timestamp without time zone, | |
admin boolean DEFAULT false NOT NULL, | |
last_emailed_at timestamp without time zone, | |
email_digests boolean NOT NULL, | |
trust_level integer NOT NULL, | |
email_private_messages boolean DEFAULT true, | |
email_direct boolean DEFAULT true NOT NULL, | |
approved boolean DEFAULT false NOT NULL, | |
approved_by_id integer, | |
approved_at timestamp without time zone, | |
digest_after_days integer, | |
previous_visit_at timestamp without time zone, | |
suspended_at timestamp without time zone, | |
suspended_till timestamp without time zone, | |
date_of_birth date, | |
auto_track_topics_after_msecs integer, | |
views integer DEFAULT 0 NOT NULL, | |
flag_level integer DEFAULT 0 NOT NULL, | |
ip_address inet, | |
new_topic_duration_minutes integer, | |
external_links_in_new_tab boolean NOT NULL, | |
enable_quoting boolean DEFAULT true NOT NULL, | |
moderator boolean DEFAULT false, | |
blocked boolean DEFAULT false, | |
dynamic_favicon boolean DEFAULT false NOT NULL, | |
title character varying(255), | |
uploaded_avatar_id integer, | |
email_always boolean DEFAULT false NOT NULL, | |
mailing_list_mode boolean DEFAULT false NOT NULL, | |
locale character varying(10), | |
primary_group_id integer, | |
registration_ip_address inet, | |
last_redirected_to_top_at timestamp without time zone, | |
disable_jump_reply boolean DEFAULT false NOT NULL, | |
edit_history_public boolean DEFAULT false NOT NULL, | |
trust_level_locked boolean DEFAULT false NOT NULL | |
); | |
ALTER TABLE backup.users OWNER TO discourse; | |
-- | |
-- TOC entry 319 (class 1259 OID 37499) | |
-- Name: users_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4533 (class 0 OID 0) | |
-- Dependencies: 319 | |
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE users_id_seq OWNED BY users.id; | |
-- | |
-- TOC entry 320 (class 1259 OID 37501) | |
-- Name: versions; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE versions ( | |
id integer NOT NULL, | |
versioned_id integer, | |
versioned_type character varying(255), | |
user_id integer, | |
user_type character varying(255), | |
user_name character varying(255), | |
modifications text, | |
number integer, | |
reverted_from integer, | |
tag character varying(255), | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE backup.versions OWNER TO discourse; | |
-- | |
-- TOC entry 321 (class 1259 OID 37507) | |
-- Name: versions_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE versions_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.versions_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4534 (class 0 OID 0) | |
-- Dependencies: 321 | |
-- Name: versions_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE versions_id_seq OWNED BY versions.id; | |
-- | |
-- TOC entry 322 (class 1259 OID 37509) | |
-- Name: warnings; Type: TABLE; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE backup.warnings OWNER TO discourse; | |
-- | |
-- TOC entry 323 (class 1259 OID 37512) | |
-- Name: warnings_id_seq; Type: SEQUENCE; Schema: backup; Owner: discourse | |
-- | |
CREATE SEQUENCE warnings_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE backup.warnings_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4535 (class 0 OID 0) | |
-- Dependencies: 323 | |
-- Name: warnings_id_seq; Type: SEQUENCE OWNED BY; Schema: backup; Owner: discourse | |
-- | |
ALTER SEQUENCE warnings_id_seq OWNED BY warnings.id; | |
SET search_path = public, pg_catalog; | |
-- | |
-- TOC entry 341 (class 1259 OID 45037) | |
-- Name: api_keys; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE api_keys ( | |
id integer NOT NULL, | |
key character varying(64) 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 | |
); | |
ALTER TABLE public.api_keys OWNER TO discourse; | |
-- | |
-- TOC entry 342 (class 1259 OID 45040) | |
-- Name: api_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE api_keys_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.api_keys_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4536 (class 0 OID 0) | |
-- Dependencies: 342 | |
-- Name: api_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE api_keys_id_seq OWNED BY api_keys.id; | |
-- | |
-- TOC entry 494 (class 1259 OID 48864) | |
-- Name: application_requests; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 493 (class 1259 OID 48862) | |
-- Name: application_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE application_requests_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.application_requests_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4537 (class 0 OID 0) | |
-- Dependencies: 493 | |
-- Name: application_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE application_requests_id_seq OWNED BY application_requests.id; | |
-- | |
-- TOC entry 343 (class 1259 OID 45042) | |
-- Name: badge_groupings; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE badge_groupings ( | |
id integer NOT NULL, | |
name character varying(255) 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 discourse; | |
-- | |
-- TOC entry 344 (class 1259 OID 45048) | |
-- Name: badge_groupings_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE badge_groupings_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.badge_groupings_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4538 (class 0 OID 0) | |
-- Dependencies: 344 | |
-- Name: badge_groupings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE badge_groupings_id_seq OWNED BY badge_groupings.id; | |
-- | |
-- TOC entry 345 (class 1259 OID 45050) | |
-- Name: categories; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE categories ( | |
id integer NOT NULL, | |
name character varying(50) NOT NULL, | |
color character varying(6) DEFAULT 'AB9364'::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(255) 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(255), | |
email_in_allow_strangers boolean DEFAULT false, | |
topics_day integer DEFAULT 0, | |
posts_day integer DEFAULT 0, | |
logo_url character varying(255), | |
background_url character varying(255), | |
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, | |
suppress_from_homepage boolean DEFAULT false, | |
contains_messages boolean DEFAULT false NOT NULL | |
); | |
ALTER TABLE public.categories OWNER TO discourse; | |
-- | |
-- TOC entry 346 (class 1259 OID 45071) | |
-- Name: posts; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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, | |
avg_time integer, | |
score double precision, | |
reads integer DEFAULT 0 NOT NULL, | |
post_type integer DEFAULT 1 NOT NULL, | |
vote_count integer DEFAULT 0 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(255), | |
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(255) | |
); | |
ALTER TABLE public.posts OWNER TO discourse; | |
-- | |
-- TOC entry 4539 (class 0 OID 0) | |
-- Dependencies: 346 | |
-- Name: TABLE posts; Type: COMMENT; Schema: public; Owner: discourse | |
-- | |
COMMENT ON TABLE posts IS 'If you want to query public posts only, use the badge_posts view.'; | |
-- | |
-- TOC entry 4540 (class 0 OID 0) | |
-- Dependencies: 346 | |
-- Name: COLUMN posts.post_number; Type: COMMENT; Schema: public; Owner: discourse | |
-- | |
COMMENT ON COLUMN 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.'; | |
-- | |
-- TOC entry 4541 (class 0 OID 0) | |
-- Dependencies: 346 | |
-- Name: COLUMN posts.raw; Type: COMMENT; Schema: public; Owner: discourse | |
-- | |
COMMENT ON COLUMN posts.raw IS 'The raw Markdown that the user entered into the composer.'; | |
-- | |
-- TOC entry 4542 (class 0 OID 0) | |
-- Dependencies: 346 | |
-- Name: COLUMN posts.cooked; Type: COMMENT; Schema: public; Owner: discourse | |
-- | |
COMMENT ON COLUMN posts.cooked IS 'The processed HTML that is presented in a topic.'; | |
-- | |
-- TOC entry 4543 (class 0 OID 0) | |
-- Dependencies: 346 | |
-- Name: COLUMN posts.reply_to_post_number; Type: COMMENT; Schema: public; Owner: discourse | |
-- | |
COMMENT ON COLUMN 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]'; | |
-- | |
-- TOC entry 4544 (class 0 OID 0) | |
-- Dependencies: 346 | |
-- Name: COLUMN posts.reply_quoted; Type: COMMENT; Schema: public; Owner: discourse | |
-- | |
COMMENT ON COLUMN 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.'; | |
-- | |
-- TOC entry 347 (class 1259 OID 45101) | |
-- Name: topics; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE topics ( | |
id integer NOT NULL, | |
title character varying(255) 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, | |
avg_time integer, | |
deleted_at timestamp without time zone, | |
highest_post_number integer DEFAULT 0 NOT NULL, | |
image_url character varying(255), | |
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, | |
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, | |
vote_count integer DEFAULT 0 NOT NULL, | |
archetype character varying(255) 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, | |
illegal_count integer DEFAULT 0 NOT NULL, | |
inappropriate_count integer DEFAULT 0 NOT NULL, | |
pinned_at timestamp without time zone, | |
score double precision, | |
percent_rank double precision DEFAULT 1.0 NOT NULL, | |
notify_user_count integer DEFAULT 0 NOT NULL, | |
subtype character varying(255), | |
slug character varying(255), | |
auto_close_at timestamp without time zone, | |
auto_close_user_id integer, | |
auto_close_started_at timestamp without time zone, | |
deleted_by_id integer, | |
participant_count integer DEFAULT 1, | |
word_count integer, | |
excerpt character varying(1000), | |
pinned_globally boolean DEFAULT false NOT NULL, | |
auto_close_based_on_last_post boolean DEFAULT false, | |
auto_close_hours double precision, | |
pinned_until timestamp without time zone, | |
fancy_title character varying(400), | |
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 discourse; | |
-- | |
-- TOC entry 4545 (class 0 OID 0) | |
-- Dependencies: 347 | |
-- Name: TABLE topics; Type: COMMENT; Schema: public; Owner: discourse | |
-- | |
COMMENT ON TABLE 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)'; | |
-- | |
-- TOC entry 512 (class 1259 OID 115425) | |
-- Name: badge_posts; Type: VIEW; Schema: public; Owner: discourse | |
-- | |
CREATE VIEW 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.avg_time, | |
p.score, | |
p.reads, | |
p.post_type, | |
p.vote_count, | |
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 | |
FROM ((posts p | |
JOIN topics t ON ((t.id = p.topic_id))) | |
JOIN 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 discourse; | |
-- | |
-- TOC entry 348 (class 1259 OID 45138) | |
-- Name: badge_types; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE badge_types ( | |
id integer NOT NULL, | |
name character varying(255) 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 discourse; | |
-- | |
-- TOC entry 349 (class 1259 OID 45141) | |
-- Name: badge_types_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE badge_types_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.badge_types_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4546 (class 0 OID 0) | |
-- Dependencies: 349 | |
-- Name: badge_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE badge_types_id_seq OWNED BY badge_types.id; | |
-- | |
-- TOC entry 350 (class 1259 OID 45143) | |
-- Name: badges; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE badges ( | |
id integer NOT NULL, | |
name character varying(255) 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(255) 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 | |
); | |
ALTER TABLE public.badges OWNER TO discourse; | |
-- | |
-- TOC entry 351 (class 1259 OID 45160) | |
-- Name: badges_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE badges_id_seq | |
START WITH 100 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.badges_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4547 (class 0 OID 0) | |
-- Dependencies: 351 | |
-- Name: badges_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE badges_id_seq OWNED BY badges.id; | |
-- | |
-- TOC entry 352 (class 1259 OID 45162) | |
-- Name: categories_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE categories_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.categories_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4548 (class 0 OID 0) | |
-- Dependencies: 352 | |
-- Name: categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE categories_id_seq OWNED BY categories.id; | |
-- | |
-- TOC entry 353 (class 1259 OID 45164) | |
-- Name: category_custom_fields; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 354 (class 1259 OID 45170) | |
-- Name: category_custom_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE category_custom_fields_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.category_custom_fields_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4549 (class 0 OID 0) | |
-- Dependencies: 354 | |
-- Name: category_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE category_custom_fields_id_seq OWNED BY category_custom_fields.id; | |
-- | |
-- TOC entry 355 (class 1259 OID 45172) | |
-- Name: category_featured_topics; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 356 (class 1259 OID 45176) | |
-- Name: category_featured_topics_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE category_featured_topics_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.category_featured_topics_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4550 (class 0 OID 0) | |
-- Dependencies: 356 | |
-- Name: category_featured_topics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE category_featured_topics_id_seq OWNED BY category_featured_topics.id; | |
-- | |
-- TOC entry 357 (class 1259 OID 45178) | |
-- Name: category_featured_users; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE category_featured_users ( | |
id integer NOT NULL, | |
category_id integer, | |
user_id integer, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE public.category_featured_users OWNER TO discourse; | |
-- | |
-- TOC entry 358 (class 1259 OID 45181) | |
-- Name: category_featured_users_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE category_featured_users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.category_featured_users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4551 (class 0 OID 0) | |
-- Dependencies: 358 | |
-- Name: category_featured_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE category_featured_users_id_seq OWNED BY category_featured_users.id; | |
-- | |
-- TOC entry 359 (class 1259 OID 45183) | |
-- Name: category_groups; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 360 (class 1259 OID 45187) | |
-- Name: category_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE category_groups_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.category_groups_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4552 (class 0 OID 0) | |
-- Dependencies: 360 | |
-- Name: category_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE category_groups_id_seq OWNED BY category_groups.id; | |
-- | |
-- TOC entry 361 (class 1259 OID 45189) | |
-- Name: category_search_data; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE category_search_data ( | |
category_id integer NOT NULL, | |
search_data tsvector, | |
raw_data text, | |
locale text | |
); | |
ALTER TABLE public.category_search_data OWNER TO discourse; | |
-- | |
-- TOC entry 362 (class 1259 OID 45195) | |
-- Name: category_users; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE category_users ( | |
id integer NOT NULL, | |
category_id integer NOT NULL, | |
user_id integer NOT NULL, | |
notification_level integer NOT NULL | |
); | |
ALTER TABLE public.category_users OWNER TO discourse; | |
-- | |
-- TOC entry 363 (class 1259 OID 45198) | |
-- Name: category_users_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE category_users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.category_users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4553 (class 0 OID 0) | |
-- Dependencies: 363 | |
-- Name: category_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE category_users_id_seq OWNED BY category_users.id; | |
-- | |
-- TOC entry 364 (class 1259 OID 45200) | |
-- Name: color_scheme_colors; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE color_scheme_colors ( | |
id integer NOT NULL, | |
name character varying(255) NOT NULL, | |
hex character varying(255) 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 discourse; | |
-- | |
-- TOC entry 365 (class 1259 OID 45206) | |
-- Name: color_scheme_colors_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE color_scheme_colors_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.color_scheme_colors_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4554 (class 0 OID 0) | |
-- Dependencies: 365 | |
-- Name: color_scheme_colors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE color_scheme_colors_id_seq OWNED BY color_scheme_colors.id; | |
-- | |
-- TOC entry 366 (class 1259 OID 45208) | |
-- Name: color_schemes; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE color_schemes ( | |
id integer NOT NULL, | |
name character varying(255) NOT NULL, | |
enabled boolean DEFAULT false NOT NULL, | |
versioned_id integer, | |
version integer DEFAULT 1 NOT NULL, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE public.color_schemes OWNER TO discourse; | |
-- | |
-- TOC entry 367 (class 1259 OID 45213) | |
-- Name: color_schemes_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE color_schemes_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.color_schemes_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4555 (class 0 OID 0) | |
-- Dependencies: 367 | |
-- Name: color_schemes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE color_schemes_id_seq OWNED BY color_schemes.id; | |
-- | |
-- TOC entry 495 (class 1259 OID 48878) | |
-- Name: digest_unsubscribe_keys; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE digest_unsubscribe_keys ( | |
key character varying(64) NOT NULL, | |
user_id integer NOT NULL, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE public.digest_unsubscribe_keys OWNER TO discourse; | |
-- | |
-- TOC entry 497 (class 1259 OID 48989) | |
-- Name: directory_items; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 496 (class 1259 OID 48987) | |
-- Name: directory_items_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE directory_items_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.directory_items_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4556 (class 0 OID 0) | |
-- Dependencies: 496 | |
-- Name: directory_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE directory_items_id_seq OWNED BY directory_items.id; | |
-- | |
-- TOC entry 368 (class 1259 OID 45215) | |
-- Name: draft_sequences; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE draft_sequences ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
draft_key character varying(255) NOT NULL, | |
sequence integer NOT NULL | |
); | |
ALTER TABLE public.draft_sequences OWNER TO discourse; | |
-- | |
-- TOC entry 369 (class 1259 OID 45218) | |
-- Name: draft_sequences_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE draft_sequences_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.draft_sequences_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4557 (class 0 OID 0) | |
-- Dependencies: 369 | |
-- Name: draft_sequences_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE draft_sequences_id_seq OWNED BY draft_sequences.id; | |
-- | |
-- TOC entry 370 (class 1259 OID 45220) | |
-- Name: drafts; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE drafts ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
draft_key character varying(255) NOT NULL, | |
data text NOT NULL, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL, | |
sequence integer DEFAULT 0 NOT NULL, | |
revisions integer DEFAULT 1 NOT NULL | |
); | |
ALTER TABLE public.drafts OWNER TO discourse; | |
-- | |
-- TOC entry 371 (class 1259 OID 45227) | |
-- Name: drafts_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE drafts_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.drafts_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4558 (class 0 OID 0) | |
-- Dependencies: 371 | |
-- Name: drafts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE drafts_id_seq OWNED BY drafts.id; | |
-- | |
-- TOC entry 372 (class 1259 OID 45229) | |
-- Name: email_logs; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE email_logs ( | |
id integer NOT NULL, | |
to_address character varying(255) NOT NULL, | |
email_type character varying(255) NOT NULL, | |
user_id integer, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL, | |
reply_key character varying(32), | |
post_id integer, | |
topic_id integer, | |
skipped boolean DEFAULT false, | |
skipped_reason character varying(255) | |
); | |
ALTER TABLE public.email_logs OWNER TO discourse; | |
-- | |
-- TOC entry 373 (class 1259 OID 45236) | |
-- Name: email_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE email_logs_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.email_logs_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4559 (class 0 OID 0) | |
-- Dependencies: 373 | |
-- Name: email_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE email_logs_id_seq OWNED BY email_logs.id; | |
-- | |
-- TOC entry 374 (class 1259 OID 45238) | |
-- Name: email_tokens; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE email_tokens ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
email character varying(255) NOT NULL, | |
token character varying(255) 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 discourse; | |
-- | |
-- TOC entry 375 (class 1259 OID 45246) | |
-- Name: email_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE email_tokens_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.email_tokens_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4560 (class 0 OID 0) | |
-- Dependencies: 375 | |
-- Name: email_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE email_tokens_id_seq OWNED BY email_tokens.id; | |
-- | |
-- TOC entry 509 (class 1259 OID 112318) | |
-- Name: embeddable_hosts; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE embeddable_hosts ( | |
id integer NOT NULL, | |
host character varying(255) NOT NULL, | |
category_id integer NOT NULL, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE public.embeddable_hosts OWNER TO discourse; | |
-- | |
-- TOC entry 508 (class 1259 OID 112316) | |
-- Name: embeddable_hosts_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE embeddable_hosts_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.embeddable_hosts_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4561 (class 0 OID 0) | |
-- Dependencies: 508 | |
-- Name: embeddable_hosts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE embeddable_hosts_id_seq OWNED BY embeddable_hosts.id; | |
-- | |
-- TOC entry 376 (class 1259 OID 45248) | |
-- Name: facebook_user_infos; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE facebook_user_infos ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
facebook_user_id bigint NOT NULL, | |
username character varying(255), | |
first_name character varying(255), | |
last_name character varying(255), | |
email character varying(255), | |
gender character varying(255), | |
name character varying(255), | |
link character varying(255), | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE public.facebook_user_infos OWNER TO discourse; | |
-- | |
-- TOC entry 377 (class 1259 OID 45254) | |
-- Name: facebook_user_infos_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE facebook_user_infos_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.facebook_user_infos_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4562 (class 0 OID 0) | |
-- Dependencies: 377 | |
-- Name: facebook_user_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE facebook_user_infos_id_seq OWNED BY facebook_user_infos.id; | |
-- | |
-- TOC entry 378 (class 1259 OID 45256) | |
-- Name: github_user_infos; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE github_user_infos ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
screen_name character varying(255) NOT NULL, | |
github_user_id integer NOT NULL, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE public.github_user_infos OWNER TO discourse; | |
-- | |
-- TOC entry 379 (class 1259 OID 45259) | |
-- Name: github_user_infos_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE github_user_infos_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.github_user_infos_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4563 (class 0 OID 0) | |
-- Dependencies: 379 | |
-- Name: github_user_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE github_user_infos_id_seq OWNED BY github_user_infos.id; | |
-- | |
-- TOC entry 380 (class 1259 OID 45261) | |
-- Name: google_user_infos; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE google_user_infos ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
google_user_id character varying(255) NOT NULL, | |
first_name character varying(255), | |
last_name character varying(255), | |
email character varying(255), | |
gender character varying(255), | |
name character varying(255), | |
link character varying(255), | |
profile_link character varying(255), | |
picture character varying(255), | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE public.google_user_infos OWNER TO discourse; | |
-- | |
-- TOC entry 381 (class 1259 OID 45267) | |
-- Name: google_user_infos_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE google_user_infos_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.google_user_infos_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4564 (class 0 OID 0) | |
-- Dependencies: 381 | |
-- Name: google_user_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE google_user_infos_id_seq OWNED BY google_user_infos.id; | |
-- | |
-- TOC entry 382 (class 1259 OID 45269) | |
-- Name: group_custom_fields; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 383 (class 1259 OID 45275) | |
-- Name: group_custom_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE group_custom_fields_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.group_custom_fields_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4565 (class 0 OID 0) | |
-- Dependencies: 383 | |
-- Name: group_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE group_custom_fields_id_seq OWNED BY group_custom_fields.id; | |
-- | |
-- TOC entry 384 (class 1259 OID 45277) | |
-- Name: group_users; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 | |
); | |
ALTER TABLE public.group_users OWNER TO discourse; | |
-- | |
-- TOC entry 385 (class 1259 OID 45280) | |
-- Name: group_users_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE group_users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.group_users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4566 (class 0 OID 0) | |
-- Dependencies: 385 | |
-- Name: group_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE group_users_id_seq OWNED BY group_users.id; | |
-- | |
-- TOC entry 386 (class 1259 OID 45282) | |
-- Name: groups; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE groups ( | |
id integer NOT NULL, | |
name character varying(255) 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, | |
alias_level integer DEFAULT 0, | |
visible boolean DEFAULT true NOT NULL, | |
automatic_membership_email_domains text, | |
automatic_membership_retroactive boolean DEFAULT false, | |
primary_group boolean DEFAULT false NOT NULL, | |
title character varying(255), | |
grant_trust_level integer | |
); | |
ALTER TABLE public.groups OWNER TO discourse; | |
-- | |
-- TOC entry 387 (class 1259 OID 45289) | |
-- Name: groups_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE groups_id_seq | |
START WITH 100 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.groups_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4567 (class 0 OID 0) | |
-- Dependencies: 387 | |
-- Name: groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE groups_id_seq OWNED BY groups.id; | |
-- | |
-- TOC entry 388 (class 1259 OID 45291) | |
-- Name: incoming_domains; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 389 (class 1259 OID 45295) | |
-- Name: incoming_domains_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE incoming_domains_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.incoming_domains_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4568 (class 0 OID 0) | |
-- Dependencies: 389 | |
-- Name: incoming_domains_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE incoming_domains_id_seq OWNED BY incoming_domains.id; | |
-- | |
-- TOC entry 390 (class 1259 OID 45297) | |
-- Name: incoming_links; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 391 (class 1259 OID 45303) | |
-- Name: incoming_links_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE incoming_links_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.incoming_links_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4569 (class 0 OID 0) | |
-- Dependencies: 391 | |
-- Name: incoming_links_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE incoming_links_id_seq OWNED BY incoming_links.id; | |
-- | |
-- TOC entry 392 (class 1259 OID 45305) | |
-- Name: incoming_referers; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 393 (class 1259 OID 45311) | |
-- Name: incoming_referers_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE incoming_referers_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.incoming_referers_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4570 (class 0 OID 0) | |
-- Dependencies: 393 | |
-- Name: incoming_referers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE incoming_referers_id_seq OWNED BY incoming_referers.id; | |
-- | |
-- TOC entry 394 (class 1259 OID 45313) | |
-- Name: invited_groups; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 395 (class 1259 OID 45316) | |
-- Name: invited_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE invited_groups_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.invited_groups_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4571 (class 0 OID 0) | |
-- Dependencies: 395 | |
-- Name: invited_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE invited_groups_id_seq OWNED BY invited_groups.id; | |
-- | |
-- TOC entry 396 (class 1259 OID 45318) | |
-- Name: invites; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE invites ( | |
id integer NOT NULL, | |
invite_key character varying(32) NOT NULL, | |
email character varying(255), | |
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 | |
); | |
ALTER TABLE public.invites OWNER TO discourse; | |
-- | |
-- TOC entry 397 (class 1259 OID 45321) | |
-- Name: invites_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE invites_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.invites_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4572 (class 0 OID 0) | |
-- Dependencies: 397 | |
-- Name: invites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE invites_id_seq OWNED BY invites.id; | |
-- | |
-- TOC entry 398 (class 1259 OID 45323) | |
-- Name: message_bus; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE message_bus ( | |
id integer NOT NULL, | |
name character varying(255), | |
context character varying(255), | |
data text, | |
created_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE public.message_bus OWNER TO discourse; | |
-- | |
-- TOC entry 399 (class 1259 OID 45329) | |
-- Name: message_bus_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE message_bus_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.message_bus_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4573 (class 0 OID 0) | |
-- Dependencies: 399 | |
-- Name: message_bus_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE message_bus_id_seq OWNED BY message_bus.id; | |
-- | |
-- TOC entry 499 (class 1259 OID 49007) | |
-- Name: muted_users; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE muted_users ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
muted_user_id integer NOT NULL, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE public.muted_users OWNER TO discourse; | |
-- | |
-- TOC entry 498 (class 1259 OID 49005) | |
-- Name: muted_users_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE muted_users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.muted_users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4574 (class 0 OID 0) | |
-- Dependencies: 498 | |
-- Name: muted_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE muted_users_id_seq OWNED BY muted_users.id; | |
-- | |
-- TOC entry 400 (class 1259 OID 45331) | |
-- Name: notifications; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 | |
); | |
ALTER TABLE public.notifications OWNER TO discourse; | |
-- | |
-- TOC entry 401 (class 1259 OID 45338) | |
-- Name: notifications_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE notifications_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.notifications_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4575 (class 0 OID 0) | |
-- Dependencies: 401 | |
-- Name: notifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE notifications_id_seq OWNED BY notifications.id; | |
-- | |
-- TOC entry 402 (class 1259 OID 45340) | |
-- Name: oauth2_user_infos; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE oauth2_user_infos ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
uid character varying(255) NOT NULL, | |
provider character varying(255) NOT NULL, | |
email character varying(255), | |
name character varying(255), | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE public.oauth2_user_infos OWNER TO discourse; | |
-- | |
-- TOC entry 403 (class 1259 OID 45346) | |
-- Name: oauth2_user_infos_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE oauth2_user_infos_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.oauth2_user_infos_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4576 (class 0 OID 0) | |
-- Dependencies: 403 | |
-- Name: oauth2_user_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE oauth2_user_infos_id_seq OWNED BY oauth2_user_infos.id; | |
-- | |
-- TOC entry 404 (class 1259 OID 45348) | |
-- Name: optimized_images; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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(255) NOT NULL | |
); | |
ALTER TABLE public.optimized_images OWNER TO discourse; | |
-- | |
-- TOC entry 405 (class 1259 OID 45351) | |
-- Name: optimized_images_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE optimized_images_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.optimized_images_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4577 (class 0 OID 0) | |
-- Dependencies: 405 | |
-- Name: optimized_images_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE optimized_images_id_seq OWNED BY optimized_images.id; | |
-- | |
-- TOC entry 406 (class 1259 OID 45353) | |
-- Name: permalinks; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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, | |
updated_at timestamp without time zone, | |
external_url character varying(1000) | |
); | |
ALTER TABLE public.permalinks OWNER TO discourse; | |
-- | |
-- TOC entry 407 (class 1259 OID 45359) | |
-- Name: permalinks_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE permalinks_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.permalinks_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4578 (class 0 OID 0) | |
-- Dependencies: 407 | |
-- Name: permalinks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE permalinks_id_seq OWNED BY permalinks.id; | |
-- | |
-- TOC entry 408 (class 1259 OID 45361) | |
-- Name: plugin_store_rows; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE plugin_store_rows ( | |
id integer NOT NULL, | |
plugin_name character varying(255) NOT NULL, | |
key character varying(255) NOT NULL, | |
type_name character varying(255) NOT NULL, | |
value text | |
); | |
ALTER TABLE public.plugin_store_rows OWNER TO discourse; | |
-- | |
-- TOC entry 409 (class 1259 OID 45367) | |
-- Name: plugin_store_rows_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE plugin_store_rows_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.plugin_store_rows_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4579 (class 0 OID 0) | |
-- Dependencies: 409 | |
-- Name: plugin_store_rows_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE plugin_store_rows_id_seq OWNED BY plugin_store_rows.id; | |
-- | |
-- TOC entry 410 (class 1259 OID 45369) | |
-- Name: post_action_types; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 | |
); | |
ALTER TABLE public.post_action_types OWNER TO discourse; | |
-- | |
-- TOC entry 411 (class 1259 OID 45374) | |
-- Name: post_action_types_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE post_action_types_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.post_action_types_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4580 (class 0 OID 0) | |
-- Dependencies: 411 | |
-- Name: post_action_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE post_action_types_id_seq OWNED BY post_action_types.id; | |
-- | |
-- TOC entry 412 (class 1259 OID 45376) | |
-- Name: post_actions; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 413 (class 1259 OID 45381) | |
-- Name: post_actions_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE post_actions_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.post_actions_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4581 (class 0 OID 0) | |
-- Dependencies: 413 | |
-- Name: post_actions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE post_actions_id_seq OWNED BY post_actions.id; | |
-- | |
-- TOC entry 414 (class 1259 OID 45383) | |
-- Name: post_custom_fields; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 415 (class 1259 OID 45389) | |
-- Name: post_custom_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE post_custom_fields_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.post_custom_fields_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4582 (class 0 OID 0) | |
-- Dependencies: 415 | |
-- Name: post_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE post_custom_fields_id_seq OWNED BY post_custom_fields.id; | |
-- | |
-- TOC entry 416 (class 1259 OID 45391) | |
-- Name: post_details; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE post_details ( | |
id integer NOT NULL, | |
post_id integer, | |
key character varying(255), | |
value character varying(255), | |
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 discourse; | |
-- | |
-- TOC entry 417 (class 1259 OID 45397) | |
-- Name: post_details_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE post_details_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.post_details_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4583 (class 0 OID 0) | |
-- Dependencies: 417 | |
-- Name: post_details_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE post_details_id_seq OWNED BY post_details.id; | |
-- | |
-- TOC entry 418 (class 1259 OID 45399) | |
-- Name: post_replies; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE post_replies ( | |
post_id integer, | |
reply_id integer, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE public.post_replies OWNER TO discourse; | |
-- | |
-- TOC entry 419 (class 1259 OID 45402) | |
-- Name: post_revisions; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 420 (class 1259 OID 45408) | |
-- Name: post_revisions_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE post_revisions_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.post_revisions_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4584 (class 0 OID 0) | |
-- Dependencies: 420 | |
-- Name: post_revisions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE post_revisions_id_seq OWNED BY post_revisions.id; | |
-- | |
-- TOC entry 421 (class 1259 OID 45410) | |
-- Name: post_search_data; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE post_search_data ( | |
post_id integer NOT NULL, | |
search_data tsvector, | |
raw_data text, | |
locale character varying(255) | |
); | |
ALTER TABLE public.post_search_data OWNER TO discourse; | |
-- | |
-- TOC entry 507 (class 1259 OID 112309) | |
-- Name: post_stats; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE public.post_stats OWNER TO discourse; | |
-- | |
-- TOC entry 506 (class 1259 OID 112307) | |
-- Name: post_stats_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE post_stats_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.post_stats_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4585 (class 0 OID 0) | |
-- Dependencies: 506 | |
-- Name: post_stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE post_stats_id_seq OWNED BY post_stats.id; | |
-- | |
-- TOC entry 422 (class 1259 OID 45416) | |
-- Name: post_timings; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 423 (class 1259 OID 45419) | |
-- Name: post_uploads; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE post_uploads ( | |
id integer NOT NULL, | |
post_id integer NOT NULL, | |
upload_id integer NOT NULL | |
); | |
ALTER TABLE public.post_uploads OWNER TO discourse; | |
-- | |
-- TOC entry 424 (class 1259 OID 45422) | |
-- Name: post_uploads_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE post_uploads_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.post_uploads_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4586 (class 0 OID 0) | |
-- Dependencies: 424 | |
-- Name: post_uploads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE post_uploads_id_seq OWNED BY post_uploads.id; | |
-- | |
-- TOC entry 425 (class 1259 OID 45424) | |
-- Name: posts_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE posts_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.posts_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4587 (class 0 OID 0) | |
-- Dependencies: 425 | |
-- Name: posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE posts_id_seq OWNED BY posts.id; | |
-- | |
-- TOC entry 501 (class 1259 OID 49029) | |
-- Name: queued_posts; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE queued_posts ( | |
id integer NOT NULL, | |
queue character varying(255) NOT NULL, | |
state integer NOT NULL, | |
user_id integer NOT NULL, | |
raw text NOT NULL, | |
post_options json NOT NULL, | |
topic_id integer, | |
approved_by_id integer, | |
approved_at timestamp without time zone, | |
rejected_by_id integer, | |
rejected_at timestamp without time zone, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE public.queued_posts OWNER TO discourse; | |
-- | |
-- TOC entry 500 (class 1259 OID 49027) | |
-- Name: queued_posts_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE queued_posts_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.queued_posts_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4588 (class 0 OID 0) | |
-- Dependencies: 500 | |
-- Name: queued_posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE queued_posts_id_seq OWNED BY queued_posts.id; | |
-- | |
-- TOC entry 426 (class 1259 OID 45426) | |
-- Name: quoted_posts; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 427 (class 1259 OID 45429) | |
-- Name: quoted_posts_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE quoted_posts_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.quoted_posts_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4589 (class 0 OID 0) | |
-- Dependencies: 427 | |
-- Name: quoted_posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE quoted_posts_id_seq OWNED BY quoted_posts.id; | |
-- | |
-- TOC entry 428 (class 1259 OID 45431) | |
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE schema_migrations ( | |
version character varying(255) NOT NULL | |
); | |
ALTER TABLE public.schema_migrations OWNER TO discourse; | |
-- | |
-- TOC entry 429 (class 1259 OID 45434) | |
-- Name: screened_emails; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE screened_emails ( | |
id integer NOT NULL, | |
email character varying(255) 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 discourse; | |
-- | |
-- TOC entry 430 (class 1259 OID 45441) | |
-- Name: screened_emails_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE screened_emails_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.screened_emails_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4590 (class 0 OID 0) | |
-- Dependencies: 430 | |
-- Name: screened_emails_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE screened_emails_id_seq OWNED BY screened_emails.id; | |
-- | |
-- TOC entry 431 (class 1259 OID 45443) | |
-- Name: screened_ip_addresses; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 432 (class 1259 OID 45450) | |
-- Name: screened_ip_addresses_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE screened_ip_addresses_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.screened_ip_addresses_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4591 (class 0 OID 0) | |
-- Dependencies: 432 | |
-- Name: screened_ip_addresses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE screened_ip_addresses_id_seq OWNED BY screened_ip_addresses.id; | |
-- | |
-- TOC entry 433 (class 1259 OID 45452) | |
-- Name: screened_urls; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE screened_urls ( | |
id integer NOT NULL, | |
url character varying(255) NOT NULL, | |
domain character varying(255) 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 discourse; | |
-- | |
-- TOC entry 434 (class 1259 OID 45459) | |
-- Name: screened_urls_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE screened_urls_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.screened_urls_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4592 (class 0 OID 0) | |
-- Dependencies: 434 | |
-- Name: screened_urls_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE screened_urls_id_seq OWNED BY screened_urls.id; | |
-- | |
-- TOC entry 435 (class 1259 OID 45461) | |
-- Name: single_sign_on_records; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE single_sign_on_records ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
external_id character varying(255) 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(255), | |
external_email character varying(255), | |
external_name character varying(255), | |
external_avatar_url character varying(255) | |
); | |
ALTER TABLE public.single_sign_on_records OWNER TO discourse; | |
-- | |
-- TOC entry 436 (class 1259 OID 45467) | |
-- Name: single_sign_on_records_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE single_sign_on_records_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.single_sign_on_records_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4593 (class 0 OID 0) | |
-- Dependencies: 436 | |
-- Name: single_sign_on_records_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE single_sign_on_records_id_seq OWNED BY single_sign_on_records.id; | |
-- | |
-- TOC entry 437 (class 1259 OID 45475) | |
-- Name: site_customizations; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE site_customizations ( | |
id integer NOT NULL, | |
name character varying(255) NOT NULL, | |
stylesheet text, | |
header text, | |
user_id integer NOT NULL, | |
enabled boolean NOT NULL, | |
key character varying(255) NOT NULL, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL, | |
stylesheet_baked text DEFAULT ''::text NOT NULL, | |
mobile_stylesheet text, | |
mobile_header text, | |
mobile_stylesheet_baked text, | |
footer text, | |
mobile_footer text, | |
head_tag text, | |
body_tag text, | |
top text, | |
mobile_top text, | |
embedded_css text, | |
embedded_css_baked text, | |
head_tag_baked text, | |
body_tag_baked text, | |
header_baked text, | |
mobile_header_baked text, | |
footer_baked text, | |
mobile_footer_baked text | |
); | |
ALTER TABLE public.site_customizations OWNER TO discourse; | |
-- | |
-- TOC entry 438 (class 1259 OID 45483) | |
-- Name: site_customizations_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE site_customizations_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.site_customizations_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4594 (class 0 OID 0) | |
-- Dependencies: 438 | |
-- Name: site_customizations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE site_customizations_id_seq OWNED BY site_customizations.id; | |
-- | |
-- TOC entry 439 (class 1259 OID 45485) | |
-- Name: site_settings; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE site_settings ( | |
id integer NOT NULL, | |
name character varying(255) 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 discourse; | |
-- | |
-- TOC entry 440 (class 1259 OID 45491) | |
-- Name: site_settings_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE site_settings_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.site_settings_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4595 (class 0 OID 0) | |
-- Dependencies: 440 | |
-- Name: site_settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE site_settings_id_seq OWNED BY site_settings.id; | |
-- | |
-- TOC entry 503 (class 1259 OID 49056) | |
-- Name: stylesheet_cache; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE stylesheet_cache ( | |
id integer NOT NULL, | |
target character varying(255) NOT NULL, | |
digest character varying(255) NOT NULL, | |
content text NOT NULL, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE public.stylesheet_cache OWNER TO discourse; | |
-- | |
-- TOC entry 502 (class 1259 OID 49054) | |
-- Name: stylesheet_cache_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE stylesheet_cache_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.stylesheet_cache_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4596 (class 0 OID 0) | |
-- Dependencies: 502 | |
-- Name: stylesheet_cache_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE stylesheet_cache_id_seq OWNED BY stylesheet_cache.id; | |
-- | |
-- TOC entry 441 (class 1259 OID 45493) | |
-- Name: top_topics; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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, | |
yearly_score double precision DEFAULT 0, | |
monthly_score double precision DEFAULT 0, | |
weekly_score double precision DEFAULT 0, | |
daily_score double precision DEFAULT 0, | |
all_score double precision DEFAULT 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 discourse; | |
-- | |
-- TOC entry 442 (class 1259 OID 45512) | |
-- Name: top_topics_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE top_topics_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.top_topics_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4597 (class 0 OID 0) | |
-- Dependencies: 442 | |
-- Name: top_topics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE top_topics_id_seq OWNED BY top_topics.id; | |
-- | |
-- TOC entry 443 (class 1259 OID 45514) | |
-- Name: topic_allowed_groups; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 444 (class 1259 OID 45517) | |
-- Name: topic_allowed_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_allowed_groups_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.topic_allowed_groups_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4598 (class 0 OID 0) | |
-- Dependencies: 444 | |
-- Name: topic_allowed_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_allowed_groups_id_seq OWNED BY topic_allowed_groups.id; | |
-- | |
-- TOC entry 445 (class 1259 OID 45519) | |
-- Name: topic_allowed_users; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 446 (class 1259 OID 45522) | |
-- Name: topic_allowed_users_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_allowed_users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.topic_allowed_users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4599 (class 0 OID 0) | |
-- Dependencies: 446 | |
-- Name: topic_allowed_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_allowed_users_id_seq OWNED BY topic_allowed_users.id; | |
-- | |
-- TOC entry 447 (class 1259 OID 45524) | |
-- Name: topic_custom_fields; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 448 (class 1259 OID 45530) | |
-- Name: topic_custom_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_custom_fields_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.topic_custom_fields_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4600 (class 0 OID 0) | |
-- Dependencies: 448 | |
-- Name: topic_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_custom_fields_id_seq OWNED BY topic_custom_fields.id; | |
-- | |
-- TOC entry 449 (class 1259 OID 45532) | |
-- Name: topic_embeds; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 | |
); | |
ALTER TABLE public.topic_embeds OWNER TO discourse; | |
-- | |
-- TOC entry 450 (class 1259 OID 45535) | |
-- Name: topic_embeds_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_embeds_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.topic_embeds_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4601 (class 0 OID 0) | |
-- Dependencies: 450 | |
-- Name: topic_embeds_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_embeds_id_seq OWNED BY topic_embeds.id; | |
-- | |
-- TOC entry 451 (class 1259 OID 45537) | |
-- Name: topic_invites; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 452 (class 1259 OID 45540) | |
-- Name: topic_invites_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_invites_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.topic_invites_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4602 (class 0 OID 0) | |
-- Dependencies: 452 | |
-- Name: topic_invites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_invites_id_seq OWNED BY topic_invites.id; | |
-- | |
-- TOC entry 453 (class 1259 OID 45542) | |
-- Name: topic_link_clicks; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 NOT NULL | |
); | |
ALTER TABLE public.topic_link_clicks OWNER TO discourse; | |
-- | |
-- TOC entry 454 (class 1259 OID 45548) | |
-- Name: topic_link_clicks_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_link_clicks_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.topic_link_clicks_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4603 (class 0 OID 0) | |
-- Dependencies: 454 | |
-- Name: topic_link_clicks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_link_clicks_id_seq OWNED BY topic_link_clicks.id; | |
-- | |
-- TOC entry 455 (class 1259 OID 45550) | |
-- Name: topic_links; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE topic_links ( | |
id integer NOT NULL, | |
topic_id integer NOT NULL, | |
post_id integer, | |
user_id integer NOT NULL, | |
url character varying(500) 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(255), | |
crawled_at timestamp without time zone, | |
quote boolean DEFAULT false NOT NULL | |
); | |
ALTER TABLE public.topic_links OWNER TO discourse; | |
-- | |
-- TOC entry 456 (class 1259 OID 45560) | |
-- Name: topic_links_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_links_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.topic_links_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4604 (class 0 OID 0) | |
-- Dependencies: 456 | |
-- Name: topic_links_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_links_id_seq OWNED BY topic_links.id; | |
-- | |
-- TOC entry 457 (class 1259 OID 45562) | |
-- Name: topic_search_data; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE topic_search_data ( | |
topic_id integer NOT NULL, | |
raw_data text, | |
locale character varying(255) NOT NULL, | |
search_data tsvector | |
); | |
ALTER TABLE public.topic_search_data OWNER TO discourse; | |
-- | |
-- TOC entry 458 (class 1259 OID 45568) | |
-- Name: topic_users; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE topic_users ( | |
user_id integer NOT NULL, | |
topic_id integer NOT NULL, | |
posted boolean DEFAULT false NOT NULL, | |
last_read_post_number integer, | |
highest_seen_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 | |
); | |
ALTER TABLE public.topic_users OWNER TO discourse; | |
-- | |
-- TOC entry 459 (class 1259 OID 45576) | |
-- Name: topic_users_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE topic_users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.topic_users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4605 (class 0 OID 0) | |
-- Dependencies: 459 | |
-- Name: topic_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE topic_users_id_seq OWNED BY topic_users.id; | |
-- | |
-- TOC entry 460 (class 1259 OID 45578) | |
-- Name: topic_views; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE topic_views ( | |
topic_id integer NOT NULL, | |
viewed_at date NOT NULL, | |
user_id integer, | |
ip_address inet NOT NULL | |
); | |
ALTER TABLE public.topic_views OWNER TO discourse; | |
-- | |
-- TOC entry 461 (class 1259 OID 45584) | |
-- Name: topics_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE topics_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.topics_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4606 (class 0 OID 0) | |
-- Dependencies: 461 | |
-- Name: topics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE topics_id_seq OWNED BY topics.id; | |
-- | |
-- TOC entry 514 (class 1259 OID 135558) | |
-- Name: translation_overrides; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 | |
); | |
ALTER TABLE public.translation_overrides OWNER TO discourse; | |
-- | |
-- TOC entry 513 (class 1259 OID 135556) | |
-- Name: translation_overrides_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE translation_overrides_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.translation_overrides_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4607 (class 0 OID 0) | |
-- Dependencies: 513 | |
-- Name: translation_overrides_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE translation_overrides_id_seq OWNED BY translation_overrides.id; | |
-- | |
-- TOC entry 462 (class 1259 OID 45586) | |
-- Name: twitter_user_infos; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE twitter_user_infos ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
screen_name character varying(255) NOT NULL, | |
twitter_user_id bigint NOT NULL, | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE public.twitter_user_infos OWNER TO discourse; | |
-- | |
-- TOC entry 463 (class 1259 OID 45589) | |
-- Name: twitter_user_infos_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE twitter_user_infos_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.twitter_user_infos_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4608 (class 0 OID 0) | |
-- Dependencies: 463 | |
-- Name: twitter_user_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE twitter_user_infos_id_seq OWNED BY twitter_user_infos.id; | |
-- | |
-- TOC entry 464 (class 1259 OID 45591) | |
-- Name: uploads; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE uploads ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
original_filename character varying(255) NOT NULL, | |
filesize integer NOT NULL, | |
width integer, | |
height integer, | |
url character varying(255) 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 | |
); | |
ALTER TABLE public.uploads OWNER TO discourse; | |
-- | |
-- TOC entry 465 (class 1259 OID 45597) | |
-- Name: uploads_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE uploads_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.uploads_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4609 (class 0 OID 0) | |
-- Dependencies: 465 | |
-- Name: uploads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE uploads_id_seq OWNED BY uploads.id; | |
-- | |
-- TOC entry 466 (class 1259 OID 45599) | |
-- Name: user_actions; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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, | |
queued_post_id integer | |
); | |
ALTER TABLE public.user_actions OWNER TO discourse; | |
-- | |
-- TOC entry 467 (class 1259 OID 45602) | |
-- Name: user_actions_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE user_actions_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.user_actions_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4610 (class 0 OID 0) | |
-- Dependencies: 467 | |
-- Name: user_actions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE user_actions_id_seq OWNED BY user_actions.id; | |
-- | |
-- TOC entry 468 (class 1259 OID 45604) | |
-- Name: user_avatars; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 469 (class 1259 OID 45607) | |
-- Name: user_avatars_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE user_avatars_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.user_avatars_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4611 (class 0 OID 0) | |
-- Dependencies: 469 | |
-- Name: user_avatars_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE user_avatars_id_seq OWNED BY user_avatars.id; | |
-- | |
-- TOC entry 470 (class 1259 OID 45609) | |
-- Name: user_badges; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 | |
); | |
ALTER TABLE public.user_badges OWNER TO discourse; | |
-- | |
-- TOC entry 471 (class 1259 OID 45613) | |
-- Name: user_badges_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE user_badges_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.user_badges_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4612 (class 0 OID 0) | |
-- Dependencies: 471 | |
-- Name: user_badges_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE user_badges_id_seq OWNED BY user_badges.id; | |
-- | |
-- TOC entry 472 (class 1259 OID 45615) | |
-- Name: user_custom_fields; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 discourse; | |
-- | |
-- TOC entry 473 (class 1259 OID 45621) | |
-- Name: user_custom_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE user_custom_fields_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.user_custom_fields_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4613 (class 0 OID 0) | |
-- Dependencies: 473 | |
-- Name: user_custom_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE user_custom_fields_id_seq OWNED BY user_custom_fields.id; | |
-- | |
-- TOC entry 492 (class 1259 OID 48811) | |
-- Name: user_exports; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE user_exports ( | |
id integer NOT NULL, | |
file_name character varying(255) NOT NULL, | |
user_id integer NOT NULL, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE public.user_exports OWNER TO discourse; | |
-- | |
-- TOC entry 491 (class 1259 OID 48809) | |
-- Name: user_exports_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE user_exports_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.user_exports_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4614 (class 0 OID 0) | |
-- Dependencies: 491 | |
-- Name: user_exports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE user_exports_id_seq OWNED BY user_exports.id; | |
-- | |
-- TOC entry 505 (class 1259 OID 108108) | |
-- Name: user_field_options; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE user_field_options ( | |
id integer NOT NULL, | |
user_field_id integer NOT NULL, | |
value character varying(255) NOT NULL, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE public.user_field_options OWNER TO discourse; | |
-- | |
-- TOC entry 504 (class 1259 OID 108106) | |
-- Name: user_field_options_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE user_field_options_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.user_field_options_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4615 (class 0 OID 0) | |
-- Dependencies: 504 | |
-- Name: user_field_options_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE user_field_options_id_seq OWNED BY user_field_options.id; | |
-- | |
-- TOC entry 490 (class 1259 OID 47688) | |
-- Name: user_fields; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE user_fields ( | |
id integer NOT NULL, | |
name character varying(255) NOT NULL, | |
field_type character varying(255) NOT NULL, | |
created_at timestamp without time zone, | |
updated_at timestamp without time zone, | |
editable boolean DEFAULT false NOT NULL, | |
description character varying(255) NOT NULL, | |
required boolean DEFAULT true NOT NULL, | |
show_on_profile boolean DEFAULT false NOT NULL, | |
"position" integer DEFAULT 0 | |
); | |
ALTER TABLE public.user_fields OWNER TO discourse; | |
-- | |
-- TOC entry 489 (class 1259 OID 47686) | |
-- Name: user_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE user_fields_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.user_fields_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4616 (class 0 OID 0) | |
-- Dependencies: 489 | |
-- Name: user_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE user_fields_id_seq OWNED BY user_fields.id; | |
-- | |
-- TOC entry 474 (class 1259 OID 45623) | |
-- Name: user_histories; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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(255), | |
ip_address character varying(255), | |
email character varying(255), | |
subject text, | |
previous_value text, | |
new_value text, | |
topic_id integer, | |
admin_only boolean DEFAULT false, | |
post_id integer, | |
custom_type character varying(255), | |
category_id integer | |
); | |
ALTER TABLE public.user_histories OWNER TO discourse; | |
-- | |
-- TOC entry 475 (class 1259 OID 45630) | |
-- Name: user_histories_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE user_histories_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.user_histories_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4617 (class 0 OID 0) | |
-- Dependencies: 475 | |
-- Name: user_histories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE user_histories_id_seq OWNED BY user_histories.id; | |
-- | |
-- TOC entry 476 (class 1259 OID 45632) | |
-- Name: user_open_ids; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE user_open_ids ( | |
id integer NOT NULL, | |
user_id integer NOT NULL, | |
email character varying(255) NOT NULL, | |
url character varying(255) 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 discourse; | |
-- | |
-- TOC entry 477 (class 1259 OID 45638) | |
-- Name: user_open_ids_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE user_open_ids_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.user_open_ids_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4618 (class 0 OID 0) | |
-- Dependencies: 477 | |
-- Name: user_open_ids_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE user_open_ids_id_seq OWNED BY user_open_ids.id; | |
-- | |
-- TOC entry 511 (class 1259 OID 115401) | |
-- Name: user_profile_views; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE user_profile_views ( | |
id integer NOT NULL, | |
user_profile_id integer NOT NULL, | |
viewed_at timestamp without time zone NOT NULL, | |
ip_address inet NOT NULL, | |
user_id integer | |
); | |
ALTER TABLE public.user_profile_views OWNER TO discourse; | |
-- | |
-- TOC entry 510 (class 1259 OID 115399) | |
-- Name: user_profile_views_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE user_profile_views_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.user_profile_views_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4619 (class 0 OID 0) | |
-- Dependencies: 510 | |
-- Name: user_profile_views_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE user_profile_views_id_seq OWNED BY user_profile_views.id; | |
-- | |
-- TOC entry 478 (class 1259 OID 45640) | |
-- Name: user_profiles; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE user_profiles ( | |
user_id integer NOT NULL, | |
location character varying(255), | |
website character varying(255), | |
bio_raw text, | |
bio_cooked text, | |
dismissed_banner_key integer, | |
profile_background character varying(255), | |
bio_cooked_version integer, | |
badge_granted_title boolean DEFAULT false, | |
card_background character varying(255), | |
card_image_badge_id integer, | |
views integer DEFAULT 0 NOT NULL | |
); | |
ALTER TABLE public.user_profiles OWNER TO discourse; | |
-- | |
-- TOC entry 479 (class 1259 OID 45646) | |
-- Name: user_search_data; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE user_search_data ( | |
user_id integer NOT NULL, | |
search_data tsvector, | |
raw_data text, | |
locale text | |
); | |
ALTER TABLE public.user_search_data OWNER TO discourse; | |
-- | |
-- TOC entry 480 (class 1259 OID 45652) | |
-- Name: user_stats; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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, | |
topic_reply_count 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 | |
); | |
ALTER TABLE public.user_stats OWNER TO discourse; | |
-- | |
-- TOC entry 481 (class 1259 OID 45664) | |
-- Name: user_visits; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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 | |
); | |
ALTER TABLE public.user_visits OWNER TO discourse; | |
-- | |
-- TOC entry 482 (class 1259 OID 45668) | |
-- Name: user_visits_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE user_visits_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.user_visits_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4620 (class 0 OID 0) | |
-- Dependencies: 482 | |
-- Name: user_visits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE user_visits_id_seq OWNED BY user_visits.id; | |
-- | |
-- TOC entry 483 (class 1259 OID 45670) | |
-- Name: users; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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(255), | |
seen_notification_id integer DEFAULT 0 NOT NULL, | |
last_posted_at timestamp without time zone, | |
email character varying(513) NOT NULL, | |
password_hash character varying(64), | |
salt character varying(32), | |
active boolean DEFAULT false NOT NULL, | |
username_lower character varying(60) NOT NULL, | |
auth_token character varying(32), | |
last_seen_at timestamp without time zone, | |
admin boolean DEFAULT false NOT NULL, | |
last_emailed_at timestamp without time zone, | |
email_digests boolean NOT NULL, | |
trust_level integer NOT NULL, | |
email_private_messages boolean DEFAULT true, | |
email_direct boolean DEFAULT true NOT NULL, | |
approved boolean DEFAULT false NOT NULL, | |
approved_by_id integer, | |
approved_at timestamp without time zone, | |
digest_after_days integer, | |
previous_visit_at timestamp without time zone, | |
suspended_at timestamp without time zone, | |
suspended_till timestamp without time zone, | |
date_of_birth date, | |
auto_track_topics_after_msecs integer, | |
views integer DEFAULT 0 NOT NULL, | |
flag_level integer DEFAULT 0 NOT NULL, | |
ip_address inet, | |
new_topic_duration_minutes integer, | |
external_links_in_new_tab boolean NOT NULL, | |
enable_quoting boolean DEFAULT true NOT NULL, | |
moderator boolean DEFAULT false, | |
blocked boolean DEFAULT false, | |
dynamic_favicon boolean DEFAULT false NOT NULL, | |
title character varying(255), | |
uploaded_avatar_id integer, | |
email_always boolean DEFAULT false NOT NULL, | |
mailing_list_mode boolean DEFAULT false NOT NULL, | |
locale character varying(10), | |
primary_group_id integer, | |
registration_ip_address inet, | |
last_redirected_to_top_at timestamp without time zone, | |
disable_jump_reply boolean DEFAULT false NOT NULL, | |
edit_history_public boolean DEFAULT false NOT NULL, | |
trust_level_locked boolean DEFAULT false NOT NULL, | |
staged boolean DEFAULT false NOT NULL, | |
automatically_unpin_topics boolean DEFAULT true | |
); | |
ALTER TABLE public.users OWNER TO discourse; | |
-- | |
-- TOC entry 484 (class 1259 OID 45692) | |
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE users_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.users_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4621 (class 0 OID 0) | |
-- Dependencies: 484 | |
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE users_id_seq OWNED BY users.id; | |
-- | |
-- TOC entry 485 (class 1259 OID 45694) | |
-- Name: versions; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE versions ( | |
id integer NOT NULL, | |
versioned_id integer, | |
versioned_type character varying(255), | |
user_id integer, | |
user_type character varying(255), | |
user_name character varying(255), | |
modifications text, | |
number integer, | |
reverted_from integer, | |
tag character varying(255), | |
created_at timestamp without time zone NOT NULL, | |
updated_at timestamp without time zone NOT NULL | |
); | |
ALTER TABLE public.versions OWNER TO discourse; | |
-- | |
-- TOC entry 486 (class 1259 OID 45700) | |
-- Name: versions_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE versions_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.versions_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4622 (class 0 OID 0) | |
-- Dependencies: 486 | |
-- Name: versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE versions_id_seq OWNED BY versions.id; | |
-- | |
-- TOC entry 487 (class 1259 OID 45702) | |
-- Name: warnings; Type: TABLE; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE TABLE 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, | |
updated_at timestamp without time zone | |
); | |
ALTER TABLE public.warnings OWNER TO discourse; | |
-- | |
-- TOC entry 488 (class 1259 OID 45705) | |
-- Name: warnings_id_seq; Type: SEQUENCE; Schema: public; Owner: discourse | |
-- | |
CREATE SEQUENCE warnings_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public.warnings_id_seq OWNER TO discourse; | |
-- | |
-- TOC entry 4623 (class 0 OID 0) | |
-- Dependencies: 488 | |
-- Name: warnings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: discourse | |
-- | |
ALTER SEQUENCE warnings_id_seq OWNED BY warnings.id; | |
SET search_path = backup, pg_catalog; | |
-- | |
-- TOC entry 3136 (class 2604 OID 37514) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY api_keys ALTER COLUMN id SET DEFAULT nextval('api_keys_id_seq'::regclass); | |
-- | |
-- TOC entry 3375 (class 2604 OID 40675) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY application_requests ALTER COLUMN id SET DEFAULT nextval('application_requests_id_seq'::regclass); | |
-- | |
-- TOC entry 3138 (class 2604 OID 37515) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY badge_groupings ALTER COLUMN id SET DEFAULT nextval('badge_groupings_id_seq'::regclass); | |
-- | |
-- TOC entry 3209 (class 2604 OID 37516) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY badge_types ALTER COLUMN id SET DEFAULT nextval('badge_types_id_seq'::regclass); | |
-- | |
-- TOC entry 3210 (class 2604 OID 37517) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY badges ALTER COLUMN id SET DEFAULT nextval('badges_id_seq'::regclass); | |
-- | |
-- TOC entry 3154 (class 2604 OID 37518) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY categories ALTER COLUMN id SET DEFAULT nextval('categories_id_seq'::regclass); | |
-- | |
-- TOC entry 3222 (class 2604 OID 37519) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY category_custom_fields ALTER COLUMN id SET DEFAULT nextval('category_custom_fields_id_seq'::regclass); | |
-- | |
-- TOC entry 3224 (class 2604 OID 37520) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY category_featured_topics ALTER COLUMN id SET DEFAULT nextval('category_featured_topics_id_seq'::regclass); | |
-- | |
-- TOC entry 3225 (class 2604 OID 37521) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY category_featured_users ALTER COLUMN id SET DEFAULT nextval('category_featured_users_id_seq'::regclass); | |
-- | |
-- TOC entry 3226 (class 2604 OID 37522) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY category_groups ALTER COLUMN id SET DEFAULT nextval('category_groups_id_seq'::regclass); | |
-- | |
-- TOC entry 3228 (class 2604 OID 37523) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY category_users ALTER COLUMN id SET DEFAULT nextval('category_users_id_seq'::regclass); | |
-- | |
-- TOC entry 3229 (class 2604 OID 37524) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY color_scheme_colors ALTER COLUMN id SET DEFAULT nextval('color_scheme_colors_id_seq'::regclass); | |
-- | |
-- TOC entry 3230 (class 2604 OID 37525) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY color_schemes ALTER COLUMN id SET DEFAULT nextval('color_schemes_id_seq'::regclass); | |
-- | |
-- TOC entry 3377 (class 2604 OID 40800) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY directory_items ALTER COLUMN id SET DEFAULT nextval('directory_items_id_seq'::regclass); | |
-- | |
-- TOC entry 3233 (class 2604 OID 37526) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY draft_sequences ALTER COLUMN id SET DEFAULT nextval('draft_sequences_id_seq'::regclass); | |
-- | |
-- TOC entry 3234 (class 2604 OID 37527) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY drafts ALTER COLUMN id SET DEFAULT nextval('drafts_id_seq'::regclass); | |
-- | |
-- TOC entry 3236 (class 2604 OID 37528) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY email_logs ALTER COLUMN id SET DEFAULT nextval('email_logs_id_seq'::regclass); | |
-- | |
-- TOC entry 3238 (class 2604 OID 37529) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY email_tokens ALTER COLUMN id SET DEFAULT nextval('email_tokens_id_seq'::regclass); | |
-- | |
-- TOC entry 3241 (class 2604 OID 37530) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY facebook_user_infos ALTER COLUMN id SET DEFAULT nextval('facebook_user_infos_id_seq'::regclass); | |
-- | |
-- TOC entry 3242 (class 2604 OID 37531) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY github_user_infos ALTER COLUMN id SET DEFAULT nextval('github_user_infos_id_seq'::regclass); | |
-- | |
-- TOC entry 3243 (class 2604 OID 37532) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY google_user_infos ALTER COLUMN id SET DEFAULT nextval('google_user_infos_id_seq'::regclass); | |
-- | |
-- TOC entry 3244 (class 2604 OID 37533) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY group_custom_fields ALTER COLUMN id SET DEFAULT nextval('group_custom_fields_id_seq'::regclass); | |
-- | |
-- TOC entry 3374 (class 2604 OID 40645) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY group_managers ALTER COLUMN id SET DEFAULT nextval('group_managers_id_seq'::regclass); | |
-- | |
-- TOC entry 3245 (class 2604 OID 37534) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY group_users ALTER COLUMN id SET DEFAULT nextval('group_users_id_seq'::regclass); | |
-- | |
-- TOC entry 3246 (class 2604 OID 37535) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY groups ALTER COLUMN id SET DEFAULT nextval('groups_id_seq'::regclass); | |
-- | |
-- TOC entry 3253 (class 2604 OID 37536) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY incoming_domains ALTER COLUMN id SET DEFAULT nextval('incoming_domains_id_seq'::regclass); | |
-- | |
-- TOC entry 3255 (class 2604 OID 37537) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY incoming_links ALTER COLUMN id SET DEFAULT nextval('incoming_links_id_seq'::regclass); | |
-- | |
-- TOC entry 3256 (class 2604 OID 37538) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY incoming_referers ALTER COLUMN id SET DEFAULT nextval('incoming_referers_id_seq'::regclass); | |
-- | |
-- TOC entry 3257 (class 2604 OID 37539) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY invited_groups ALTER COLUMN id SET DEFAULT nextval('invited_groups_id_seq'::regclass); | |
-- | |
-- TOC entry 3258 (class 2604 OID 37540) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY invites ALTER COLUMN id SET DEFAULT nextval('invites_id_seq'::regclass); | |
-- | |
-- TOC entry 3259 (class 2604 OID 37541) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY message_bus ALTER COLUMN id SET DEFAULT nextval('message_bus_id_seq'::regclass); | |
-- | |
-- TOC entry 3380 (class 2604 OID 40818) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY muted_users ALTER COLUMN id SET DEFAULT nextval('muted_users_id_seq'::regclass); | |
-- | |
-- TOC entry 3260 (class 2604 OID 37542) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY notifications ALTER COLUMN id SET DEFAULT nextval('notifications_id_seq'::regclass); | |
-- | |
-- TOC entry 3262 (class 2604 OID 37543) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY oauth2_user_infos ALTER COLUMN id SET DEFAULT nextval('oauth2_user_infos_id_seq'::regclass); | |
-- | |
-- TOC entry 3263 (class 2604 OID 37544) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY optimized_images ALTER COLUMN id SET DEFAULT nextval('optimized_images_id_seq'::regclass); | |
-- | |
-- TOC entry 3264 (class 2604 OID 37545) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY permalinks ALTER COLUMN id SET DEFAULT nextval('permalinks_id_seq'::regclass); | |
-- | |
-- TOC entry 3265 (class 2604 OID 37546) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY plugin_store_rows ALTER COLUMN id SET DEFAULT nextval('plugin_store_rows_id_seq'::regclass); | |
-- | |
-- TOC entry 3267 (class 2604 OID 37547) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY post_action_types ALTER COLUMN id SET DEFAULT nextval('post_action_types_id_seq'::regclass); | |
-- | |
-- TOC entry 3269 (class 2604 OID 37548) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY post_actions ALTER COLUMN id SET DEFAULT nextval('post_actions_id_seq'::regclass); | |
-- | |
-- TOC entry 3272 (class 2604 OID 37549) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY post_custom_fields ALTER COLUMN id SET DEFAULT nextval('post_custom_fields_id_seq'::regclass); | |
-- | |
-- TOC entry 3273 (class 2604 OID 37550) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY post_details ALTER COLUMN id SET DEFAULT nextval('post_details_id_seq'::regclass); | |
-- | |
-- TOC entry 3274 (class 2604 OID 37551) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY post_revisions ALTER COLUMN id SET DEFAULT nextval('post_revisions_id_seq'::regclass); | |
-- | |
-- TOC entry 3276 (class 2604 OID 37552) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY post_uploads ALTER COLUMN id SET DEFAULT nextval('post_uploads_id_seq'::regclass); | |
-- | |
-- TOC entry 3180 (class 2604 OID 37553) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY posts ALTER COLUMN id SET DEFAULT nextval('posts_id_seq'::regclass); | |
-- | |
-- TOC entry 3381 (class 2604 OID 40840) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY queued_posts ALTER COLUMN id SET DEFAULT nextval('queued_posts_id_seq'::regclass); | |
-- | |
-- TOC entry 3277 (class 2604 OID 37554) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY quoted_posts ALTER COLUMN id SET DEFAULT nextval('quoted_posts_id_seq'::regclass); | |
-- | |
-- TOC entry 3278 (class 2604 OID 37555) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY screened_emails ALTER COLUMN id SET DEFAULT nextval('screened_emails_id_seq'::regclass); | |
-- | |
-- TOC entry 3280 (class 2604 OID 37556) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY screened_ip_addresses ALTER COLUMN id SET DEFAULT nextval('screened_ip_addresses_id_seq'::regclass); | |
-- | |
-- TOC entry 3282 (class 2604 OID 37557) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY screened_urls ALTER COLUMN id SET DEFAULT nextval('screened_urls_id_seq'::regclass); | |
-- | |
-- TOC entry 3284 (class 2604 OID 37558) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY single_sign_on_records ALTER COLUMN id SET DEFAULT nextval('single_sign_on_records_id_seq'::regclass); | |
-- | |
-- TOC entry 3285 (class 2604 OID 37559) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY site_customizations ALTER COLUMN id SET DEFAULT nextval('site_customizations_id_seq'::regclass); | |
-- | |
-- TOC entry 3287 (class 2604 OID 37560) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY site_settings ALTER COLUMN id SET DEFAULT nextval('site_settings_id_seq'::regclass); | |
-- | |
-- TOC entry 3382 (class 2604 OID 40867) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY stylesheet_cache ALTER COLUMN id SET DEFAULT nextval('stylesheet_cache_id_seq'::regclass); | |
-- | |
-- TOC entry 3304 (class 2604 OID 37561) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY top_topics ALTER COLUMN id SET DEFAULT nextval('top_topics_id_seq'::regclass); | |
-- | |
-- TOC entry 3310 (class 2604 OID 37562) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_allowed_groups ALTER COLUMN id SET DEFAULT nextval('topic_allowed_groups_id_seq'::regclass); | |
-- | |
-- TOC entry 3311 (class 2604 OID 37563) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_allowed_users ALTER COLUMN id SET DEFAULT nextval('topic_allowed_users_id_seq'::regclass); | |
-- | |
-- TOC entry 3312 (class 2604 OID 37564) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_custom_fields ALTER COLUMN id SET DEFAULT nextval('topic_custom_fields_id_seq'::regclass); | |
-- | |
-- TOC entry 3313 (class 2604 OID 37565) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_embeds ALTER COLUMN id SET DEFAULT nextval('topic_embeds_id_seq'::regclass); | |
-- | |
-- TOC entry 3314 (class 2604 OID 37566) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_invites ALTER COLUMN id SET DEFAULT nextval('topic_invites_id_seq'::regclass); | |
-- | |
-- TOC entry 3315 (class 2604 OID 37567) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_link_clicks ALTER COLUMN id SET DEFAULT nextval('topic_link_clicks_id_seq'::regclass); | |
-- | |
-- TOC entry 3316 (class 2604 OID 37568) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_links ALTER COLUMN id SET DEFAULT nextval('topic_links_id_seq'::regclass); | |
-- | |
-- TOC entry 3324 (class 2604 OID 37569) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_users ALTER COLUMN id SET DEFAULT nextval('topic_users_id_seq'::regclass); | |
-- | |
-- TOC entry 3205 (class 2604 OID 37570) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY topics ALTER COLUMN id SET DEFAULT nextval('topics_id_seq'::regclass); | |
-- | |
-- TOC entry 3327 (class 2604 OID 37571) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY twitter_user_infos ALTER COLUMN id SET DEFAULT nextval('twitter_user_infos_id_seq'::regclass); | |
-- | |
-- TOC entry 3328 (class 2604 OID 37572) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY uploads ALTER COLUMN id SET DEFAULT nextval('uploads_id_seq'::regclass); | |
-- | |
-- TOC entry 3329 (class 2604 OID 37573) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_actions ALTER COLUMN id SET DEFAULT nextval('user_actions_id_seq'::regclass); | |
-- | |
-- TOC entry 3330 (class 2604 OID 37574) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_avatars ALTER COLUMN id SET DEFAULT nextval('user_avatars_id_seq'::regclass); | |
-- | |
-- TOC entry 3331 (class 2604 OID 37575) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_badges ALTER COLUMN id SET DEFAULT nextval('user_badges_id_seq'::regclass); | |
-- | |
-- TOC entry 3333 (class 2604 OID 37576) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_custom_fields ALTER COLUMN id SET DEFAULT nextval('user_custom_fields_id_seq'::regclass); | |
-- | |
-- TOC entry 3373 (class 2604 OID 40622) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_exports ALTER COLUMN id SET DEFAULT nextval('user_exports_id_seq'::regclass); | |
-- | |
-- TOC entry 3369 (class 2604 OID 39499) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_fields ALTER COLUMN id SET DEFAULT nextval('user_fields_id_seq'::regclass); | |
-- | |
-- TOC entry 3334 (class 2604 OID 37577) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_histories ALTER COLUMN id SET DEFAULT nextval('user_histories_id_seq'::regclass); | |
-- | |
-- TOC entry 3336 (class 2604 OID 37578) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_open_ids ALTER COLUMN id SET DEFAULT nextval('user_open_ids_id_seq'::regclass); | |
-- | |
-- TOC entry 3347 (class 2604 OID 37579) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_visits ALTER COLUMN id SET DEFAULT nextval('user_visits_id_seq'::regclass); | |
-- | |
-- TOC entry 3365 (class 2604 OID 37580) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass); | |
-- | |
-- TOC entry 3367 (class 2604 OID 37581) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY versions ALTER COLUMN id SET DEFAULT nextval('versions_id_seq'::regclass); | |
-- | |
-- TOC entry 3368 (class 2604 OID 37582) | |
-- Name: id; Type: DEFAULT; Schema: backup; Owner: discourse | |
-- | |
ALTER TABLE ONLY warnings ALTER COLUMN id SET DEFAULT nextval('warnings_id_seq'::regclass); | |
SET search_path = public, pg_catalog; | |
-- | |
-- TOC entry 3383 (class 2604 OID 45707) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY api_keys ALTER COLUMN id SET DEFAULT nextval('api_keys_id_seq'::regclass); | |
-- | |
-- TOC entry 3635 (class 2604 OID 48867) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY application_requests ALTER COLUMN id SET DEFAULT nextval('application_requests_id_seq'::regclass); | |
-- | |
-- TOC entry 3385 (class 2604 OID 45708) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY badge_groupings ALTER COLUMN id SET DEFAULT nextval('badge_groupings_id_seq'::regclass); | |
-- | |
-- TOC entry 3458 (class 2604 OID 45709) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY badge_types ALTER COLUMN id SET DEFAULT nextval('badge_types_id_seq'::regclass); | |
-- | |
-- TOC entry 3459 (class 2604 OID 45710) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY badges ALTER COLUMN id SET DEFAULT nextval('badges_id_seq'::regclass); | |
-- | |
-- TOC entry 3403 (class 2604 OID 45711) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY categories ALTER COLUMN id SET DEFAULT nextval('categories_id_seq'::regclass); | |
-- | |
-- TOC entry 3471 (class 2604 OID 45712) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY category_custom_fields ALTER COLUMN id SET DEFAULT nextval('category_custom_fields_id_seq'::regclass); | |
-- | |
-- TOC entry 3473 (class 2604 OID 45713) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY category_featured_topics ALTER COLUMN id SET DEFAULT nextval('category_featured_topics_id_seq'::regclass); | |
-- | |
-- TOC entry 3474 (class 2604 OID 45714) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY category_featured_users ALTER COLUMN id SET DEFAULT nextval('category_featured_users_id_seq'::regclass); | |
-- | |
-- TOC entry 3475 (class 2604 OID 45715) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY category_groups ALTER COLUMN id SET DEFAULT nextval('category_groups_id_seq'::regclass); | |
-- | |
-- TOC entry 3477 (class 2604 OID 45716) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY category_users ALTER COLUMN id SET DEFAULT nextval('category_users_id_seq'::regclass); | |
-- | |
-- TOC entry 3478 (class 2604 OID 45717) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY color_scheme_colors ALTER COLUMN id SET DEFAULT nextval('color_scheme_colors_id_seq'::regclass); | |
-- | |
-- TOC entry 3479 (class 2604 OID 45718) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY color_schemes ALTER COLUMN id SET DEFAULT nextval('color_schemes_id_seq'::regclass); | |
-- | |
-- TOC entry 3637 (class 2604 OID 48992) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY directory_items ALTER COLUMN id SET DEFAULT nextval('directory_items_id_seq'::regclass); | |
-- | |
-- TOC entry 3482 (class 2604 OID 45719) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY draft_sequences ALTER COLUMN id SET DEFAULT nextval('draft_sequences_id_seq'::regclass); | |
-- | |
-- TOC entry 3483 (class 2604 OID 45720) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY drafts ALTER COLUMN id SET DEFAULT nextval('drafts_id_seq'::regclass); | |
-- | |
-- TOC entry 3486 (class 2604 OID 45721) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY email_logs ALTER COLUMN id SET DEFAULT nextval('email_logs_id_seq'::regclass); | |
-- | |
-- TOC entry 3488 (class 2604 OID 45722) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY email_tokens ALTER COLUMN id SET DEFAULT nextval('email_tokens_id_seq'::regclass); | |
-- | |
-- TOC entry 3645 (class 2604 OID 112321) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY embeddable_hosts ALTER COLUMN id SET DEFAULT nextval('embeddable_hosts_id_seq'::regclass); | |
-- | |
-- TOC entry 3491 (class 2604 OID 45723) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY facebook_user_infos ALTER COLUMN id SET DEFAULT nextval('facebook_user_infos_id_seq'::regclass); | |
-- | |
-- TOC entry 3492 (class 2604 OID 45724) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY github_user_infos ALTER COLUMN id SET DEFAULT nextval('github_user_infos_id_seq'::regclass); | |
-- | |
-- TOC entry 3493 (class 2604 OID 45725) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY google_user_infos ALTER COLUMN id SET DEFAULT nextval('google_user_infos_id_seq'::regclass); | |
-- | |
-- TOC entry 3494 (class 2604 OID 45726) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY group_custom_fields ALTER COLUMN id SET DEFAULT nextval('group_custom_fields_id_seq'::regclass); | |
-- | |
-- TOC entry 3495 (class 2604 OID 45727) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY group_users ALTER COLUMN id SET DEFAULT nextval('group_users_id_seq'::regclass); | |
-- | |
-- TOC entry 3497 (class 2604 OID 45728) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY groups ALTER COLUMN id SET DEFAULT nextval('groups_id_seq'::regclass); | |
-- | |
-- TOC entry 3504 (class 2604 OID 45729) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY incoming_domains ALTER COLUMN id SET DEFAULT nextval('incoming_domains_id_seq'::regclass); | |
-- | |
-- TOC entry 3506 (class 2604 OID 45730) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY incoming_links ALTER COLUMN id SET DEFAULT nextval('incoming_links_id_seq'::regclass); | |
-- | |
-- TOC entry 3507 (class 2604 OID 45731) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY incoming_referers ALTER COLUMN id SET DEFAULT nextval('incoming_referers_id_seq'::regclass); | |
-- | |
-- TOC entry 3508 (class 2604 OID 45732) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY invited_groups ALTER COLUMN id SET DEFAULT nextval('invited_groups_id_seq'::regclass); | |
-- | |
-- TOC entry 3509 (class 2604 OID 45733) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY invites ALTER COLUMN id SET DEFAULT nextval('invites_id_seq'::regclass); | |
-- | |
-- TOC entry 3510 (class 2604 OID 45734) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY message_bus ALTER COLUMN id SET DEFAULT nextval('message_bus_id_seq'::regclass); | |
-- | |
-- TOC entry 3640 (class 2604 OID 49010) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY muted_users ALTER COLUMN id SET DEFAULT nextval('muted_users_id_seq'::regclass); | |
-- | |
-- TOC entry 3511 (class 2604 OID 45735) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY notifications ALTER COLUMN id SET DEFAULT nextval('notifications_id_seq'::regclass); | |
-- | |
-- TOC entry 3513 (class 2604 OID 45736) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY oauth2_user_infos ALTER COLUMN id SET DEFAULT nextval('oauth2_user_infos_id_seq'::regclass); | |
-- | |
-- TOC entry 3514 (class 2604 OID 45737) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY optimized_images ALTER COLUMN id SET DEFAULT nextval('optimized_images_id_seq'::regclass); | |
-- | |
-- TOC entry 3515 (class 2604 OID 45738) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY permalinks ALTER COLUMN id SET DEFAULT nextval('permalinks_id_seq'::regclass); | |
-- | |
-- TOC entry 3516 (class 2604 OID 45739) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY plugin_store_rows ALTER COLUMN id SET DEFAULT nextval('plugin_store_rows_id_seq'::regclass); | |
-- | |
-- TOC entry 3518 (class 2604 OID 45740) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY post_action_types ALTER COLUMN id SET DEFAULT nextval('post_action_types_id_seq'::regclass); | |
-- | |
-- TOC entry 3520 (class 2604 OID 45741) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY post_actions ALTER COLUMN id SET DEFAULT nextval('post_actions_id_seq'::regclass); | |
-- | |
-- TOC entry 3523 (class 2604 OID 45742) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY post_custom_fields ALTER COLUMN id SET DEFAULT nextval('post_custom_fields_id_seq'::regclass); | |
-- | |
-- TOC entry 3524 (class 2604 OID 45743) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY post_details ALTER COLUMN id SET DEFAULT nextval('post_details_id_seq'::regclass); | |
-- | |
-- TOC entry 3525 (class 2604 OID 45744) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY post_revisions ALTER COLUMN id SET DEFAULT nextval('post_revisions_id_seq'::regclass); | |
-- | |
-- TOC entry 3644 (class 2604 OID 112312) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY post_stats ALTER COLUMN id SET DEFAULT nextval('post_stats_id_seq'::regclass); | |
-- | |
-- TOC entry 3527 (class 2604 OID 45745) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY post_uploads ALTER COLUMN id SET DEFAULT nextval('post_uploads_id_seq'::regclass); | |
-- | |
-- TOC entry 3429 (class 2604 OID 45746) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY posts ALTER COLUMN id SET DEFAULT nextval('posts_id_seq'::regclass); | |
-- | |
-- TOC entry 3641 (class 2604 OID 49032) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY queued_posts ALTER COLUMN id SET DEFAULT nextval('queued_posts_id_seq'::regclass); | |
-- | |
-- TOC entry 3528 (class 2604 OID 45747) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY quoted_posts ALTER COLUMN id SET DEFAULT nextval('quoted_posts_id_seq'::regclass); | |
-- | |
-- TOC entry 3529 (class 2604 OID 45748) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY screened_emails ALTER COLUMN id SET DEFAULT nextval('screened_emails_id_seq'::regclass); | |
-- | |
-- TOC entry 3531 (class 2604 OID 45749) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY screened_ip_addresses ALTER COLUMN id SET DEFAULT nextval('screened_ip_addresses_id_seq'::regclass); | |
-- | |
-- TOC entry 3533 (class 2604 OID 45750) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY screened_urls ALTER COLUMN id SET DEFAULT nextval('screened_urls_id_seq'::regclass); | |
-- | |
-- TOC entry 3535 (class 2604 OID 45751) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY single_sign_on_records ALTER COLUMN id SET DEFAULT nextval('single_sign_on_records_id_seq'::regclass); | |
-- | |
-- TOC entry 3536 (class 2604 OID 45752) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY site_customizations ALTER COLUMN id SET DEFAULT nextval('site_customizations_id_seq'::regclass); | |
-- | |
-- TOC entry 3538 (class 2604 OID 45753) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY site_settings ALTER COLUMN id SET DEFAULT nextval('site_settings_id_seq'::regclass); | |
-- | |
-- TOC entry 3642 (class 2604 OID 49059) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY stylesheet_cache ALTER COLUMN id SET DEFAULT nextval('stylesheet_cache_id_seq'::regclass); | |
-- | |
-- TOC entry 3561 (class 2604 OID 45754) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY top_topics ALTER COLUMN id SET DEFAULT nextval('top_topics_id_seq'::regclass); | |
-- | |
-- TOC entry 3566 (class 2604 OID 45755) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_allowed_groups ALTER COLUMN id SET DEFAULT nextval('topic_allowed_groups_id_seq'::regclass); | |
-- | |
-- TOC entry 3567 (class 2604 OID 45756) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_allowed_users ALTER COLUMN id SET DEFAULT nextval('topic_allowed_users_id_seq'::regclass); | |
-- | |
-- TOC entry 3568 (class 2604 OID 45757) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_custom_fields ALTER COLUMN id SET DEFAULT nextval('topic_custom_fields_id_seq'::regclass); | |
-- | |
-- TOC entry 3569 (class 2604 OID 45758) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_embeds ALTER COLUMN id SET DEFAULT nextval('topic_embeds_id_seq'::regclass); | |
-- | |
-- TOC entry 3570 (class 2604 OID 45759) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_invites ALTER COLUMN id SET DEFAULT nextval('topic_invites_id_seq'::regclass); | |
-- | |
-- TOC entry 3571 (class 2604 OID 45760) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_link_clicks ALTER COLUMN id SET DEFAULT nextval('topic_link_clicks_id_seq'::regclass); | |
-- | |
-- TOC entry 3572 (class 2604 OID 45761) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_links ALTER COLUMN id SET DEFAULT nextval('topic_links_id_seq'::regclass); | |
-- | |
-- TOC entry 3580 (class 2604 OID 45762) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY topic_users ALTER COLUMN id SET DEFAULT nextval('topic_users_id_seq'::regclass); | |
-- | |
-- TOC entry 3454 (class 2604 OID 45763) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY topics ALTER COLUMN id SET DEFAULT nextval('topics_id_seq'::regclass); | |
-- | |
-- TOC entry 3647 (class 2604 OID 135561) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY translation_overrides ALTER COLUMN id SET DEFAULT nextval('translation_overrides_id_seq'::regclass); | |
-- | |
-- TOC entry 3583 (class 2604 OID 45764) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY twitter_user_infos ALTER COLUMN id SET DEFAULT nextval('twitter_user_infos_id_seq'::regclass); | |
-- | |
-- TOC entry 3584 (class 2604 OID 45765) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY uploads ALTER COLUMN id SET DEFAULT nextval('uploads_id_seq'::regclass); | |
-- | |
-- TOC entry 3585 (class 2604 OID 45766) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_actions ALTER COLUMN id SET DEFAULT nextval('user_actions_id_seq'::regclass); | |
-- | |
-- TOC entry 3586 (class 2604 OID 45767) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_avatars ALTER COLUMN id SET DEFAULT nextval('user_avatars_id_seq'::regclass); | |
-- | |
-- TOC entry 3587 (class 2604 OID 45768) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_badges ALTER COLUMN id SET DEFAULT nextval('user_badges_id_seq'::regclass); | |
-- | |
-- TOC entry 3589 (class 2604 OID 45769) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_custom_fields ALTER COLUMN id SET DEFAULT nextval('user_custom_fields_id_seq'::regclass); | |
-- | |
-- TOC entry 3634 (class 2604 OID 48814) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_exports ALTER COLUMN id SET DEFAULT nextval('user_exports_id_seq'::regclass); | |
-- | |
-- TOC entry 3643 (class 2604 OID 108111) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_field_options ALTER COLUMN id SET DEFAULT nextval('user_field_options_id_seq'::regclass); | |
-- | |
-- TOC entry 3629 (class 2604 OID 47691) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_fields ALTER COLUMN id SET DEFAULT nextval('user_fields_id_seq'::regclass); | |
-- | |
-- TOC entry 3590 (class 2604 OID 45770) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_histories ALTER COLUMN id SET DEFAULT nextval('user_histories_id_seq'::regclass); | |
-- | |
-- TOC entry 3592 (class 2604 OID 45771) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_open_ids ALTER COLUMN id SET DEFAULT nextval('user_open_ids_id_seq'::regclass); | |
-- | |
-- TOC entry 3646 (class 2604 OID 115404) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_profile_views ALTER COLUMN id SET DEFAULT nextval('user_profile_views_id_seq'::regclass); | |
-- | |
-- TOC entry 3604 (class 2604 OID 45772) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY user_visits ALTER COLUMN id SET DEFAULT nextval('user_visits_id_seq'::regclass); | |
-- | |
-- TOC entry 3625 (class 2604 OID 45773) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass); | |
-- | |
-- TOC entry 3627 (class 2604 OID 45774) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY versions ALTER COLUMN id SET DEFAULT nextval('versions_id_seq'::regclass); | |
-- | |
-- TOC entry 3628 (class 2604 OID 45775) | |
-- Name: id; Type: DEFAULT; Schema: public; Owner: discourse | |
-- | |
ALTER TABLE ONLY warnings ALTER COLUMN id SET DEFAULT nextval('warnings_id_seq'::regclass); | |
SET search_path = backup, pg_catalog; | |
-- | |
-- TOC entry 3898 (class 2606 OID 39185) | |
-- Name: actions_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_actions | |
ADD CONSTRAINT actions_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3649 (class 2606 OID 39187) | |
-- Name: api_keys_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY api_keys | |
ADD CONSTRAINT api_keys_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3961 (class 2606 OID 40678) | |
-- Name: application_requests_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY application_requests | |
ADD CONSTRAINT application_requests_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3653 (class 2606 OID 39189) | |
-- Name: badge_groupings_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY badge_groupings | |
ADD CONSTRAINT badge_groupings_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3676 (class 2606 OID 39191) | |
-- Name: badge_types_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY badge_types | |
ADD CONSTRAINT badge_types_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3679 (class 2606 OID 39193) | |
-- Name: badges_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY badges | |
ADD CONSTRAINT badges_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3809 (class 2606 OID 39195) | |
-- Name: blocked_emails_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY screened_emails | |
ADD CONSTRAINT blocked_emails_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3655 (class 2606 OID 39197) | |
-- Name: categories_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY categories | |
ADD CONSTRAINT categories_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3694 (class 2606 OID 39199) | |
-- Name: categories_search_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY category_search_data | |
ADD CONSTRAINT categories_search_pkey PRIMARY KEY (category_id); | |
-- | |
-- TOC entry 3682 (class 2606 OID 39201) | |
-- Name: category_custom_fields_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY category_custom_fields | |
ADD CONSTRAINT category_custom_fields_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3686 (class 2606 OID 39203) | |
-- Name: category_featured_topics_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY category_featured_topics | |
ADD CONSTRAINT category_featured_topics_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3689 (class 2606 OID 39205) | |
-- Name: category_featured_users_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY category_featured_users | |
ADD CONSTRAINT category_featured_users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3692 (class 2606 OID 39207) | |
-- Name: category_groups_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY category_groups | |
ADD CONSTRAINT category_groups_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3697 (class 2606 OID 39209) | |
-- Name: category_users_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY category_users | |
ADD CONSTRAINT category_users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3699 (class 2606 OID 39211) | |
-- Name: color_scheme_colors_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY color_scheme_colors | |
ADD CONSTRAINT color_scheme_colors_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3702 (class 2606 OID 39213) | |
-- Name: color_schemes_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY color_schemes | |
ADD CONSTRAINT color_schemes_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3964 (class 2606 OID 40690) | |
-- Name: digest_unsubscribe_keys_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY digest_unsubscribe_keys | |
ADD CONSTRAINT digest_unsubscribe_keys_pkey PRIMARY KEY (key); | |
-- | |
-- TOC entry 3967 (class 2606 OID 40802) | |
-- Name: directory_items_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY directory_items | |
ADD CONSTRAINT directory_items_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3704 (class 2606 OID 39215) | |
-- Name: draft_sequences_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY draft_sequences | |
ADD CONSTRAINT draft_sequences_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3707 (class 2606 OID 39217) | |
-- Name: drafts_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY drafts | |
ADD CONSTRAINT drafts_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3710 (class 2606 OID 39219) | |
-- Name: email_logs_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY email_logs | |
ADD CONSTRAINT email_logs_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3716 (class 2606 OID 39221) | |
-- Name: email_tokens_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY email_tokens | |
ADD CONSTRAINT email_tokens_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3720 (class 2606 OID 39223) | |
-- Name: facebook_user_infos_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY facebook_user_infos | |
ADD CONSTRAINT facebook_user_infos_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3869 (class 2606 OID 39225) | |
-- Name: forum_thread_link_clicks_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_link_clicks | |
ADD CONSTRAINT forum_thread_link_clicks_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3871 (class 2606 OID 39227) | |
-- Name: forum_thread_links_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_links | |
ADD CONSTRAINT forum_thread_links_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3667 (class 2606 OID 39229) | |
-- Name: forum_threads_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topics | |
ADD CONSTRAINT forum_threads_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3724 (class 2606 OID 39231) | |
-- Name: github_user_infos_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY github_user_infos | |
ADD CONSTRAINT github_user_infos_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3728 (class 2606 OID 39233) | |
-- Name: google_user_infos_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY google_user_infos | |
ADD CONSTRAINT google_user_infos_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3732 (class 2606 OID 39235) | |
-- Name: group_custom_fields_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY group_custom_fields | |
ADD CONSTRAINT group_custom_fields_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3958 (class 2606 OID 40647) | |
-- Name: group_managers_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY group_managers | |
ADD CONSTRAINT group_managers_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3735 (class 2606 OID 39237) | |
-- Name: group_users_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY group_users | |
ADD CONSTRAINT group_users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3738 (class 2606 OID 39239) | |
-- Name: groups_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY groups | |
ADD CONSTRAINT groups_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3741 (class 2606 OID 39241) | |
-- Name: incoming_domains_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY incoming_domains | |
ADD CONSTRAINT incoming_domains_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3744 (class 2606 OID 39243) | |
-- Name: incoming_links_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY incoming_links | |
ADD CONSTRAINT incoming_links_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3748 (class 2606 OID 39245) | |
-- Name: incoming_referers_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY incoming_referers | |
ADD CONSTRAINT incoming_referers_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3751 (class 2606 OID 39247) | |
-- Name: invited_groups_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY invited_groups | |
ADD CONSTRAINT invited_groups_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3755 (class 2606 OID 39249) | |
-- Name: invites_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY invites | |
ADD CONSTRAINT invites_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3758 (class 2606 OID 39251) | |
-- Name: message_bus_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY message_bus | |
ADD CONSTRAINT message_bus_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3972 (class 2606 OID 40820) | |
-- Name: muted_users_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY muted_users | |
ADD CONSTRAINT muted_users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3762 (class 2606 OID 39253) | |
-- Name: notifications_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY notifications | |
ADD CONSTRAINT notifications_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3765 (class 2606 OID 39255) | |
-- Name: oauth2_user_infos_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY oauth2_user_infos | |
ADD CONSTRAINT oauth2_user_infos_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3769 (class 2606 OID 39257) | |
-- Name: optimized_images_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY optimized_images | |
ADD CONSTRAINT optimized_images_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3772 (class 2606 OID 39259) | |
-- Name: permalinks_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY permalinks | |
ADD CONSTRAINT permalinks_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3775 (class 2606 OID 39261) | |
-- Name: plugin_store_rows_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY plugin_store_rows | |
ADD CONSTRAINT plugin_store_rows_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3777 (class 2606 OID 39263) | |
-- Name: post_action_types_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_action_types | |
ADD CONSTRAINT post_action_types_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3782 (class 2606 OID 39265) | |
-- Name: post_actions_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_actions | |
ADD CONSTRAINT post_actions_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3785 (class 2606 OID 39267) | |
-- Name: post_custom_fields_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_custom_fields | |
ADD CONSTRAINT post_custom_fields_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3788 (class 2606 OID 39269) | |
-- Name: post_details_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_details | |
ADD CONSTRAINT post_details_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3793 (class 2606 OID 39271) | |
-- Name: post_revisions_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_revisions | |
ADD CONSTRAINT post_revisions_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3802 (class 2606 OID 39273) | |
-- Name: post_uploads_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_uploads | |
ADD CONSTRAINT post_uploads_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3665 (class 2606 OID 39275) | |
-- Name: posts_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY posts | |
ADD CONSTRAINT posts_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3796 (class 2606 OID 39277) | |
-- Name: posts_search_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_search_data | |
ADD CONSTRAINT posts_search_pkey PRIMARY KEY (post_id); | |
-- | |
-- TOC entry 3976 (class 2606 OID 40845) | |
-- Name: queued_posts_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY queued_posts | |
ADD CONSTRAINT queued_posts_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3806 (class 2606 OID 39279) | |
-- Name: quoted_posts_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY quoted_posts | |
ADD CONSTRAINT quoted_posts_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3815 (class 2606 OID 39281) | |
-- Name: screened_ip_addresses_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY screened_ip_addresses | |
ADD CONSTRAINT screened_ip_addresses_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3819 (class 2606 OID 39283) | |
-- Name: screened_urls_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY screened_urls | |
ADD CONSTRAINT screened_urls_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3822 (class 2606 OID 39285) | |
-- Name: single_sign_on_records_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY single_sign_on_records | |
ADD CONSTRAINT single_sign_on_records_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3826 (class 2606 OID 39287) | |
-- Name: site_customizations_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY site_customizations | |
ADD CONSTRAINT site_customizations_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3828 (class 2606 OID 39289) | |
-- Name: site_settings_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY site_settings | |
ADD CONSTRAINT site_settings_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3979 (class 2606 OID 40872) | |
-- Name: stylesheet_cache_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY stylesheet_cache | |
ADD CONSTRAINT stylesheet_cache_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3847 (class 2606 OID 39291) | |
-- Name: top_topics_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY top_topics | |
ADD CONSTRAINT top_topics_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3851 (class 2606 OID 39293) | |
-- Name: topic_allowed_groups_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_allowed_groups | |
ADD CONSTRAINT topic_allowed_groups_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3855 (class 2606 OID 39295) | |
-- Name: topic_allowed_users_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_allowed_users | |
ADD CONSTRAINT topic_allowed_users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3859 (class 2606 OID 39297) | |
-- Name: topic_custom_fields_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_custom_fields | |
ADD CONSTRAINT topic_custom_fields_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3862 (class 2606 OID 39299) | |
-- Name: topic_embeds_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_embeds | |
ADD CONSTRAINT topic_embeds_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3866 (class 2606 OID 39301) | |
-- Name: topic_invites_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_invites | |
ADD CONSTRAINT topic_invites_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3878 (class 2606 OID 39303) | |
-- Name: topic_search_data_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_search_data | |
ADD CONSTRAINT topic_search_data_pkey PRIMARY KEY (topic_id); | |
-- | |
-- TOC entry 3882 (class 2606 OID 39305) | |
-- Name: topic_users_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_users | |
ADD CONSTRAINT topic_users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3890 (class 2606 OID 39307) | |
-- Name: twitter_user_infos_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY twitter_user_infos | |
ADD CONSTRAINT twitter_user_infos_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3896 (class 2606 OID 39309) | |
-- Name: uploads_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY uploads | |
ADD CONSTRAINT uploads_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3904 (class 2606 OID 39311) | |
-- Name: user_avatars_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_avatars | |
ADD CONSTRAINT user_avatars_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3909 (class 2606 OID 39313) | |
-- Name: user_badges_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_badges | |
ADD CONSTRAINT user_badges_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3912 (class 2606 OID 39315) | |
-- Name: user_custom_fields_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_custom_fields | |
ADD CONSTRAINT user_custom_fields_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3956 (class 2606 OID 40624) | |
-- Name: user_exports_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_exports | |
ADD CONSTRAINT user_exports_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3954 (class 2606 OID 39504) | |
-- Name: user_fields_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_fields | |
ADD CONSTRAINT user_fields_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3918 (class 2606 OID 39317) | |
-- Name: user_histories_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_histories | |
ADD CONSTRAINT user_histories_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3921 (class 2606 OID 39319) | |
-- Name: user_open_ids_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_open_ids | |
ADD CONSTRAINT user_open_ids_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3924 (class 2606 OID 39321) | |
-- Name: user_profiles_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_profiles | |
ADD CONSTRAINT user_profiles_pkey PRIMARY KEY (user_id); | |
-- | |
-- TOC entry 3929 (class 2606 OID 39323) | |
-- Name: user_stats_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_stats | |
ADD CONSTRAINT user_stats_pkey PRIMARY KEY (user_id); | |
-- | |
-- TOC entry 3932 (class 2606 OID 39325) | |
-- Name: user_visits_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_visits | |
ADD CONSTRAINT user_visits_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3940 (class 2606 OID 39327) | |
-- Name: users_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY users | |
ADD CONSTRAINT users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3927 (class 2606 OID 39329) | |
-- Name: users_search_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_search_data | |
ADD CONSTRAINT users_search_pkey PRIMARY KEY (user_id); | |
-- | |
-- TOC entry 3948 (class 2606 OID 39331) | |
-- Name: versions_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY versions | |
ADD CONSTRAINT versions_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3952 (class 2606 OID 39333) | |
-- Name: warnings_pkey; Type: CONSTRAINT; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY warnings | |
ADD CONSTRAINT warnings_pkey PRIMARY KEY (id); | |
SET search_path = public, pg_catalog; | |
-- | |
-- TOC entry 4239 (class 2606 OID 47378) | |
-- Name: actions_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_actions | |
ADD CONSTRAINT actions_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3981 (class 2606 OID 47380) | |
-- Name: api_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY api_keys | |
ADD CONSTRAINT api_keys_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4305 (class 2606 OID 48870) | |
-- Name: application_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY application_requests | |
ADD CONSTRAINT application_requests_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3985 (class 2606 OID 47382) | |
-- Name: badge_groupings_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY badge_groupings | |
ADD CONSTRAINT badge_groupings_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4009 (class 2606 OID 47384) | |
-- Name: badge_types_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY badge_types | |
ADD CONSTRAINT badge_types_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4012 (class 2606 OID 47386) | |
-- Name: badges_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY badges | |
ADD CONSTRAINT badges_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4147 (class 2606 OID 47388) | |
-- Name: blocked_emails_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY screened_emails | |
ADD CONSTRAINT blocked_emails_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3987 (class 2606 OID 47390) | |
-- Name: categories_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY categories | |
ADD CONSTRAINT categories_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4027 (class 2606 OID 47392) | |
-- Name: categories_search_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY category_search_data | |
ADD CONSTRAINT categories_search_pkey PRIMARY KEY (category_id); | |
-- | |
-- TOC entry 4015 (class 2606 OID 47394) | |
-- Name: category_custom_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY category_custom_fields | |
ADD CONSTRAINT category_custom_fields_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4019 (class 2606 OID 47396) | |
-- Name: category_featured_topics_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY category_featured_topics | |
ADD CONSTRAINT category_featured_topics_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4022 (class 2606 OID 47398) | |
-- Name: category_featured_users_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY category_featured_users | |
ADD CONSTRAINT category_featured_users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4025 (class 2606 OID 47400) | |
-- Name: category_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY category_groups | |
ADD CONSTRAINT category_groups_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4030 (class 2606 OID 47402) | |
-- Name: category_users_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY category_users | |
ADD CONSTRAINT category_users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4032 (class 2606 OID 47404) | |
-- Name: color_scheme_colors_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY color_scheme_colors | |
ADD CONSTRAINT color_scheme_colors_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4035 (class 2606 OID 47406) | |
-- Name: color_schemes_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY color_schemes | |
ADD CONSTRAINT color_schemes_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4308 (class 2606 OID 48882) | |
-- Name: digest_unsubscribe_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY digest_unsubscribe_keys | |
ADD CONSTRAINT digest_unsubscribe_keys_pkey PRIMARY KEY (key); | |
-- | |
-- TOC entry 4311 (class 2606 OID 48994) | |
-- Name: directory_items_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY directory_items | |
ADD CONSTRAINT directory_items_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4037 (class 2606 OID 47408) | |
-- Name: draft_sequences_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY draft_sequences | |
ADD CONSTRAINT draft_sequences_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4040 (class 2606 OID 47410) | |
-- Name: drafts_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY drafts | |
ADD CONSTRAINT drafts_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4043 (class 2606 OID 47412) | |
-- Name: email_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY email_logs | |
ADD CONSTRAINT email_logs_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4049 (class 2606 OID 47414) | |
-- Name: email_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY email_tokens | |
ADD CONSTRAINT email_tokens_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4330 (class 2606 OID 112323) | |
-- Name: embeddable_hosts_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY embeddable_hosts | |
ADD CONSTRAINT embeddable_hosts_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4053 (class 2606 OID 47416) | |
-- Name: facebook_user_infos_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY facebook_user_infos | |
ADD CONSTRAINT facebook_user_infos_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4210 (class 2606 OID 47418) | |
-- Name: forum_thread_link_clicks_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_link_clicks | |
ADD CONSTRAINT forum_thread_link_clicks_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4212 (class 2606 OID 47420) | |
-- Name: forum_thread_links_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_links | |
ADD CONSTRAINT forum_thread_links_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3999 (class 2606 OID 47422) | |
-- Name: forum_threads_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topics | |
ADD CONSTRAINT forum_threads_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4057 (class 2606 OID 47424) | |
-- Name: github_user_infos_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY github_user_infos | |
ADD CONSTRAINT github_user_infos_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4061 (class 2606 OID 47426) | |
-- Name: google_user_infos_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY google_user_infos | |
ADD CONSTRAINT google_user_infos_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4065 (class 2606 OID 47428) | |
-- Name: group_custom_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY group_custom_fields | |
ADD CONSTRAINT group_custom_fields_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4068 (class 2606 OID 47430) | |
-- Name: group_users_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY group_users | |
ADD CONSTRAINT group_users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4072 (class 2606 OID 47432) | |
-- Name: groups_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY groups | |
ADD CONSTRAINT groups_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4075 (class 2606 OID 47434) | |
-- Name: incoming_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY incoming_domains | |
ADD CONSTRAINT incoming_domains_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4078 (class 2606 OID 47436) | |
-- Name: incoming_links_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY incoming_links | |
ADD CONSTRAINT incoming_links_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4082 (class 2606 OID 47438) | |
-- Name: incoming_referers_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY incoming_referers | |
ADD CONSTRAINT incoming_referers_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4085 (class 2606 OID 47440) | |
-- Name: invited_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY invited_groups | |
ADD CONSTRAINT invited_groups_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4089 (class 2606 OID 47442) | |
-- Name: invites_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY invites | |
ADD CONSTRAINT invites_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4092 (class 2606 OID 47444) | |
-- Name: message_bus_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY message_bus | |
ADD CONSTRAINT message_bus_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4316 (class 2606 OID 49012) | |
-- Name: muted_users_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY muted_users | |
ADD CONSTRAINT muted_users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4098 (class 2606 OID 47446) | |
-- Name: notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY notifications | |
ADD CONSTRAINT notifications_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4101 (class 2606 OID 47448) | |
-- Name: oauth2_user_infos_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY oauth2_user_infos | |
ADD CONSTRAINT oauth2_user_infos_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4105 (class 2606 OID 47450) | |
-- Name: optimized_images_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY optimized_images | |
ADD CONSTRAINT optimized_images_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4108 (class 2606 OID 47452) | |
-- Name: permalinks_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY permalinks | |
ADD CONSTRAINT permalinks_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4111 (class 2606 OID 47454) | |
-- Name: plugin_store_rows_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY plugin_store_rows | |
ADD CONSTRAINT plugin_store_rows_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4113 (class 2606 OID 47456) | |
-- Name: post_action_types_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_action_types | |
ADD CONSTRAINT post_action_types_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4119 (class 2606 OID 47458) | |
-- Name: post_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_actions | |
ADD CONSTRAINT post_actions_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4123 (class 2606 OID 47460) | |
-- Name: post_custom_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_custom_fields | |
ADD CONSTRAINT post_custom_fields_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4126 (class 2606 OID 47462) | |
-- Name: post_details_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_details | |
ADD CONSTRAINT post_details_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4131 (class 2606 OID 47464) | |
-- Name: post_revisions_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_revisions | |
ADD CONSTRAINT post_revisions_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4328 (class 2606 OID 112314) | |
-- Name: post_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_stats | |
ADD CONSTRAINT post_stats_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4140 (class 2606 OID 47466) | |
-- Name: post_uploads_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_uploads | |
ADD CONSTRAINT post_uploads_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 3997 (class 2606 OID 47468) | |
-- Name: posts_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY posts | |
ADD CONSTRAINT posts_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4134 (class 2606 OID 47470) | |
-- Name: posts_search_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY post_search_data | |
ADD CONSTRAINT posts_search_pkey PRIMARY KEY (post_id); | |
-- | |
-- TOC entry 4320 (class 2606 OID 49037) | |
-- Name: queued_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY queued_posts | |
ADD CONSTRAINT queued_posts_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4144 (class 2606 OID 47472) | |
-- Name: quoted_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY quoted_posts | |
ADD CONSTRAINT quoted_posts_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4153 (class 2606 OID 47474) | |
-- Name: screened_ip_addresses_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY screened_ip_addresses | |
ADD CONSTRAINT screened_ip_addresses_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4157 (class 2606 OID 47476) | |
-- Name: screened_urls_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY screened_urls | |
ADD CONSTRAINT screened_urls_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4160 (class 2606 OID 47478) | |
-- Name: single_sign_on_records_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY single_sign_on_records | |
ADD CONSTRAINT single_sign_on_records_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4163 (class 2606 OID 47480) | |
-- Name: site_customizations_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY site_customizations | |
ADD CONSTRAINT site_customizations_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4165 (class 2606 OID 47482) | |
-- Name: site_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY site_settings | |
ADD CONSTRAINT site_settings_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4323 (class 2606 OID 49064) | |
-- Name: stylesheet_cache_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY stylesheet_cache | |
ADD CONSTRAINT stylesheet_cache_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4188 (class 2606 OID 47484) | |
-- Name: top_topics_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY top_topics | |
ADD CONSTRAINT top_topics_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4192 (class 2606 OID 47486) | |
-- Name: topic_allowed_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_allowed_groups | |
ADD CONSTRAINT topic_allowed_groups_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4196 (class 2606 OID 47488) | |
-- Name: topic_allowed_users_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_allowed_users | |
ADD CONSTRAINT topic_allowed_users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4200 (class 2606 OID 47490) | |
-- Name: topic_custom_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_custom_fields | |
ADD CONSTRAINT topic_custom_fields_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4203 (class 2606 OID 47492) | |
-- Name: topic_embeds_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_embeds | |
ADD CONSTRAINT topic_embeds_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4207 (class 2606 OID 47494) | |
-- Name: topic_invites_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_invites | |
ADD CONSTRAINT topic_invites_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4219 (class 2606 OID 47496) | |
-- Name: topic_search_data_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_search_data | |
ADD CONSTRAINT topic_search_data_pkey PRIMARY KEY (topic_id); | |
-- | |
-- TOC entry 4223 (class 2606 OID 47498) | |
-- Name: topic_users_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY topic_users | |
ADD CONSTRAINT topic_users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4339 (class 2606 OID 135566) | |
-- Name: translation_overrides_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY translation_overrides | |
ADD CONSTRAINT translation_overrides_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4231 (class 2606 OID 47500) | |
-- Name: twitter_user_infos_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY twitter_user_infos | |
ADD CONSTRAINT twitter_user_infos_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4237 (class 2606 OID 47502) | |
-- Name: uploads_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY uploads | |
ADD CONSTRAINT uploads_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4247 (class 2606 OID 47504) | |
-- Name: user_avatars_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_avatars | |
ADD CONSTRAINT user_avatars_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4252 (class 2606 OID 47506) | |
-- Name: user_badges_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_badges | |
ADD CONSTRAINT user_badges_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4255 (class 2606 OID 47508) | |
-- Name: user_custom_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_custom_fields | |
ADD CONSTRAINT user_custom_fields_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4303 (class 2606 OID 48816) | |
-- Name: user_exports_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_exports | |
ADD CONSTRAINT user_exports_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4325 (class 2606 OID 108113) | |
-- Name: user_field_options_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_field_options | |
ADD CONSTRAINT user_field_options_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4301 (class 2606 OID 47696) | |
-- Name: user_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_fields | |
ADD CONSTRAINT user_fields_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4262 (class 2606 OID 47510) | |
-- Name: user_histories_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_histories | |
ADD CONSTRAINT user_histories_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4265 (class 2606 OID 47512) | |
-- Name: user_open_ids_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_open_ids | |
ADD CONSTRAINT user_open_ids_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4336 (class 2606 OID 115409) | |
-- Name: user_profile_views_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_profile_views | |
ADD CONSTRAINT user_profile_views_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4268 (class 2606 OID 47514) | |
-- Name: user_profiles_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_profiles | |
ADD CONSTRAINT user_profiles_pkey PRIMARY KEY (user_id); | |
-- | |
-- TOC entry 4273 (class 2606 OID 47516) | |
-- Name: user_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_stats | |
ADD CONSTRAINT user_stats_pkey PRIMARY KEY (user_id); | |
-- | |
-- TOC entry 4277 (class 2606 OID 47518) | |
-- Name: user_visits_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_visits | |
ADD CONSTRAINT user_visits_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4287 (class 2606 OID 47520) | |
-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY users | |
ADD CONSTRAINT users_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4271 (class 2606 OID 47522) | |
-- Name: users_search_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY user_search_data | |
ADD CONSTRAINT users_search_pkey PRIMARY KEY (user_id); | |
-- | |
-- TOC entry 4295 (class 2606 OID 47524) | |
-- Name: versions_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY versions | |
ADD CONSTRAINT versions_pkey PRIMARY KEY (id); | |
-- | |
-- TOC entry 4299 (class 2606 OID 47526) | |
-- Name: warnings_pkey; Type: CONSTRAINT; Schema: public; Owner: discourse; Tablespace: | |
-- | |
ALTER TABLE ONLY warnings | |
ADD CONSTRAINT warnings_pkey PRIMARY KEY (id); | |
SET search_path = backup, pg_catalog; | |
-- | |
-- TOC entry 3867 (class 1259 OID 39334) | |
-- Name: by_link; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX by_link ON topic_link_clicks USING btree (topic_link_id); | |
-- | |
-- TOC entry 3973 (class 1259 OID 40846) | |
-- Name: by_queue_status; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX by_queue_status ON queued_posts USING btree (queue, state, created_at); | |
-- | |
-- TOC entry 3974 (class 1259 OID 40847) | |
-- Name: by_queue_status_topic; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX by_queue_status_topic ON queued_posts USING btree (topic_id, queue, state, created_at); | |
-- | |
-- TOC entry 3684 (class 1259 OID 39335) | |
-- Name: cat_featured_threads; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX cat_featured_threads ON category_featured_topics USING btree (category_id, topic_id); | |
-- | |
-- TOC entry 3659 (class 1259 OID 39336) | |
-- Name: idx_posts_created_at_topic_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_posts_created_at_topic_id ON posts USING btree (created_at, topic_id) WHERE (deleted_at IS NULL); | |
-- | |
-- TOC entry 3660 (class 1259 OID 39337) | |
-- Name: idx_posts_user_id_deleted_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_posts_user_id_deleted_at ON posts USING btree (user_id) WHERE (deleted_at IS NULL); | |
-- | |
-- TOC entry 3695 (class 1259 OID 39338) | |
-- Name: idx_search_category; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_search_category ON category_search_data USING gin (search_data); | |
-- | |
-- TOC entry 3794 (class 1259 OID 39339) | |
-- Name: idx_search_post; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_search_post ON post_search_data USING gin (search_data); | |
-- | |
-- TOC entry 3876 (class 1259 OID 39340) | |
-- Name: idx_search_topic; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_search_topic ON topic_search_data USING gin (search_data); | |
-- | |
-- TOC entry 3925 (class 1259 OID 39341) | |
-- Name: idx_search_user; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_search_user ON user_search_data USING gin (search_data); | |
-- | |
-- TOC entry 3668 (class 1259 OID 39342) | |
-- Name: idx_topics_front_page; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_topics_front_page ON topics USING btree (deleted_at, visible, archetype, category_id, id); | |
-- | |
-- TOC entry 3669 (class 1259 OID 39343) | |
-- Name: idx_topics_user_id_deleted_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_topics_user_id_deleted_at ON topics USING btree (user_id) WHERE (deleted_at IS NULL); | |
-- | |
-- TOC entry 3778 (class 1259 OID 39344) | |
-- Name: idx_unique_actions; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX idx_unique_actions ON 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)); | |
-- | |
-- TOC entry 3779 (class 1259 OID 39345) | |
-- Name: idx_unique_flags; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX idx_unique_flags ON 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]))); | |
-- | |
-- TOC entry 3800 (class 1259 OID 39346) | |
-- Name: idx_unique_post_uploads; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX idx_unique_post_uploads ON post_uploads USING btree (post_id, upload_id); | |
-- | |
-- TOC entry 3899 (class 1259 OID 39347) | |
-- Name: idx_unique_rows; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX idx_unique_rows ON user_actions USING btree (action_type, user_id, target_topic_id, target_post_id, acting_user_id); | |
-- | |
-- TOC entry 3650 (class 1259 OID 39348) | |
-- Name: index_api_keys_on_key; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_api_keys_on_key ON api_keys USING btree (key); | |
-- | |
-- TOC entry 3651 (class 1259 OID 39349) | |
-- Name: index_api_keys_on_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_api_keys_on_user_id ON api_keys USING btree (user_id); | |
-- | |
-- TOC entry 3962 (class 1259 OID 40679) | |
-- Name: index_application_requests_on_date_and_req_type; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_application_requests_on_date_and_req_type ON application_requests USING btree (date, req_type); | |
-- | |
-- TOC entry 3677 (class 1259 OID 39350) | |
-- Name: index_badge_types_on_name; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_badge_types_on_name ON badge_types USING btree (name); | |
-- | |
-- TOC entry 3680 (class 1259 OID 39351) | |
-- Name: index_badges_on_name; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_badges_on_name ON badges USING btree (name); | |
-- | |
-- TOC entry 3656 (class 1259 OID 39352) | |
-- Name: index_categories_on_email_in; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_categories_on_email_in ON categories USING btree (email_in); | |
-- | |
-- TOC entry 3657 (class 1259 OID 39353) | |
-- Name: index_categories_on_topic_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_categories_on_topic_count ON categories USING btree (topic_count); | |
-- | |
-- TOC entry 3683 (class 1259 OID 39354) | |
-- Name: index_category_custom_fields_on_category_id_and_name; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_category_custom_fields_on_category_id_and_name ON category_custom_fields USING btree (category_id, name); | |
-- | |
-- TOC entry 3687 (class 1259 OID 39355) | |
-- Name: index_category_featured_topics_on_category_id_and_rank; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_category_featured_topics_on_category_id_and_rank ON category_featured_topics USING btree (category_id, rank); | |
-- | |
-- TOC entry 3690 (class 1259 OID 39356) | |
-- Name: index_category_featured_users_on_category_id_and_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_category_featured_users_on_category_id_and_user_id ON category_featured_users USING btree (category_id, user_id); | |
-- | |
-- TOC entry 3700 (class 1259 OID 39357) | |
-- Name: index_color_scheme_colors_on_color_scheme_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_color_scheme_colors_on_color_scheme_id ON color_scheme_colors USING btree (color_scheme_id); | |
-- | |
-- TOC entry 3965 (class 1259 OID 40691) | |
-- Name: index_digest_unsubscribe_keys_on_created_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_digest_unsubscribe_keys_on_created_at ON digest_unsubscribe_keys USING btree (created_at); | |
-- | |
-- TOC entry 3968 (class 1259 OID 40803) | |
-- Name: index_directory_items_on_period_type; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_directory_items_on_period_type ON directory_items USING btree (period_type); | |
-- | |
-- TOC entry 3705 (class 1259 OID 39358) | |
-- Name: index_draft_sequences_on_user_id_and_draft_key; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_draft_sequences_on_user_id_and_draft_key ON draft_sequences USING btree (user_id, draft_key); | |
-- | |
-- TOC entry 3708 (class 1259 OID 39359) | |
-- Name: index_drafts_on_user_id_and_draft_key; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_drafts_on_user_id_and_draft_key ON drafts USING btree (user_id, draft_key); | |
-- | |
-- TOC entry 3711 (class 1259 OID 39360) | |
-- Name: index_email_logs_on_created_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_email_logs_on_created_at ON email_logs USING btree (created_at DESC); | |
-- | |
-- TOC entry 3712 (class 1259 OID 39361) | |
-- Name: index_email_logs_on_reply_key; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_email_logs_on_reply_key ON email_logs USING btree (reply_key); | |
-- | |
-- TOC entry 3713 (class 1259 OID 39362) | |
-- Name: index_email_logs_on_skipped_and_created_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_email_logs_on_skipped_and_created_at ON email_logs USING btree (skipped, created_at); | |
-- | |
-- TOC entry 3714 (class 1259 OID 39363) | |
-- Name: index_email_logs_on_user_id_and_created_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_email_logs_on_user_id_and_created_at ON email_logs USING btree (user_id, created_at DESC); | |
-- | |
-- TOC entry 3717 (class 1259 OID 39364) | |
-- Name: index_email_tokens_on_token; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_email_tokens_on_token ON email_tokens USING btree (token); | |
-- | |
-- TOC entry 3718 (class 1259 OID 39365) | |
-- Name: index_email_tokens_on_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_email_tokens_on_user_id ON email_tokens USING btree (user_id); | |
-- | |
-- TOC entry 3721 (class 1259 OID 39366) | |
-- Name: index_facebook_user_infos_on_facebook_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_facebook_user_infos_on_facebook_user_id ON facebook_user_infos USING btree (facebook_user_id); | |
-- | |
-- TOC entry 3722 (class 1259 OID 39367) | |
-- Name: index_facebook_user_infos_on_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_facebook_user_infos_on_user_id ON facebook_user_infos USING btree (user_id); | |
-- | |
-- TOC entry 3725 (class 1259 OID 39368) | |
-- Name: index_github_user_infos_on_github_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_github_user_infos_on_github_user_id ON github_user_infos USING btree (github_user_id); | |
-- | |
-- TOC entry 3726 (class 1259 OID 39369) | |
-- Name: index_github_user_infos_on_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_github_user_infos_on_user_id ON github_user_infos USING btree (user_id); | |
-- | |
-- TOC entry 3729 (class 1259 OID 39370) | |
-- Name: index_google_user_infos_on_google_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_google_user_infos_on_google_user_id ON google_user_infos USING btree (google_user_id); | |
-- | |
-- TOC entry 3730 (class 1259 OID 39371) | |
-- Name: index_google_user_infos_on_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_google_user_infos_on_user_id ON google_user_infos USING btree (user_id); | |
-- | |
-- TOC entry 3733 (class 1259 OID 39372) | |
-- Name: index_group_custom_fields_on_group_id_and_name; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_group_custom_fields_on_group_id_and_name ON group_custom_fields USING btree (group_id, name); | |
-- | |
-- TOC entry 3959 (class 1259 OID 40648) | |
-- Name: index_group_managers_on_group_id_and_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_group_managers_on_group_id_and_user_id ON group_managers USING btree (group_id, user_id); | |
-- | |
-- TOC entry 3736 (class 1259 OID 39373) | |
-- Name: index_group_users_on_group_id_and_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_group_users_on_group_id_and_user_id ON group_users USING btree (group_id, user_id); | |
-- | |
-- TOC entry 3739 (class 1259 OID 39374) | |
-- Name: index_groups_on_name; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_groups_on_name ON groups USING btree (name); | |
-- | |
-- TOC entry 3742 (class 1259 OID 39375) | |
-- Name: index_incoming_domains_on_name_and_https_and_port; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_incoming_domains_on_name_and_https_and_port ON incoming_domains USING btree (name, https, port); | |
-- | |
-- TOC entry 3745 (class 1259 OID 39376) | |
-- Name: index_incoming_links_on_created_at_and_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_incoming_links_on_created_at_and_user_id ON incoming_links USING btree (created_at, user_id); | |
-- | |
-- TOC entry 3746 (class 1259 OID 39377) | |
-- Name: index_incoming_links_on_post_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_incoming_links_on_post_id ON incoming_links USING btree (post_id); | |
-- | |
-- TOC entry 3749 (class 1259 OID 39378) | |
-- Name: index_incoming_referers_on_path_and_incoming_domain_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_incoming_referers_on_path_and_incoming_domain_id ON incoming_referers USING btree (path, incoming_domain_id); | |
-- | |
-- TOC entry 3752 (class 1259 OID 39379) | |
-- Name: index_invites_on_email_and_invited_by_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_invites_on_email_and_invited_by_id ON invites USING btree (email, invited_by_id); | |
-- | |
-- TOC entry 3753 (class 1259 OID 39380) | |
-- Name: index_invites_on_invite_key; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_invites_on_invite_key ON invites USING btree (invite_key); | |
-- | |
-- TOC entry 3756 (class 1259 OID 39381) | |
-- Name: index_message_bus_on_created_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_message_bus_on_created_at ON message_bus USING btree (created_at); | |
-- | |
-- TOC entry 3969 (class 1259 OID 40822) | |
-- Name: index_muted_users_on_muted_user_id_and_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_muted_users_on_muted_user_id_and_user_id ON muted_users USING btree (muted_user_id, user_id); | |
-- | |
-- TOC entry 3970 (class 1259 OID 40821) | |
-- Name: index_muted_users_on_user_id_and_muted_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_muted_users_on_user_id_and_muted_user_id ON muted_users USING btree (user_id, muted_user_id); | |
-- | |
-- TOC entry 3759 (class 1259 OID 39382) | |
-- Name: index_notifications_on_post_action_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_notifications_on_post_action_id ON notifications USING btree (post_action_id); | |
-- | |
-- TOC entry 3760 (class 1259 OID 39383) | |
-- Name: index_notifications_on_user_id_and_created_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_notifications_on_user_id_and_created_at ON notifications USING btree (user_id, created_at); | |
-- | |
-- TOC entry 3763 (class 1259 OID 39384) | |
-- Name: index_oauth2_user_infos_on_uid_and_provider; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_oauth2_user_infos_on_uid_and_provider ON oauth2_user_infos USING btree (uid, provider); | |
-- | |
-- TOC entry 3766 (class 1259 OID 39385) | |
-- Name: index_optimized_images_on_upload_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_optimized_images_on_upload_id ON optimized_images USING btree (upload_id); | |
-- | |
-- TOC entry 3767 (class 1259 OID 39386) | |
-- Name: index_optimized_images_on_upload_id_and_width_and_height; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_optimized_images_on_upload_id_and_width_and_height ON optimized_images USING btree (upload_id, width, height); | |
-- | |
-- TOC entry 3770 (class 1259 OID 39387) | |
-- Name: index_permalinks_on_url; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_permalinks_on_url ON permalinks USING btree (url); | |
-- | |
-- TOC entry 3773 (class 1259 OID 39388) | |
-- Name: index_plugin_store_rows_on_plugin_name_and_key; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_plugin_store_rows_on_plugin_name_and_key ON plugin_store_rows USING btree (plugin_name, key); | |
-- | |
-- TOC entry 3780 (class 1259 OID 39389) | |
-- Name: index_post_actions_on_post_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_post_actions_on_post_id ON post_actions USING btree (post_id); | |
-- | |
-- TOC entry 3783 (class 1259 OID 39390) | |
-- Name: index_post_custom_fields_on_post_id_and_name; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_post_custom_fields_on_post_id_and_name ON post_custom_fields USING btree (post_id, name); | |
-- | |
-- TOC entry 3786 (class 1259 OID 39391) | |
-- Name: index_post_details_on_post_id_and_key; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_post_details_on_post_id_and_key ON post_details USING btree (post_id, key); | |
-- | |
-- TOC entry 3789 (class 1259 OID 39392) | |
-- Name: index_post_replies_on_post_id_and_reply_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_post_replies_on_post_id_and_reply_id ON post_replies USING btree (post_id, reply_id); | |
-- | |
-- TOC entry 3790 (class 1259 OID 39393) | |
-- Name: index_post_revisions_on_post_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_post_revisions_on_post_id ON post_revisions USING btree (post_id); | |
-- | |
-- TOC entry 3791 (class 1259 OID 39394) | |
-- Name: index_post_revisions_on_post_id_and_number; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_post_revisions_on_post_id_and_number ON post_revisions USING btree (post_id, number); | |
-- | |
-- TOC entry 3797 (class 1259 OID 39395) | |
-- Name: index_post_timings_on_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_post_timings_on_user_id ON post_timings USING btree (user_id); | |
-- | |
-- TOC entry 3661 (class 1259 OID 39396) | |
-- Name: index_posts_on_reply_to_post_number; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_posts_on_reply_to_post_number ON posts USING btree (reply_to_post_number); | |
-- | |
-- TOC entry 3662 (class 1259 OID 39397) | |
-- Name: index_posts_on_topic_id_and_post_number; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_posts_on_topic_id_and_post_number ON posts USING btree (topic_id, post_number); | |
-- | |
-- TOC entry 3663 (class 1259 OID 40649) | |
-- Name: index_posts_on_user_id_and_created_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_posts_on_user_id_and_created_at ON posts USING btree (user_id, created_at); | |
-- | |
-- TOC entry 3803 (class 1259 OID 39398) | |
-- Name: index_quoted_posts_on_post_id_and_quoted_post_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_quoted_posts_on_post_id_and_quoted_post_id ON quoted_posts USING btree (post_id, quoted_post_id); | |
-- | |
-- TOC entry 3804 (class 1259 OID 39399) | |
-- Name: index_quoted_posts_on_quoted_post_id_and_post_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_quoted_posts_on_quoted_post_id_and_post_id ON quoted_posts USING btree (quoted_post_id, post_id); | |
-- | |
-- TOC entry 3810 (class 1259 OID 39400) | |
-- Name: index_screened_emails_on_email; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_screened_emails_on_email ON screened_emails USING btree (email); | |
-- | |
-- TOC entry 3811 (class 1259 OID 39401) | |
-- Name: index_screened_emails_on_last_match_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_screened_emails_on_last_match_at ON screened_emails USING btree (last_match_at); | |
-- | |
-- TOC entry 3812 (class 1259 OID 39402) | |
-- Name: index_screened_ip_addresses_on_ip_address; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_screened_ip_addresses_on_ip_address ON screened_ip_addresses USING btree (ip_address); | |
-- | |
-- TOC entry 3813 (class 1259 OID 39403) | |
-- Name: index_screened_ip_addresses_on_last_match_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_screened_ip_addresses_on_last_match_at ON screened_ip_addresses USING btree (last_match_at); | |
-- | |
-- TOC entry 3816 (class 1259 OID 39404) | |
-- Name: index_screened_urls_on_last_match_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_screened_urls_on_last_match_at ON screened_urls USING btree (last_match_at); | |
-- | |
-- TOC entry 3817 (class 1259 OID 39405) | |
-- Name: index_screened_urls_on_url; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_screened_urls_on_url ON screened_urls USING btree (url); | |
-- | |
-- TOC entry 3820 (class 1259 OID 39406) | |
-- Name: index_single_sign_on_records_on_external_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_single_sign_on_records_on_external_id ON single_sign_on_records USING btree (external_id); | |
-- | |
-- TOC entry 3824 (class 1259 OID 39408) | |
-- Name: index_site_customizations_on_key; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_site_customizations_on_key ON site_customizations USING btree (key); | |
-- | |
-- TOC entry 3823 (class 1259 OID 39407) | |
-- Name: index_site_texts_on_text_type; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_site_texts_on_text_type ON site_texts USING btree (text_type); | |
-- | |
-- TOC entry 3977 (class 1259 OID 40873) | |
-- Name: index_stylesheet_cache_on_target_and_digest; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_stylesheet_cache_on_target_and_digest ON stylesheet_cache USING btree (target, digest); | |
-- | |
-- TOC entry 3829 (class 1259 OID 39409) | |
-- Name: index_top_topics_on_daily_likes_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_daily_likes_count ON top_topics USING btree (daily_likes_count DESC); | |
-- | |
-- TOC entry 3830 (class 1259 OID 40731) | |
-- Name: index_top_topics_on_daily_op_likes_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_daily_op_likes_count ON top_topics USING btree (daily_op_likes_count); | |
-- | |
-- TOC entry 3831 (class 1259 OID 39410) | |
-- Name: index_top_topics_on_daily_posts_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_daily_posts_count ON top_topics USING btree (daily_posts_count DESC); | |
-- | |
-- TOC entry 3832 (class 1259 OID 39411) | |
-- Name: index_top_topics_on_daily_views_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_daily_views_count ON top_topics USING btree (daily_views_count DESC); | |
-- | |
-- TOC entry 3833 (class 1259 OID 39412) | |
-- Name: index_top_topics_on_monthly_likes_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_monthly_likes_count ON top_topics USING btree (monthly_likes_count DESC); | |
-- | |
-- TOC entry 3834 (class 1259 OID 40772) | |
-- Name: index_top_topics_on_monthly_op_likes_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_monthly_op_likes_count ON top_topics USING btree (monthly_op_likes_count); | |
-- | |
-- TOC entry 3835 (class 1259 OID 39413) | |
-- Name: index_top_topics_on_monthly_posts_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_monthly_posts_count ON top_topics USING btree (monthly_posts_count DESC); | |
-- | |
-- TOC entry 3836 (class 1259 OID 39414) | |
-- Name: index_top_topics_on_monthly_views_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_monthly_views_count ON top_topics USING btree (monthly_views_count DESC); | |
-- | |
-- TOC entry 3837 (class 1259 OID 39415) | |
-- Name: index_top_topics_on_topic_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_top_topics_on_topic_id ON top_topics USING btree (topic_id); | |
-- | |
-- TOC entry 3838 (class 1259 OID 39416) | |
-- Name: index_top_topics_on_weekly_likes_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_weekly_likes_count ON top_topics USING btree (weekly_likes_count DESC); | |
-- | |
-- TOC entry 3839 (class 1259 OID 40751) | |
-- Name: index_top_topics_on_weekly_op_likes_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_weekly_op_likes_count ON top_topics USING btree (weekly_op_likes_count); | |
-- | |
-- TOC entry 3840 (class 1259 OID 39417) | |
-- Name: index_top_topics_on_weekly_posts_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_weekly_posts_count ON top_topics USING btree (weekly_posts_count DESC); | |
-- | |
-- TOC entry 3841 (class 1259 OID 39418) | |
-- Name: index_top_topics_on_weekly_views_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_weekly_views_count ON top_topics USING btree (weekly_views_count DESC); | |
-- | |
-- TOC entry 3842 (class 1259 OID 39419) | |
-- Name: index_top_topics_on_yearly_likes_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_yearly_likes_count ON top_topics USING btree (yearly_likes_count DESC); | |
-- | |
-- TOC entry 3843 (class 1259 OID 40794) | |
-- Name: index_top_topics_on_yearly_op_likes_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_yearly_op_likes_count ON top_topics USING btree (yearly_op_likes_count); | |
-- | |
-- TOC entry 3844 (class 1259 OID 39420) | |
-- Name: index_top_topics_on_yearly_posts_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_yearly_posts_count ON top_topics USING btree (yearly_posts_count DESC); | |
-- | |
-- TOC entry 3845 (class 1259 OID 39421) | |
-- Name: index_top_topics_on_yearly_views_count; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_yearly_views_count ON top_topics USING btree (yearly_views_count DESC); | |
-- | |
-- TOC entry 3848 (class 1259 OID 39422) | |
-- Name: index_topic_allowed_groups_on_group_id_and_topic_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_allowed_groups_on_group_id_and_topic_id ON topic_allowed_groups USING btree (group_id, topic_id); | |
-- | |
-- TOC entry 3849 (class 1259 OID 39423) | |
-- Name: index_topic_allowed_groups_on_topic_id_and_group_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_allowed_groups_on_topic_id_and_group_id ON topic_allowed_groups USING btree (topic_id, group_id); | |
-- | |
-- TOC entry 3852 (class 1259 OID 39424) | |
-- Name: index_topic_allowed_users_on_topic_id_and_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_allowed_users_on_topic_id_and_user_id ON topic_allowed_users USING btree (topic_id, user_id); | |
-- | |
-- TOC entry 3853 (class 1259 OID 39425) | |
-- Name: index_topic_allowed_users_on_user_id_and_topic_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_allowed_users_on_user_id_and_topic_id ON topic_allowed_users USING btree (user_id, topic_id); | |
-- | |
-- TOC entry 3856 (class 1259 OID 39426) | |
-- Name: index_topic_custom_fields_on_topic_id_and_name; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_custom_fields_on_topic_id_and_name ON topic_custom_fields USING btree (topic_id, name); | |
-- | |
-- TOC entry 3857 (class 1259 OID 40639) | |
-- Name: index_topic_custom_fields_on_value; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_custom_fields_on_value ON topic_custom_fields USING btree (value); | |
-- | |
-- TOC entry 3860 (class 1259 OID 40860) | |
-- Name: index_topic_embeds_on_embed_url; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_embeds_on_embed_url ON topic_embeds USING btree (embed_url); | |
-- | |
-- TOC entry 3863 (class 1259 OID 39428) | |
-- Name: index_topic_invites_on_invite_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_invites_on_invite_id ON topic_invites USING btree (invite_id); | |
-- | |
-- TOC entry 3864 (class 1259 OID 39429) | |
-- Name: index_topic_invites_on_topic_id_and_invite_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_invites_on_topic_id_and_invite_id ON topic_invites USING btree (topic_id, invite_id); | |
-- | |
-- TOC entry 3872 (class 1259 OID 40861) | |
-- Name: index_topic_links_on_link_post_id_and_reflection; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_links_on_link_post_id_and_reflection ON topic_links USING btree (link_post_id, reflection); | |
-- | |
-- TOC entry 3873 (class 1259 OID 39430) | |
-- Name: index_topic_links_on_post_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_links_on_post_id ON topic_links USING btree (post_id); | |
-- | |
-- TOC entry 3874 (class 1259 OID 39431) | |
-- Name: index_topic_links_on_topic_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_links_on_topic_id ON topic_links USING btree (topic_id); | |
-- | |
-- TOC entry 3879 (class 1259 OID 39432) | |
-- Name: index_topic_users_on_topic_id_and_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_users_on_topic_id_and_user_id ON topic_users USING btree (topic_id, user_id); | |
-- | |
-- TOC entry 3880 (class 1259 OID 39433) | |
-- Name: index_topic_users_on_user_id_and_topic_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_users_on_user_id_and_topic_id ON topic_users USING btree (user_id, topic_id); | |
-- | |
-- TOC entry 3883 (class 1259 OID 39434) | |
-- Name: index_topic_views_on_topic_id_and_viewed_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_views_on_topic_id_and_viewed_at ON topic_views USING btree (topic_id, viewed_at); | |
-- | |
-- TOC entry 3884 (class 1259 OID 39435) | |
-- Name: index_topic_views_on_viewed_at_and_topic_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_views_on_viewed_at_and_topic_id ON topic_views USING btree (viewed_at, topic_id); | |
-- | |
-- TOC entry 3670 (class 1259 OID 39436) | |
-- Name: index_topics_on_bumped_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topics_on_bumped_at ON topics USING btree (bumped_at DESC); | |
-- | |
-- TOC entry 3671 (class 1259 OID 40694) | |
-- Name: index_topics_on_created_at_and_visible; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topics_on_created_at_and_visible ON topics USING btree (created_at, visible) WHERE ((deleted_at IS NULL) AND ((archetype)::text <> 'private_message'::text)); | |
-- | |
-- TOC entry 3672 (class 1259 OID 39437) | |
-- Name: index_topics_on_id_and_deleted_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topics_on_id_and_deleted_at ON topics USING btree (id, deleted_at); | |
-- | |
-- TOC entry 3673 (class 1259 OID 40693) | |
-- Name: index_topics_on_pinned_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topics_on_pinned_at ON topics USING btree (pinned_at) WHERE (pinned_at IS NOT NULL); | |
-- | |
-- TOC entry 3674 (class 1259 OID 40692) | |
-- Name: index_topics_on_pinned_globally; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topics_on_pinned_globally ON topics USING btree (pinned_globally) WHERE pinned_globally; | |
-- | |
-- TOC entry 3887 (class 1259 OID 39438) | |
-- Name: index_twitter_user_infos_on_twitter_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_twitter_user_infos_on_twitter_user_id ON twitter_user_infos USING btree (twitter_user_id); | |
-- | |
-- TOC entry 3888 (class 1259 OID 39439) | |
-- Name: index_twitter_user_infos_on_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_twitter_user_infos_on_user_id ON twitter_user_infos USING btree (user_id); | |
-- | |
-- TOC entry 3891 (class 1259 OID 39440) | |
-- Name: index_uploads_on_id_and_url; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_uploads_on_id_and_url ON uploads USING btree (id, url); | |
-- | |
-- TOC entry 3892 (class 1259 OID 39441) | |
-- Name: index_uploads_on_sha1; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_uploads_on_sha1 ON uploads USING btree (sha1); | |
-- | |
-- TOC entry 3893 (class 1259 OID 39442) | |
-- Name: index_uploads_on_url; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_uploads_on_url ON uploads USING btree (url); | |
-- | |
-- TOC entry 3894 (class 1259 OID 39443) | |
-- Name: index_uploads_on_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_uploads_on_user_id ON uploads USING btree (user_id); | |
-- | |
-- TOC entry 3900 (class 1259 OID 39444) | |
-- Name: index_user_actions_on_acting_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_actions_on_acting_user_id ON user_actions USING btree (acting_user_id); | |
-- | |
-- TOC entry 3901 (class 1259 OID 39445) | |
-- Name: index_user_actions_on_user_id_and_action_type; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_actions_on_user_id_and_action_type ON user_actions USING btree (user_id, action_type); | |
-- | |
-- TOC entry 3902 (class 1259 OID 39446) | |
-- Name: index_user_avatars_on_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_avatars_on_user_id ON user_avatars USING btree (user_id); | |
-- | |
-- TOC entry 3905 (class 1259 OID 39447) | |
-- Name: index_user_badges_on_badge_id_and_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_badges_on_badge_id_and_user_id ON user_badges USING btree (badge_id, user_id); | |
-- | |
-- TOC entry 3906 (class 1259 OID 39448) | |
-- Name: index_user_badges_on_badge_id_and_user_id_and_post_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_user_badges_on_badge_id_and_user_id_and_post_id ON user_badges USING btree (badge_id, user_id, post_id) WHERE (post_id IS NOT NULL); | |
-- | |
-- TOC entry 3907 (class 1259 OID 39449) | |
-- Name: index_user_badges_on_badge_id_and_user_id_and_seq; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_user_badges_on_badge_id_and_user_id_and_seq ON user_badges USING btree (badge_id, user_id, seq) WHERE (post_id IS NULL); | |
-- | |
-- TOC entry 3910 (class 1259 OID 39450) | |
-- Name: index_user_custom_fields_on_user_id_and_name; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_custom_fields_on_user_id_and_name ON user_custom_fields USING btree (user_id, name); | |
-- | |
-- TOC entry 3913 (class 1259 OID 39451) | |
-- Name: index_user_histories_on_acting_user_id_and_action_and_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_histories_on_acting_user_id_and_action_and_id ON user_histories USING btree (acting_user_id, action, id); | |
-- | |
-- TOC entry 3914 (class 1259 OID 39452) | |
-- Name: index_user_histories_on_action_and_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_histories_on_action_and_id ON user_histories USING btree (action, id); | |
-- | |
-- TOC entry 3915 (class 1259 OID 39453) | |
-- Name: index_user_histories_on_subject_and_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_histories_on_subject_and_id ON user_histories USING btree (subject, id); | |
-- | |
-- TOC entry 3916 (class 1259 OID 39454) | |
-- Name: index_user_histories_on_target_user_id_and_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_histories_on_target_user_id_and_id ON user_histories USING btree (target_user_id, id); | |
-- | |
-- TOC entry 3919 (class 1259 OID 39455) | |
-- Name: index_user_open_ids_on_url; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_open_ids_on_url ON user_open_ids USING btree (url); | |
-- | |
-- TOC entry 3922 (class 1259 OID 39456) | |
-- Name: index_user_profiles_on_bio_cooked_version; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_profiles_on_bio_cooked_version ON user_profiles USING btree (bio_cooked_version); | |
-- | |
-- TOC entry 3930 (class 1259 OID 39457) | |
-- Name: index_user_visits_on_user_id_and_visited_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_user_visits_on_user_id_and_visited_at ON user_visits USING btree (user_id, visited_at); | |
-- | |
-- TOC entry 3933 (class 1259 OID 39458) | |
-- Name: index_users_on_auth_token; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_users_on_auth_token ON users USING btree (auth_token); | |
-- | |
-- TOC entry 3934 (class 1259 OID 39459) | |
-- Name: index_users_on_email; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_users_on_email ON users USING btree (lower((email)::text)); | |
-- | |
-- TOC entry 3935 (class 1259 OID 39460) | |
-- Name: index_users_on_last_posted_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_users_on_last_posted_at ON users USING btree (last_posted_at); | |
-- | |
-- TOC entry 3936 (class 1259 OID 39461) | |
-- Name: index_users_on_last_seen_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_users_on_last_seen_at ON users USING btree (last_seen_at); | |
-- | |
-- TOC entry 3937 (class 1259 OID 39462) | |
-- Name: index_users_on_username; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_users_on_username ON users USING btree (username); | |
-- | |
-- TOC entry 3938 (class 1259 OID 39463) | |
-- Name: index_users_on_username_lower; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_users_on_username_lower ON users USING btree (username_lower); | |
-- | |
-- TOC entry 3941 (class 1259 OID 39464) | |
-- Name: index_versions_on_created_at; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_versions_on_created_at ON versions USING btree (created_at); | |
-- | |
-- TOC entry 3942 (class 1259 OID 39465) | |
-- Name: index_versions_on_number; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_versions_on_number ON versions USING btree (number); | |
-- | |
-- TOC entry 3943 (class 1259 OID 39466) | |
-- Name: index_versions_on_tag; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_versions_on_tag ON versions USING btree (tag); | |
-- | |
-- TOC entry 3944 (class 1259 OID 39467) | |
-- Name: index_versions_on_user_id_and_user_type; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_versions_on_user_id_and_user_type ON versions USING btree (user_id, user_type); | |
-- | |
-- TOC entry 3945 (class 1259 OID 39468) | |
-- Name: index_versions_on_user_name; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_versions_on_user_name ON versions USING btree (user_name); | |
-- | |
-- TOC entry 3946 (class 1259 OID 39469) | |
-- Name: index_versions_on_versioned_id_and_versioned_type; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_versions_on_versioned_id_and_versioned_type ON versions USING btree (versioned_id, versioned_type); | |
-- | |
-- TOC entry 3949 (class 1259 OID 39470) | |
-- Name: index_warnings_on_topic_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_warnings_on_topic_id ON warnings USING btree (topic_id); | |
-- | |
-- TOC entry 3950 (class 1259 OID 39471) | |
-- Name: index_warnings_on_user_id; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_warnings_on_user_id ON warnings USING btree (user_id); | |
-- | |
-- TOC entry 3885 (class 1259 OID 39472) | |
-- Name: ip_address_topic_id_topic_views; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX ip_address_topic_id_topic_views ON topic_views USING btree (ip_address, topic_id) WHERE (user_id IS NULL); | |
-- | |
-- TOC entry 3798 (class 1259 OID 39473) | |
-- Name: post_timings_summary; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX post_timings_summary ON post_timings USING btree (topic_id, post_number); | |
-- | |
-- TOC entry 3799 (class 1259 OID 39474) | |
-- Name: post_timings_unique; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX post_timings_unique ON post_timings USING btree (topic_id, post_number, user_id); | |
-- | |
-- TOC entry 3658 (class 1259 OID 39475) | |
-- Name: unique_index_categories_on_name; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX unique_index_categories_on_name ON categories USING btree ((COALESCE(parent_category_id, (-1))), name); | |
-- | |
-- TOC entry 3875 (class 1259 OID 39476) | |
-- Name: unique_post_links; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX unique_post_links ON topic_links USING btree (topic_id, post_id, url); | |
-- | |
-- TOC entry 3807 (class 1259 OID 39477) | |
-- Name: unique_schema_migrations; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version); | |
-- | |
-- TOC entry 3886 (class 1259 OID 39478) | |
-- Name: user_id_topic_id_topic_views; Type: INDEX; Schema: backup; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX user_id_topic_id_topic_views ON topic_views USING btree (user_id, topic_id) WHERE (user_id IS NOT NULL); | |
SET search_path = public, pg_catalog; | |
-- | |
-- TOC entry 4208 (class 1259 OID 47527) | |
-- Name: by_link; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX by_link ON topic_link_clicks USING btree (topic_link_id); | |
-- | |
-- TOC entry 4317 (class 1259 OID 49038) | |
-- Name: by_queue_status; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX by_queue_status ON queued_posts USING btree (queue, state, created_at); | |
-- | |
-- TOC entry 4318 (class 1259 OID 49039) | |
-- Name: by_queue_status_topic; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX by_queue_status_topic ON queued_posts USING btree (topic_id, queue, state, created_at); | |
-- | |
-- TOC entry 4017 (class 1259 OID 47528) | |
-- Name: cat_featured_threads; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX cat_featured_threads ON category_featured_topics USING btree (category_id, topic_id); | |
-- | |
-- TOC entry 4093 (class 1259 OID 67407) | |
-- Name: idx_notifications_speedup_unread_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_notifications_speedup_unread_count ON notifications USING btree (user_id, notification_type) WHERE (NOT read); | |
-- | |
-- TOC entry 3991 (class 1259 OID 47529) | |
-- Name: idx_posts_created_at_topic_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_posts_created_at_topic_id ON posts USING btree (created_at, topic_id) WHERE (deleted_at IS NULL); | |
-- | |
-- TOC entry 3992 (class 1259 OID 47530) | |
-- Name: idx_posts_user_id_deleted_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_posts_user_id_deleted_at ON posts USING btree (user_id) WHERE (deleted_at IS NULL); | |
-- | |
-- TOC entry 4028 (class 1259 OID 47531) | |
-- Name: idx_search_category; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_search_category ON category_search_data USING gin (search_data); | |
-- | |
-- TOC entry 4132 (class 1259 OID 47532) | |
-- Name: idx_search_post; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_search_post ON post_search_data USING gin (search_data); | |
-- | |
-- TOC entry 4217 (class 1259 OID 47533) | |
-- Name: idx_search_topic; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_search_topic ON topic_search_data USING gin (search_data); | |
-- | |
-- TOC entry 4269 (class 1259 OID 47534) | |
-- Name: idx_search_user; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_search_user ON user_search_data USING gin (search_data); | |
-- | |
-- TOC entry 4000 (class 1259 OID 47535) | |
-- Name: idx_topics_front_page; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_topics_front_page ON topics USING btree (deleted_at, visible, archetype, category_id, id); | |
-- | |
-- TOC entry 4001 (class 1259 OID 47536) | |
-- Name: idx_topics_user_id_deleted_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_topics_user_id_deleted_at ON topics USING btree (user_id) WHERE (deleted_at IS NULL); | |
-- | |
-- TOC entry 4114 (class 1259 OID 47537) | |
-- Name: idx_unique_actions; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX idx_unique_actions ON 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)); | |
-- | |
-- TOC entry 4115 (class 1259 OID 47538) | |
-- Name: idx_unique_flags; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX idx_unique_flags ON 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]))); | |
-- | |
-- TOC entry 4138 (class 1259 OID 47539) | |
-- Name: idx_unique_post_uploads; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX idx_unique_post_uploads ON post_uploads USING btree (post_id, upload_id); | |
-- | |
-- TOC entry 4240 (class 1259 OID 47540) | |
-- Name: idx_unique_rows; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX idx_unique_rows ON user_actions USING btree (action_type, user_id, target_topic_id, target_post_id, acting_user_id); | |
-- | |
-- TOC entry 4241 (class 1259 OID 67408) | |
-- Name: idx_user_actions_speed_up_user_all; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_user_actions_speed_up_user_all ON user_actions USING btree (user_id, created_at, action_type); | |
-- | |
-- TOC entry 4278 (class 1259 OID 75955) | |
-- Name: idx_users_admin; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_users_admin ON users USING btree (id) WHERE admin; | |
-- | |
-- TOC entry 4279 (class 1259 OID 75956) | |
-- Name: idx_users_moderator; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX idx_users_moderator ON users USING btree (id) WHERE moderator; | |
-- | |
-- TOC entry 3982 (class 1259 OID 47541) | |
-- Name: index_api_keys_on_key; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_api_keys_on_key ON api_keys USING btree (key); | |
-- | |
-- TOC entry 3983 (class 1259 OID 47542) | |
-- Name: index_api_keys_on_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_api_keys_on_user_id ON api_keys USING btree (user_id); | |
-- | |
-- TOC entry 4306 (class 1259 OID 48871) | |
-- Name: index_application_requests_on_date_and_req_type; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_application_requests_on_date_and_req_type ON application_requests USING btree (date, req_type); | |
-- | |
-- TOC entry 4010 (class 1259 OID 47543) | |
-- Name: index_badge_types_on_name; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_badge_types_on_name ON badge_types USING btree (name); | |
-- | |
-- TOC entry 4013 (class 1259 OID 47544) | |
-- Name: index_badges_on_name; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_badges_on_name ON badges USING btree (name); | |
-- | |
-- TOC entry 3988 (class 1259 OID 47545) | |
-- Name: index_categories_on_email_in; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_categories_on_email_in ON categories USING btree (email_in); | |
-- | |
-- TOC entry 3989 (class 1259 OID 47546) | |
-- Name: index_categories_on_topic_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_categories_on_topic_count ON categories USING btree (topic_count); | |
-- | |
-- TOC entry 4016 (class 1259 OID 47547) | |
-- Name: index_category_custom_fields_on_category_id_and_name; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_category_custom_fields_on_category_id_and_name ON category_custom_fields USING btree (category_id, name); | |
-- | |
-- TOC entry 4020 (class 1259 OID 47548) | |
-- Name: index_category_featured_topics_on_category_id_and_rank; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_category_featured_topics_on_category_id_and_rank ON category_featured_topics USING btree (category_id, rank); | |
-- | |
-- TOC entry 4023 (class 1259 OID 47549) | |
-- Name: index_category_featured_users_on_category_id_and_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_category_featured_users_on_category_id_and_user_id ON category_featured_users USING btree (category_id, user_id); | |
-- | |
-- TOC entry 4033 (class 1259 OID 47550) | |
-- Name: index_color_scheme_colors_on_color_scheme_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_color_scheme_colors_on_color_scheme_id ON color_scheme_colors USING btree (color_scheme_id); | |
-- | |
-- TOC entry 4309 (class 1259 OID 48883) | |
-- Name: index_digest_unsubscribe_keys_on_created_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_digest_unsubscribe_keys_on_created_at ON digest_unsubscribe_keys USING btree (created_at); | |
-- | |
-- TOC entry 4312 (class 1259 OID 48995) | |
-- Name: index_directory_items_on_period_type; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_directory_items_on_period_type ON directory_items USING btree (period_type); | |
-- | |
-- TOC entry 4038 (class 1259 OID 47551) | |
-- Name: index_draft_sequences_on_user_id_and_draft_key; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_draft_sequences_on_user_id_and_draft_key ON draft_sequences USING btree (user_id, draft_key); | |
-- | |
-- TOC entry 4041 (class 1259 OID 47552) | |
-- Name: index_drafts_on_user_id_and_draft_key; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_drafts_on_user_id_and_draft_key ON drafts USING btree (user_id, draft_key); | |
-- | |
-- TOC entry 4044 (class 1259 OID 47553) | |
-- Name: index_email_logs_on_created_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_email_logs_on_created_at ON email_logs USING btree (created_at DESC); | |
-- | |
-- TOC entry 4045 (class 1259 OID 47554) | |
-- Name: index_email_logs_on_reply_key; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_email_logs_on_reply_key ON email_logs USING btree (reply_key); | |
-- | |
-- TOC entry 4046 (class 1259 OID 47555) | |
-- Name: index_email_logs_on_skipped_and_created_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_email_logs_on_skipped_and_created_at ON email_logs USING btree (skipped, created_at); | |
-- | |
-- TOC entry 4047 (class 1259 OID 47556) | |
-- Name: index_email_logs_on_user_id_and_created_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_email_logs_on_user_id_and_created_at ON email_logs USING btree (user_id, created_at DESC); | |
-- | |
-- TOC entry 4050 (class 1259 OID 47557) | |
-- Name: index_email_tokens_on_token; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_email_tokens_on_token ON email_tokens USING btree (token); | |
-- | |
-- TOC entry 4051 (class 1259 OID 47558) | |
-- Name: index_email_tokens_on_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_email_tokens_on_user_id ON email_tokens USING btree (user_id); | |
-- | |
-- TOC entry 4054 (class 1259 OID 47559) | |
-- Name: index_facebook_user_infos_on_facebook_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_facebook_user_infos_on_facebook_user_id ON facebook_user_infos USING btree (facebook_user_id); | |
-- | |
-- TOC entry 4055 (class 1259 OID 47560) | |
-- Name: index_facebook_user_infos_on_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_facebook_user_infos_on_user_id ON facebook_user_infos USING btree (user_id); | |
-- | |
-- TOC entry 4058 (class 1259 OID 47561) | |
-- Name: index_github_user_infos_on_github_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_github_user_infos_on_github_user_id ON github_user_infos USING btree (github_user_id); | |
-- | |
-- TOC entry 4059 (class 1259 OID 47562) | |
-- Name: index_github_user_infos_on_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_github_user_infos_on_user_id ON github_user_infos USING btree (user_id); | |
-- | |
-- TOC entry 4062 (class 1259 OID 47563) | |
-- Name: index_google_user_infos_on_google_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_google_user_infos_on_google_user_id ON google_user_infos USING btree (google_user_id); | |
-- | |
-- TOC entry 4063 (class 1259 OID 47564) | |
-- Name: index_google_user_infos_on_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_google_user_infos_on_user_id ON google_user_infos USING btree (user_id); | |
-- | |
-- TOC entry 4066 (class 1259 OID 47565) | |
-- Name: index_group_custom_fields_on_group_id_and_name; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_group_custom_fields_on_group_id_and_name ON group_custom_fields USING btree (group_id, name); | |
-- | |
-- TOC entry 4069 (class 1259 OID 47566) | |
-- Name: index_group_users_on_group_id_and_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_group_users_on_group_id_and_user_id ON group_users USING btree (group_id, user_id); | |
-- | |
-- TOC entry 4070 (class 1259 OID 115424) | |
-- Name: index_group_users_on_user_id_and_group_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_group_users_on_user_id_and_group_id ON group_users USING btree (user_id, group_id); | |
-- | |
-- TOC entry 4073 (class 1259 OID 47567) | |
-- Name: index_groups_on_name; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_groups_on_name ON groups USING btree (name); | |
-- | |
-- TOC entry 4076 (class 1259 OID 47568) | |
-- Name: index_incoming_domains_on_name_and_https_and_port; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_incoming_domains_on_name_and_https_and_port ON incoming_domains USING btree (name, https, port); | |
-- | |
-- TOC entry 4079 (class 1259 OID 47569) | |
-- Name: index_incoming_links_on_created_at_and_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_incoming_links_on_created_at_and_user_id ON incoming_links USING btree (created_at, user_id); | |
-- | |
-- TOC entry 4080 (class 1259 OID 47570) | |
-- Name: index_incoming_links_on_post_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_incoming_links_on_post_id ON incoming_links USING btree (post_id); | |
-- | |
-- TOC entry 4083 (class 1259 OID 47571) | |
-- Name: index_incoming_referers_on_path_and_incoming_domain_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_incoming_referers_on_path_and_incoming_domain_id ON incoming_referers USING btree (path, incoming_domain_id); | |
-- | |
-- TOC entry 4086 (class 1259 OID 47572) | |
-- Name: index_invites_on_email_and_invited_by_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_invites_on_email_and_invited_by_id ON invites USING btree (email, invited_by_id); | |
-- | |
-- TOC entry 4087 (class 1259 OID 47573) | |
-- Name: index_invites_on_invite_key; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_invites_on_invite_key ON invites USING btree (invite_key); | |
-- | |
-- TOC entry 4090 (class 1259 OID 47574) | |
-- Name: index_message_bus_on_created_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_message_bus_on_created_at ON message_bus USING btree (created_at); | |
-- | |
-- TOC entry 4313 (class 1259 OID 49014) | |
-- Name: index_muted_users_on_muted_user_id_and_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_muted_users_on_muted_user_id_and_user_id ON muted_users USING btree (muted_user_id, user_id); | |
-- | |
-- TOC entry 4314 (class 1259 OID 49013) | |
-- Name: index_muted_users_on_user_id_and_muted_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_muted_users_on_user_id_and_muted_user_id ON muted_users USING btree (user_id, muted_user_id); | |
-- | |
-- TOC entry 4094 (class 1259 OID 47575) | |
-- Name: index_notifications_on_post_action_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_notifications_on_post_action_id ON notifications USING btree (post_action_id); | |
-- | |
-- TOC entry 4095 (class 1259 OID 47576) | |
-- Name: index_notifications_on_user_id_and_created_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_notifications_on_user_id_and_created_at ON notifications USING btree (user_id, created_at); | |
-- | |
-- TOC entry 4096 (class 1259 OID 75953) | |
-- Name: index_notifications_on_user_id_and_topic_id_and_post_number; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_notifications_on_user_id_and_topic_id_and_post_number ON notifications USING btree (user_id, topic_id, post_number); | |
-- | |
-- TOC entry 4099 (class 1259 OID 47577) | |
-- Name: index_oauth2_user_infos_on_uid_and_provider; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_oauth2_user_infos_on_uid_and_provider ON oauth2_user_infos USING btree (uid, provider); | |
-- | |
-- TOC entry 4102 (class 1259 OID 47578) | |
-- Name: index_optimized_images_on_upload_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_optimized_images_on_upload_id ON optimized_images USING btree (upload_id); | |
-- | |
-- TOC entry 4103 (class 1259 OID 47579) | |
-- Name: index_optimized_images_on_upload_id_and_width_and_height; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_optimized_images_on_upload_id_and_width_and_height ON optimized_images USING btree (upload_id, width, height); | |
-- | |
-- TOC entry 4106 (class 1259 OID 47580) | |
-- Name: index_permalinks_on_url; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_permalinks_on_url ON permalinks USING btree (url); | |
-- | |
-- TOC entry 4109 (class 1259 OID 47581) | |
-- Name: index_plugin_store_rows_on_plugin_name_and_key; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_plugin_store_rows_on_plugin_name_and_key ON plugin_store_rows USING btree (plugin_name, key); | |
-- | |
-- TOC entry 4116 (class 1259 OID 47582) | |
-- Name: index_post_actions_on_post_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_post_actions_on_post_id ON post_actions USING btree (post_id); | |
-- | |
-- TOC entry 4117 (class 1259 OID 67130) | |
-- Name: index_post_actions_on_user_id_and_post_action_type_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_post_actions_on_user_id_and_post_action_type_id ON post_actions USING btree (user_id, post_action_type_id) WHERE (deleted_at IS NULL); | |
-- | |
-- TOC entry 4120 (class 1259 OID 108228) | |
-- Name: index_post_custom_fields_on_name_and_value; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_post_custom_fields_on_name_and_value ON post_custom_fields USING btree (name, "left"(value, 200)); | |
-- | |
-- TOC entry 4121 (class 1259 OID 47583) | |
-- Name: index_post_custom_fields_on_post_id_and_name; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_post_custom_fields_on_post_id_and_name ON post_custom_fields USING btree (post_id, name); | |
-- | |
-- TOC entry 4124 (class 1259 OID 47584) | |
-- Name: index_post_details_on_post_id_and_key; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_post_details_on_post_id_and_key ON post_details USING btree (post_id, key); | |
-- | |
-- TOC entry 4127 (class 1259 OID 47585) | |
-- Name: index_post_replies_on_post_id_and_reply_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_post_replies_on_post_id_and_reply_id ON post_replies USING btree (post_id, reply_id); | |
-- | |
-- TOC entry 4128 (class 1259 OID 47586) | |
-- Name: index_post_revisions_on_post_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_post_revisions_on_post_id ON post_revisions USING btree (post_id); | |
-- | |
-- TOC entry 4129 (class 1259 OID 47587) | |
-- Name: index_post_revisions_on_post_id_and_number; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_post_revisions_on_post_id_and_number ON post_revisions USING btree (post_id, number); | |
-- | |
-- TOC entry 4326 (class 1259 OID 112315) | |
-- Name: index_post_stats_on_post_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_post_stats_on_post_id ON post_stats USING btree (post_id); | |
-- | |
-- TOC entry 4135 (class 1259 OID 47588) | |
-- Name: index_post_timings_on_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_post_timings_on_user_id ON post_timings USING btree (user_id); | |
-- | |
-- TOC entry 3993 (class 1259 OID 47589) | |
-- Name: index_posts_on_reply_to_post_number; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_posts_on_reply_to_post_number ON posts USING btree (reply_to_post_number); | |
-- | |
-- TOC entry 3994 (class 1259 OID 47590) | |
-- Name: index_posts_on_topic_id_and_post_number; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_posts_on_topic_id_and_post_number ON posts USING btree (topic_id, post_number); | |
-- | |
-- TOC entry 3995 (class 1259 OID 48841) | |
-- Name: index_posts_on_user_id_and_created_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_posts_on_user_id_and_created_at ON posts USING btree (user_id, created_at); | |
-- | |
-- TOC entry 4141 (class 1259 OID 47591) | |
-- Name: index_quoted_posts_on_post_id_and_quoted_post_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_quoted_posts_on_post_id_and_quoted_post_id ON quoted_posts USING btree (post_id, quoted_post_id); | |
-- | |
-- TOC entry 4142 (class 1259 OID 47592) | |
-- Name: index_quoted_posts_on_quoted_post_id_and_post_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_quoted_posts_on_quoted_post_id_and_post_id ON quoted_posts USING btree (quoted_post_id, post_id); | |
-- | |
-- TOC entry 4148 (class 1259 OID 47593) | |
-- Name: index_screened_emails_on_email; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_screened_emails_on_email ON screened_emails USING btree (email); | |
-- | |
-- TOC entry 4149 (class 1259 OID 47594) | |
-- Name: index_screened_emails_on_last_match_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_screened_emails_on_last_match_at ON screened_emails USING btree (last_match_at); | |
-- | |
-- TOC entry 4150 (class 1259 OID 47595) | |
-- Name: index_screened_ip_addresses_on_ip_address; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_screened_ip_addresses_on_ip_address ON screened_ip_addresses USING btree (ip_address); | |
-- | |
-- TOC entry 4151 (class 1259 OID 47596) | |
-- Name: index_screened_ip_addresses_on_last_match_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_screened_ip_addresses_on_last_match_at ON screened_ip_addresses USING btree (last_match_at); | |
-- | |
-- TOC entry 4154 (class 1259 OID 47597) | |
-- Name: index_screened_urls_on_last_match_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_screened_urls_on_last_match_at ON screened_urls USING btree (last_match_at); | |
-- | |
-- TOC entry 4155 (class 1259 OID 47598) | |
-- Name: index_screened_urls_on_url; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_screened_urls_on_url ON screened_urls USING btree (url); | |
-- | |
-- TOC entry 4158 (class 1259 OID 47599) | |
-- Name: index_single_sign_on_records_on_external_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_single_sign_on_records_on_external_id ON single_sign_on_records USING btree (external_id); | |
-- | |
-- TOC entry 4161 (class 1259 OID 47601) | |
-- Name: index_site_customizations_on_key; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_site_customizations_on_key ON site_customizations USING btree (key); | |
-- | |
-- TOC entry 4321 (class 1259 OID 49065) | |
-- Name: index_stylesheet_cache_on_target_and_digest; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_stylesheet_cache_on_target_and_digest ON stylesheet_cache USING btree (target, digest); | |
-- | |
-- TOC entry 4166 (class 1259 OID 47602) | |
-- Name: index_top_topics_on_daily_likes_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_daily_likes_count ON top_topics USING btree (daily_likes_count DESC); | |
-- | |
-- TOC entry 4167 (class 1259 OID 48923) | |
-- Name: index_top_topics_on_daily_op_likes_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_daily_op_likes_count ON top_topics USING btree (daily_op_likes_count); | |
-- | |
-- TOC entry 4168 (class 1259 OID 47603) | |
-- Name: index_top_topics_on_daily_posts_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_daily_posts_count ON top_topics USING btree (daily_posts_count DESC); | |
-- | |
-- TOC entry 4169 (class 1259 OID 47604) | |
-- Name: index_top_topics_on_daily_views_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_daily_views_count ON top_topics USING btree (daily_views_count DESC); | |
-- | |
-- TOC entry 4170 (class 1259 OID 47605) | |
-- Name: index_top_topics_on_monthly_likes_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_monthly_likes_count ON top_topics USING btree (monthly_likes_count DESC); | |
-- | |
-- TOC entry 4171 (class 1259 OID 48964) | |
-- Name: index_top_topics_on_monthly_op_likes_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_monthly_op_likes_count ON top_topics USING btree (monthly_op_likes_count); | |
-- | |
-- TOC entry 4172 (class 1259 OID 47606) | |
-- Name: index_top_topics_on_monthly_posts_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_monthly_posts_count ON top_topics USING btree (monthly_posts_count DESC); | |
-- | |
-- TOC entry 4173 (class 1259 OID 47607) | |
-- Name: index_top_topics_on_monthly_views_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_monthly_views_count ON top_topics USING btree (monthly_views_count DESC); | |
-- | |
-- TOC entry 4174 (class 1259 OID 108226) | |
-- Name: index_top_topics_on_quarterly_likes_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_quarterly_likes_count ON top_topics USING btree (quarterly_likes_count); | |
-- | |
-- TOC entry 4175 (class 1259 OID 108227) | |
-- Name: index_top_topics_on_quarterly_op_likes_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_quarterly_op_likes_count ON top_topics USING btree (quarterly_op_likes_count); | |
-- | |
-- TOC entry 4176 (class 1259 OID 108224) | |
-- Name: index_top_topics_on_quarterly_posts_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_quarterly_posts_count ON top_topics USING btree (quarterly_posts_count); | |
-- | |
-- TOC entry 4177 (class 1259 OID 108225) | |
-- Name: index_top_topics_on_quarterly_views_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_quarterly_views_count ON top_topics USING btree (quarterly_views_count); | |
-- | |
-- TOC entry 4178 (class 1259 OID 47608) | |
-- Name: index_top_topics_on_topic_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_top_topics_on_topic_id ON top_topics USING btree (topic_id); | |
-- | |
-- TOC entry 4179 (class 1259 OID 47609) | |
-- Name: index_top_topics_on_weekly_likes_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_weekly_likes_count ON top_topics USING btree (weekly_likes_count DESC); | |
-- | |
-- TOC entry 4180 (class 1259 OID 48943) | |
-- Name: index_top_topics_on_weekly_op_likes_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_weekly_op_likes_count ON top_topics USING btree (weekly_op_likes_count); | |
-- | |
-- TOC entry 4181 (class 1259 OID 47610) | |
-- Name: index_top_topics_on_weekly_posts_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_weekly_posts_count ON top_topics USING btree (weekly_posts_count DESC); | |
-- | |
-- TOC entry 4182 (class 1259 OID 47611) | |
-- Name: index_top_topics_on_weekly_views_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_weekly_views_count ON top_topics USING btree (weekly_views_count DESC); | |
-- | |
-- TOC entry 4183 (class 1259 OID 47612) | |
-- Name: index_top_topics_on_yearly_likes_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_yearly_likes_count ON top_topics USING btree (yearly_likes_count DESC); | |
-- | |
-- TOC entry 4184 (class 1259 OID 48986) | |
-- Name: index_top_topics_on_yearly_op_likes_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_yearly_op_likes_count ON top_topics USING btree (yearly_op_likes_count); | |
-- | |
-- TOC entry 4185 (class 1259 OID 47613) | |
-- Name: index_top_topics_on_yearly_posts_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_yearly_posts_count ON top_topics USING btree (yearly_posts_count DESC); | |
-- | |
-- TOC entry 4186 (class 1259 OID 47614) | |
-- Name: index_top_topics_on_yearly_views_count; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_top_topics_on_yearly_views_count ON top_topics USING btree (yearly_views_count DESC); | |
-- | |
-- TOC entry 4189 (class 1259 OID 47615) | |
-- Name: index_topic_allowed_groups_on_group_id_and_topic_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_allowed_groups_on_group_id_and_topic_id ON topic_allowed_groups USING btree (group_id, topic_id); | |
-- | |
-- TOC entry 4190 (class 1259 OID 47616) | |
-- Name: index_topic_allowed_groups_on_topic_id_and_group_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_allowed_groups_on_topic_id_and_group_id ON topic_allowed_groups USING btree (topic_id, group_id); | |
-- | |
-- TOC entry 4193 (class 1259 OID 47617) | |
-- Name: index_topic_allowed_users_on_topic_id_and_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_allowed_users_on_topic_id_and_user_id ON topic_allowed_users USING btree (topic_id, user_id); | |
-- | |
-- TOC entry 4194 (class 1259 OID 47618) | |
-- Name: index_topic_allowed_users_on_user_id_and_topic_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_allowed_users_on_user_id_and_topic_id ON topic_allowed_users USING btree (user_id, topic_id); | |
-- | |
-- TOC entry 4197 (class 1259 OID 47619) | |
-- Name: index_topic_custom_fields_on_topic_id_and_name; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_custom_fields_on_topic_id_and_name ON topic_custom_fields USING btree (topic_id, name); | |
-- | |
-- TOC entry 4198 (class 1259 OID 48831) | |
-- Name: index_topic_custom_fields_on_value; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_custom_fields_on_value ON topic_custom_fields USING btree (value); | |
-- | |
-- TOC entry 4201 (class 1259 OID 49052) | |
-- Name: index_topic_embeds_on_embed_url; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_embeds_on_embed_url ON topic_embeds USING btree (embed_url); | |
-- | |
-- TOC entry 4204 (class 1259 OID 47621) | |
-- Name: index_topic_invites_on_invite_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_invites_on_invite_id ON topic_invites USING btree (invite_id); | |
-- | |
-- TOC entry 4205 (class 1259 OID 47622) | |
-- Name: index_topic_invites_on_topic_id_and_invite_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_invites_on_topic_id_and_invite_id ON topic_invites USING btree (topic_id, invite_id); | |
-- | |
-- TOC entry 4213 (class 1259 OID 49053) | |
-- Name: index_topic_links_on_link_post_id_and_reflection; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_links_on_link_post_id_and_reflection ON topic_links USING btree (link_post_id, reflection); | |
-- | |
-- TOC entry 4214 (class 1259 OID 47623) | |
-- Name: index_topic_links_on_post_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_links_on_post_id ON topic_links USING btree (post_id); | |
-- | |
-- TOC entry 4215 (class 1259 OID 47624) | |
-- Name: index_topic_links_on_topic_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_links_on_topic_id ON topic_links USING btree (topic_id); | |
-- | |
-- TOC entry 4220 (class 1259 OID 47625) | |
-- Name: index_topic_users_on_topic_id_and_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_users_on_topic_id_and_user_id ON topic_users USING btree (topic_id, user_id); | |
-- | |
-- TOC entry 4221 (class 1259 OID 47626) | |
-- Name: index_topic_users_on_user_id_and_topic_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_topic_users_on_user_id_and_topic_id ON topic_users USING btree (user_id, topic_id); | |
-- | |
-- TOC entry 4224 (class 1259 OID 47627) | |
-- Name: index_topic_views_on_topic_id_and_viewed_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_views_on_topic_id_and_viewed_at ON topic_views USING btree (topic_id, viewed_at); | |
-- | |
-- TOC entry 4225 (class 1259 OID 47628) | |
-- Name: index_topic_views_on_viewed_at_and_topic_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topic_views_on_viewed_at_and_topic_id ON topic_views USING btree (viewed_at, topic_id); | |
-- | |
-- TOC entry 4002 (class 1259 OID 47629) | |
-- Name: index_topics_on_bumped_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topics_on_bumped_at ON topics USING btree (bumped_at DESC); | |
-- | |
-- TOC entry 4003 (class 1259 OID 48886) | |
-- Name: index_topics_on_created_at_and_visible; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topics_on_created_at_and_visible ON topics USING btree (created_at, visible) WHERE ((deleted_at IS NULL) AND ((archetype)::text <> 'private_message'::text)); | |
-- | |
-- TOC entry 4004 (class 1259 OID 47630) | |
-- Name: index_topics_on_id_and_deleted_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topics_on_id_and_deleted_at ON topics USING btree (id, deleted_at); | |
-- | |
-- TOC entry 4005 (class 1259 OID 127053) | |
-- Name: index_topics_on_lower_title; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topics_on_lower_title ON topics USING btree (lower((title)::text)); | |
-- | |
-- TOC entry 4006 (class 1259 OID 48885) | |
-- Name: index_topics_on_pinned_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topics_on_pinned_at ON topics USING btree (pinned_at) WHERE (pinned_at IS NOT NULL); | |
-- | |
-- TOC entry 4007 (class 1259 OID 48884) | |
-- Name: index_topics_on_pinned_globally; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_topics_on_pinned_globally ON topics USING btree (pinned_globally) WHERE pinned_globally; | |
-- | |
-- TOC entry 4337 (class 1259 OID 135567) | |
-- Name: index_translation_overrides_on_locale_and_translation_key; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_translation_overrides_on_locale_and_translation_key ON translation_overrides USING btree (locale, translation_key); | |
-- | |
-- TOC entry 4228 (class 1259 OID 47631) | |
-- Name: index_twitter_user_infos_on_twitter_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_twitter_user_infos_on_twitter_user_id ON twitter_user_infos USING btree (twitter_user_id); | |
-- | |
-- TOC entry 4229 (class 1259 OID 47632) | |
-- Name: index_twitter_user_infos_on_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_twitter_user_infos_on_user_id ON twitter_user_infos USING btree (user_id); | |
-- | |
-- TOC entry 4232 (class 1259 OID 47633) | |
-- Name: index_uploads_on_id_and_url; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_uploads_on_id_and_url ON uploads USING btree (id, url); | |
-- | |
-- TOC entry 4233 (class 1259 OID 47634) | |
-- Name: index_uploads_on_sha1; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_uploads_on_sha1 ON uploads USING btree (sha1); | |
-- | |
-- TOC entry 4234 (class 1259 OID 47635) | |
-- Name: index_uploads_on_url; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_uploads_on_url ON uploads USING btree (url); | |
-- | |
-- TOC entry 4235 (class 1259 OID 47636) | |
-- Name: index_uploads_on_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_uploads_on_user_id ON uploads USING btree (user_id); | |
-- | |
-- TOC entry 4242 (class 1259 OID 47637) | |
-- Name: index_user_actions_on_acting_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_actions_on_acting_user_id ON user_actions USING btree (acting_user_id); | |
-- | |
-- TOC entry 4243 (class 1259 OID 75954) | |
-- Name: index_user_actions_on_target_post_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_actions_on_target_post_id ON user_actions USING btree (target_post_id); | |
-- | |
-- TOC entry 4244 (class 1259 OID 47638) | |
-- Name: index_user_actions_on_user_id_and_action_type; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_actions_on_user_id_and_action_type ON user_actions USING btree (user_id, action_type); | |
-- | |
-- TOC entry 4245 (class 1259 OID 47639) | |
-- Name: index_user_avatars_on_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_avatars_on_user_id ON user_avatars USING btree (user_id); | |
-- | |
-- TOC entry 4248 (class 1259 OID 47640) | |
-- Name: index_user_badges_on_badge_id_and_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_badges_on_badge_id_and_user_id ON user_badges USING btree (badge_id, user_id); | |
-- | |
-- TOC entry 4249 (class 1259 OID 47641) | |
-- Name: index_user_badges_on_badge_id_and_user_id_and_post_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_user_badges_on_badge_id_and_user_id_and_post_id ON user_badges USING btree (badge_id, user_id, post_id) WHERE (post_id IS NOT NULL); | |
-- | |
-- TOC entry 4250 (class 1259 OID 47642) | |
-- Name: index_user_badges_on_badge_id_and_user_id_and_seq; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_user_badges_on_badge_id_and_user_id_and_seq ON user_badges USING btree (badge_id, user_id, seq) WHERE (post_id IS NULL); | |
-- | |
-- TOC entry 4253 (class 1259 OID 47643) | |
-- Name: index_user_custom_fields_on_user_id_and_name; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_custom_fields_on_user_id_and_name ON user_custom_fields USING btree (user_id, name); | |
-- | |
-- TOC entry 4256 (class 1259 OID 47644) | |
-- Name: index_user_histories_on_acting_user_id_and_action_and_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_histories_on_acting_user_id_and_action_and_id ON user_histories USING btree (acting_user_id, action, id); | |
-- | |
-- TOC entry 4257 (class 1259 OID 47645) | |
-- Name: index_user_histories_on_action_and_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_histories_on_action_and_id ON user_histories USING btree (action, id); | |
-- | |
-- TOC entry 4258 (class 1259 OID 115423) | |
-- Name: index_user_histories_on_category_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_histories_on_category_id ON user_histories USING btree (category_id); | |
-- | |
-- TOC entry 4259 (class 1259 OID 47646) | |
-- Name: index_user_histories_on_subject_and_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_histories_on_subject_and_id ON user_histories USING btree (subject, id); | |
-- | |
-- TOC entry 4260 (class 1259 OID 47647) | |
-- Name: index_user_histories_on_target_user_id_and_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_histories_on_target_user_id_and_id ON user_histories USING btree (target_user_id, id); | |
-- | |
-- TOC entry 4263 (class 1259 OID 47648) | |
-- Name: index_user_open_ids_on_url; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_open_ids_on_url ON user_open_ids USING btree (url); | |
-- | |
-- TOC entry 4331 (class 1259 OID 115411) | |
-- Name: index_user_profile_views_on_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_profile_views_on_user_id ON user_profile_views USING btree (user_id); | |
-- | |
-- TOC entry 4332 (class 1259 OID 115410) | |
-- Name: index_user_profile_views_on_user_profile_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_profile_views_on_user_profile_id ON user_profile_views USING btree (user_profile_id); | |
-- | |
-- TOC entry 4266 (class 1259 OID 47649) | |
-- Name: index_user_profiles_on_bio_cooked_version; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_profiles_on_bio_cooked_version ON user_profiles USING btree (bio_cooked_version); | |
-- | |
-- TOC entry 4274 (class 1259 OID 47650) | |
-- Name: index_user_visits_on_user_id_and_visited_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_user_visits_on_user_id_and_visited_at ON user_visits USING btree (user_id, visited_at); | |
-- | |
-- TOC entry 4275 (class 1259 OID 108103) | |
-- Name: index_user_visits_on_visited_at_and_mobile; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_user_visits_on_visited_at_and_mobile ON user_visits USING btree (visited_at, mobile); | |
-- | |
-- TOC entry 4280 (class 1259 OID 47651) | |
-- Name: index_users_on_auth_token; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_users_on_auth_token ON users USING btree (auth_token); | |
-- | |
-- TOC entry 4281 (class 1259 OID 108104) | |
-- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_users_on_email ON users USING btree (lower((email)::text)); | |
-- | |
-- TOC entry 4282 (class 1259 OID 47653) | |
-- Name: index_users_on_last_posted_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_users_on_last_posted_at ON users USING btree (last_posted_at); | |
-- | |
-- TOC entry 4283 (class 1259 OID 47654) | |
-- Name: index_users_on_last_seen_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_users_on_last_seen_at ON users USING btree (last_seen_at); | |
-- | |
-- TOC entry 4284 (class 1259 OID 47655) | |
-- Name: index_users_on_username; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_users_on_username ON users USING btree (username); | |
-- | |
-- TOC entry 4285 (class 1259 OID 47656) | |
-- Name: index_users_on_username_lower; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_users_on_username_lower ON users USING btree (username_lower); | |
-- | |
-- TOC entry 4288 (class 1259 OID 47657) | |
-- Name: index_versions_on_created_at; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_versions_on_created_at ON versions USING btree (created_at); | |
-- | |
-- TOC entry 4289 (class 1259 OID 47658) | |
-- Name: index_versions_on_number; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_versions_on_number ON versions USING btree (number); | |
-- | |
-- TOC entry 4290 (class 1259 OID 47659) | |
-- Name: index_versions_on_tag; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_versions_on_tag ON versions USING btree (tag); | |
-- | |
-- TOC entry 4291 (class 1259 OID 47660) | |
-- Name: index_versions_on_user_id_and_user_type; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_versions_on_user_id_and_user_type ON versions USING btree (user_id, user_type); | |
-- | |
-- TOC entry 4292 (class 1259 OID 47661) | |
-- Name: index_versions_on_user_name; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_versions_on_user_name ON versions USING btree (user_name); | |
-- | |
-- TOC entry 4293 (class 1259 OID 47662) | |
-- Name: index_versions_on_versioned_id_and_versioned_type; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_versions_on_versioned_id_and_versioned_type ON versions USING btree (versioned_id, versioned_type); | |
-- | |
-- TOC entry 4296 (class 1259 OID 47663) | |
-- Name: index_warnings_on_topic_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX index_warnings_on_topic_id ON warnings USING btree (topic_id); | |
-- | |
-- TOC entry 4297 (class 1259 OID 47664) | |
-- Name: index_warnings_on_user_id; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX index_warnings_on_user_id ON warnings USING btree (user_id); | |
-- | |
-- TOC entry 4226 (class 1259 OID 47665) | |
-- Name: ip_address_topic_id_topic_views; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX ip_address_topic_id_topic_views ON topic_views USING btree (ip_address, topic_id) WHERE (user_id IS NULL); | |
-- | |
-- TOC entry 4136 (class 1259 OID 47666) | |
-- Name: post_timings_summary; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE INDEX post_timings_summary ON post_timings USING btree (topic_id, post_number); | |
-- | |
-- TOC entry 4137 (class 1259 OID 47667) | |
-- Name: post_timings_unique; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX post_timings_unique ON post_timings USING btree (topic_id, post_number, user_id); | |
-- | |
-- TOC entry 3990 (class 1259 OID 47668) | |
-- Name: unique_index_categories_on_name; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX unique_index_categories_on_name ON categories USING btree ((COALESCE(parent_category_id, (-1))), name); | |
-- | |
-- TOC entry 4216 (class 1259 OID 47669) | |
-- Name: unique_post_links; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX unique_post_links ON topic_links USING btree (topic_id, post_id, url); | |
-- | |
-- TOC entry 4333 (class 1259 OID 115412) | |
-- Name: unique_profile_view_ip; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX unique_profile_view_ip ON user_profile_views USING btree (viewed_at, ip_address, user_profile_id) WHERE (user_id IS NULL); | |
-- | |
-- TOC entry 4334 (class 1259 OID 115413) | |
-- Name: unique_profile_view_user; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX unique_profile_view_user ON user_profile_views USING btree (viewed_at, user_id, user_profile_id) WHERE (user_id IS NOT NULL); | |
-- | |
-- TOC entry 4145 (class 1259 OID 47670) | |
-- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version); | |
-- | |
-- TOC entry 4227 (class 1259 OID 47671) | |
-- Name: user_id_topic_id_topic_views; Type: INDEX; Schema: public; Owner: discourse; Tablespace: | |
-- | |
CREATE UNIQUE INDEX user_id_topic_id_topic_views ON topic_views USING btree (user_id, topic_id) WHERE (user_id IS NOT NULL); | |
-- | |
-- TOC entry 4455 (class 0 OID 0) | |
-- Dependencies: 6 | |
-- Name: public; Type: ACL; Schema: -; Owner: discourse | |
-- | |
REVOKE ALL ON SCHEMA public FROM PUBLIC; | |
REVOKE ALL ON SCHEMA public FROM discourse; | |
GRANT ALL ON SCHEMA public TO discourse; | |
GRANT ALL ON SCHEMA public TO PUBLIC; | |
-- Completed on 2015-12-05 20:38:21 | |
-- | |
-- PostgreSQL database dump complete | |
-- | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment