X Tutup
-- -- PostgreSQL database dump -- 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; -- -- Name: dcloud_development; Type: DATABASE; Schema: -; Owner: - -- CREATE DATABASE dcloud_development WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8'; \connect dcloud_development 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; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - -- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; -- -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; -- -- Name: dblink; Type: EXTENSION; Schema: -; Owner: - -- CREATE EXTENSION IF NOT EXISTS dblink WITH SCHEMA public; -- -- Name: EXTENSION dblink; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON EXTENSION dblink IS 'connect to other PostgreSQL databases from within a database'; -- -- Name: hstore; Type: EXTENSION; Schema: -; Owner: - -- CREATE EXTENSION IF NOT EXISTS hstore WITH SCHEMA public; -- -- Name: EXTENSION hstore; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON EXTENSION hstore IS 'data type for storing sets of (key, value) pairs'; SET search_path = public, pg_catalog; SET default_tablespace = ''; SET default_with_oids = false; -- -- Name: accounts; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE accounts ( id integer NOT NULL, first_name character varying(40), last_name character varying(40), email character varying(100), hashed_password character varying(255), created_at timestamp without time zone, updated_at timestamp without time zone, identities hstore, language character varying(3) DEFAULT 'eng'::character varying, document_language character varying(3) DEFAULT 'eng'::character varying ); -- -- Name: accounts_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE accounts_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: accounts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE accounts_id_seq OWNED BY accounts.id; -- -- Name: annotations; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE annotations ( id integer NOT NULL, organization_id integer NOT NULL, account_id integer NOT NULL, document_id integer NOT NULL, page_number integer NOT NULL, access integer NOT NULL, title text NOT NULL, content text, location character varying(40), created_at timestamp without time zone, updated_at timestamp without time zone ); -- -- Name: annotations_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE annotations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: annotations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE annotations_id_seq OWNED BY annotations.id; -- -- Name: app_constants; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE app_constants ( id integer NOT NULL, key character varying(255), value character varying(255) ); -- -- Name: app_constants_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE app_constants_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: app_constants_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE app_constants_id_seq OWNED BY app_constants.id; -- -- Name: bull_proof_china_shop_account_requests; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE bull_proof_china_shop_account_requests ( id integer NOT NULL, created_at timestamp without time zone, updated_at timestamp without time zone, requester_email character varying(255), requester_first_name character varying(255), requester_last_name character varying(255), requester_notes text, organization_name character varying(255), organization_url character varying(255), approver_email character varying(255), approver_first_name character varying(255), approver_last_name character varying(255), country character varying(255) NOT NULL, verification_notes text, status integer DEFAULT 1, agreed_to_terms boolean DEFAULT false, authorized_posting boolean DEFAULT false, token character varying(255), industry character varying(255), use_case text, reference_links text, marketing_optin boolean DEFAULT false, in_market boolean DEFAULT false, requester_position character varying ); -- -- Name: bull_proof_china_shop_account_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE bull_proof_china_shop_account_requests_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: bull_proof_china_shop_account_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE bull_proof_china_shop_account_requests_id_seq OWNED BY bull_proof_china_shop_account_requests.id; -- -- Name: bull_proof_china_shop_accounts; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE bull_proof_china_shop_accounts ( id integer NOT NULL, stripe_customer_id character varying, billing_email text, dc_membership_id integer, dc_membership_role integer, dc_organization_id integer, dc_account_id integer, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: bull_proof_china_shop_accounts_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE bull_proof_china_shop_accounts_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: bull_proof_china_shop_accounts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE bull_proof_china_shop_accounts_id_seq OWNED BY bull_proof_china_shop_accounts.id; -- -- Name: bull_proof_china_shop_permits; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE bull_proof_china_shop_permits ( id integer NOT NULL, stripe_plan_id character varying, stripe_customer_id character varying, stripe_card_id character varying, dc_membership_id integer, dc_account_id integer, dc_organization_id integer, dc_membership_role integer, status integer DEFAULT 1, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, stripe_subscription_id character varying, stripe_customer_email character varying, stripe_card_last4 integer, account_id integer, start_date timestamp without time zone, end_date_scheduled timestamp without time zone, end_date_actual timestamp without time zone ); -- -- Name: bull_proof_china_shop_permits_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE bull_proof_china_shop_permits_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: bull_proof_china_shop_permits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE bull_proof_china_shop_permits_id_seq OWNED BY bull_proof_china_shop_permits.id; -- -- Name: collaborations; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE collaborations ( id integer NOT NULL, project_id integer NOT NULL, account_id integer NOT NULL, creator_id integer ); -- -- Name: collaborations_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE collaborations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: collaborations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE collaborations_id_seq OWNED BY collaborations.id; -- -- Name: docdata; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE docdata ( id integer NOT NULL, document_id integer NOT NULL, data hstore ); -- -- Name: docdata_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE docdata_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: docdata_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE docdata_id_seq OWNED BY docdata.id; -- -- Name: document_reviewers; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE document_reviewers ( id integer NOT NULL, account_id integer NOT NULL, document_id integer NOT NULL, created_at timestamp without time zone, updated_at timestamp without time zone ); -- -- Name: document_reviewers_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE document_reviewers_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: document_reviewers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE document_reviewers_id_seq OWNED BY document_reviewers.id; -- -- Name: documents; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE documents ( id integer NOT NULL, organization_id integer NOT NULL, account_id integer NOT NULL, access integer NOT NULL, page_count integer DEFAULT 0 NOT NULL, title character varying(1000) NOT NULL, slug character varying(255) NOT NULL, source character varying(1000), language character varying(3), description text, calais_id character varying(40), publication_date date, created_at timestamp without time zone, updated_at timestamp without time zone, related_article text, detected_remote_url text, remote_url text, publish_at timestamp without time zone, text_changed boolean DEFAULT false NOT NULL, hit_count integer DEFAULT 0 NOT NULL, public_note_count integer DEFAULT 0 NOT NULL, file_size integer DEFAULT 0 NOT NULL, reviewer_count integer DEFAULT 0 NOT NULL, char_count integer DEFAULT 0 NOT NULL, original_extension character varying(255), file_hash text ); -- -- Name: documents_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE documents_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: documents_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE documents_id_seq OWNED BY documents.id; -- -- Name: entities; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE entities ( id integer NOT NULL, organization_id integer NOT NULL, account_id integer NOT NULL, document_id integer NOT NULL, access integer NOT NULL, kind character varying(40) NOT NULL, value character varying(255) NOT NULL, relevance double precision DEFAULT 0.0 NOT NULL, calais_id character varying(40), occurrences text ); -- -- Name: entity_dates; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE entity_dates ( id integer NOT NULL, organization_id integer NOT NULL, account_id integer NOT NULL, document_id integer NOT NULL, access integer NOT NULL, date date NOT NULL, occurrences text ); -- -- Name: featured_reports; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE featured_reports ( id integer NOT NULL, url character varying(255) NOT NULL, title character varying(255) NOT NULL, organization character varying(255) NOT NULL, article_date date NOT NULL, writeup text NOT NULL, present_order integer DEFAULT 0 NOT NULL, created_at timestamp without time zone, updated_at timestamp without time zone ); -- -- Name: featured_reports_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE featured_reports_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: featured_reports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE featured_reports_id_seq OWNED BY featured_reports.id; -- -- Name: projects; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE projects ( id integer NOT NULL, account_id integer, title character varying(255), description text, hidden boolean DEFAULT false NOT NULL ); -- -- Name: labels_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE labels_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: labels_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE labels_id_seq OWNED BY projects.id; -- -- Name: memberships; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE memberships ( id integer NOT NULL, organization_id integer NOT NULL, account_id integer NOT NULL, role integer NOT NULL, "default" boolean DEFAULT false, concealed boolean DEFAULT false ); -- -- Name: memberships_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE memberships_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: memberships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id; -- -- Name: metadata_dates_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE metadata_dates_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: metadata_dates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE metadata_dates_id_seq OWNED BY entity_dates.id; -- -- Name: metadata_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE metadata_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: metadata_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE metadata_id_seq OWNED BY entities.id; -- -- Name: organizations; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE organizations ( id integer NOT NULL, name character varying(100) NOT NULL, slug character varying(100) NOT NULL, created_at timestamp without time zone, updated_at timestamp without time zone, demo boolean DEFAULT false NOT NULL, language character varying(3) DEFAULT 'eng'::character varying, document_language character varying(3) DEFAULT 'eng'::character varying ); -- -- Name: organizations_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE organizations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: organizations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE organizations_id_seq OWNED BY organizations.id; -- -- Name: page_count; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE page_count ( document_id integer, count bigint ); -- -- Name: pages; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE pages ( id integer NOT NULL, organization_id integer NOT NULL, account_id integer NOT NULL, document_id integer NOT NULL, access integer NOT NULL, page_number integer NOT NULL, text text NOT NULL, start_offset integer, end_offset integer, aspect_ratio double precision ); -- -- Name: pages_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE pages_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: pages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE pages_id_seq OWNED BY pages.id; -- -- Name: processing_jobs; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE processing_jobs ( id integer NOT NULL, account_id integer NOT NULL, cloud_crowd_id integer NOT NULL, title character varying(1000) NOT NULL, document_id integer, action character varying, options character varying, complete boolean DEFAULT false ); -- -- Name: processing_jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE processing_jobs_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: processing_jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE processing_jobs_id_seq OWNED BY processing_jobs.id; -- -- Name: project_memberships; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE project_memberships ( id integer NOT NULL, project_id integer NOT NULL, document_id integer NOT NULL ); -- -- Name: project_memberships_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE project_memberships_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: project_memberships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE project_memberships_id_seq OWNED BY project_memberships.id; -- -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE schema_migrations ( version character varying(255) NOT NULL ); -- -- Name: sections; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE sections ( id integer NOT NULL, organization_id integer NOT NULL, account_id integer NOT NULL, document_id integer NOT NULL, access integer NOT NULL, title text NOT NULL, page_number integer NOT NULL ); -- -- Name: sections_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE sections_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: sections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE sections_id_seq OWNED BY sections.id; -- -- Name: security_keys; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE security_keys ( id integer NOT NULL, securable_type character varying(40) NOT NULL, securable_id integer NOT NULL, key character varying(40) ); -- -- Name: security_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE security_keys_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: security_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE security_keys_id_seq OWNED BY security_keys.id; -- -- Name: upload_mailboxes; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE upload_mailboxes ( id integer NOT NULL, membership_id integer NOT NULL, sender character varying(255) NOT NULL, recipient character varying(255) NOT NULL, upload_count integer DEFAULT 0, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: upload_mailboxes_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE upload_mailboxes_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: upload_mailboxes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE upload_mailboxes_id_seq OWNED BY upload_mailboxes.id; -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY accounts ALTER COLUMN id SET DEFAULT nextval('accounts_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY annotations ALTER COLUMN id SET DEFAULT nextval('annotations_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY app_constants ALTER COLUMN id SET DEFAULT nextval('app_constants_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY bull_proof_china_shop_account_requests ALTER COLUMN id SET DEFAULT nextval('bull_proof_china_shop_account_requests_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY bull_proof_china_shop_accounts ALTER COLUMN id SET DEFAULT nextval('bull_proof_china_shop_accounts_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY bull_proof_china_shop_permits ALTER COLUMN id SET DEFAULT nextval('bull_proof_china_shop_permits_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY collaborations ALTER COLUMN id SET DEFAULT nextval('collaborations_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY docdata ALTER COLUMN id SET DEFAULT nextval('docdata_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY document_reviewers ALTER COLUMN id SET DEFAULT nextval('document_reviewers_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY documents ALTER COLUMN id SET DEFAULT nextval('documents_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY entities ALTER COLUMN id SET DEFAULT nextval('metadata_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY entity_dates ALTER COLUMN id SET DEFAULT nextval('metadata_dates_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY featured_reports ALTER COLUMN id SET DEFAULT nextval('featured_reports_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY memberships ALTER COLUMN id SET DEFAULT nextval('memberships_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY organizations ALTER COLUMN id SET DEFAULT nextval('organizations_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY pages ALTER COLUMN id SET DEFAULT nextval('pages_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY processing_jobs ALTER COLUMN id SET DEFAULT nextval('processing_jobs_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY project_memberships ALTER COLUMN id SET DEFAULT nextval('project_memberships_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY projects ALTER COLUMN id SET DEFAULT nextval('labels_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY sections ALTER COLUMN id SET DEFAULT nextval('sections_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY security_keys ALTER COLUMN id SET DEFAULT nextval('security_keys_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY upload_mailboxes ALTER COLUMN id SET DEFAULT nextval('upload_mailboxes_id_seq'::regclass); -- -- Name: accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY accounts ADD CONSTRAINT accounts_pkey PRIMARY KEY (id); -- -- Name: annotations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY annotations ADD CONSTRAINT annotations_pkey PRIMARY KEY (id); -- -- Name: app_constants_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY app_constants ADD CONSTRAINT app_constants_pkey PRIMARY KEY (id); -- -- Name: bull_proof_china_shop_account_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY bull_proof_china_shop_account_requests ADD CONSTRAINT bull_proof_china_shop_account_requests_pkey PRIMARY KEY (id); -- -- Name: bull_proof_china_shop_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY bull_proof_china_shop_accounts ADD CONSTRAINT bull_proof_china_shop_accounts_pkey PRIMARY KEY (id); -- -- Name: bull_proof_china_shop_permits_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY bull_proof_china_shop_permits ADD CONSTRAINT bull_proof_china_shop_permits_pkey PRIMARY KEY (id); -- -- Name: collaborations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY collaborations ADD CONSTRAINT collaborations_pkey PRIMARY KEY (id); -- -- Name: docdata_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY docdata ADD CONSTRAINT docdata_pkey PRIMARY KEY (id); -- -- Name: document_reviewers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY document_reviewers ADD CONSTRAINT document_reviewers_pkey PRIMARY KEY (id); -- -- Name: documents_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY documents ADD CONSTRAINT documents_pkey PRIMARY KEY (id); -- -- Name: featured_reports_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY featured_reports ADD CONSTRAINT featured_reports_pkey PRIMARY KEY (id); -- -- Name: labels_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY projects ADD CONSTRAINT labels_pkey PRIMARY KEY (id); -- -- Name: memberships_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY memberships ADD CONSTRAINT memberships_pkey PRIMARY KEY (id); -- -- Name: metadata_dates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY entity_dates ADD CONSTRAINT metadata_dates_pkey PRIMARY KEY (id); -- -- Name: metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY entities ADD CONSTRAINT metadata_pkey PRIMARY KEY (id); -- -- Name: organizations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY organizations ADD CONSTRAINT organizations_pkey PRIMARY KEY (id); -- -- Name: pages_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY pages ADD CONSTRAINT pages_pkey PRIMARY KEY (id); -- -- Name: processing_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY processing_jobs ADD CONSTRAINT processing_jobs_pkey PRIMARY KEY (id); -- -- Name: project_memberships_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY project_memberships ADD CONSTRAINT project_memberships_pkey PRIMARY KEY (id); -- -- Name: sections_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY sections ADD CONSTRAINT sections_pkey PRIMARY KEY (id); -- -- Name: security_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY security_keys ADD CONSTRAINT security_keys_pkey PRIMARY KEY (id); -- -- Name: upload_mailboxes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY upload_mailboxes ADD CONSTRAINT upload_mailboxes_pkey PRIMARY KEY (id); -- -- Name: index_accounts_on_email; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE UNIQUE INDEX index_accounts_on_email ON accounts USING btree (email); -- -- Name: index_accounts_on_identites; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_accounts_on_identites ON accounts USING gin (identities); -- -- Name: index_annotations_on_document_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_annotations_on_document_id ON annotations USING btree (document_id); -- -- Name: index_docdata_on_data; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_docdata_on_data ON docdata USING gin (data); -- -- Name: index_docdata_on_document_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_docdata_on_document_id ON docdata USING btree (document_id); -- -- Name: index_documents_on_access; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_documents_on_access ON documents USING btree (access); -- -- Name: index_documents_on_access_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_documents_on_access_id ON documents USING btree (access, id); -- -- Name: index_documents_on_access_orgnaization_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_documents_on_access_orgnaization_id ON documents USING btree (access, organization_id); -- -- Name: index_documents_on_account_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_documents_on_account_id ON documents USING btree (account_id); -- -- Name: index_documents_on_file_hash; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_documents_on_file_hash ON documents USING btree (file_hash); -- -- Name: index_documents_on_hit_count; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_documents_on_hit_count ON documents USING btree (hit_count); -- -- Name: index_documents_on_public_note_count; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_documents_on_public_note_count ON documents USING btree (public_note_count); -- -- Name: index_entities_on_value; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_entities_on_value ON entities USING btree (lower((value)::text)); -- -- Name: index_labels_on_account_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_labels_on_account_id ON projects USING btree (account_id); -- -- Name: index_memberships_on_account_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_memberships_on_account_id ON memberships USING btree (account_id); -- -- Name: index_memberships_on_organization_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_memberships_on_organization_id ON memberships USING btree (organization_id); -- -- Name: index_metadata_dates_on_document_id_and_date; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE UNIQUE INDEX index_metadata_dates_on_document_id_and_date ON entity_dates USING btree (document_id, date); -- -- Name: index_metadata_on_document_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_metadata_on_document_id ON entities USING btree (document_id); -- -- Name: index_metadata_on_kind; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_metadata_on_kind ON entities USING btree (kind); -- -- Name: index_organizations_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE UNIQUE INDEX index_organizations_on_name ON organizations USING btree (name); -- -- Name: index_organizations_on_slug; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE UNIQUE INDEX index_organizations_on_slug ON organizations USING btree (slug); -- -- Name: index_pages_on_document_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_pages_on_document_id ON pages USING btree (document_id); -- -- Name: index_pages_on_page_number; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_pages_on_page_number ON pages USING btree (page_number); -- -- Name: index_pages_on_start_offset_and_end_offset; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_pages_on_start_offset_and_end_offset ON pages USING btree (start_offset, end_offset); -- -- Name: index_processing_jobs_on_account_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_processing_jobs_on_account_id ON processing_jobs USING btree (account_id); -- -- Name: index_processing_jobs_on_action; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_processing_jobs_on_action ON processing_jobs USING btree (action); -- -- Name: index_processing_jobs_on_cloud_crowd_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_processing_jobs_on_cloud_crowd_id ON processing_jobs USING btree (cloud_crowd_id); -- -- Name: index_processing_jobs_on_document_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_processing_jobs_on_document_id ON processing_jobs USING btree (document_id); -- -- Name: index_project_memberships_on_document_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_project_memberships_on_document_id ON project_memberships USING btree (document_id); -- -- Name: index_project_memberships_on_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_project_memberships_on_project_id ON project_memberships USING btree (project_id); -- -- Name: index_sections_on_document_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_sections_on_document_id ON sections USING btree (document_id); -- -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version); -- -- Name: public; Type: ACL; Schema: -; Owner: - -- REVOKE ALL ON SCHEMA public FROM PUBLIC; REVOKE ALL ON SCHEMA public FROM postgres; GRANT ALL ON SCHEMA public TO postgres; GRANT ALL ON SCHEMA public TO PUBLIC; -- -- PostgreSQL database dump complete -- -- -- PostgreSQL database dump -- 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; SET search_path = public, pg_catalog; -- -- Data for Name: schema_migrations; Type: TABLE DATA; Schema: public; Owner: - -- COPY schema_migrations (version) FROM stdin; 1 20100108163304 20100108172251 20100109025746 20100109035508 20100109041445 20100112143144 20100114170350 20100120194128 20100120205426 20100125165305 20100208131000 20100208151651 20100212130932 20100218193708 20100219175757 20100301200857 20100304154343 20100316001441 20100317145034 20100317181051 20100401192921 20100413132825 20100607182008 20100624142442 20100625143140 20100630131224 20100701132413 20100823172339 20100928204710 20101025202334 20101028194006 20101101192020 20101103173409 20101207203607 20101209175540 20110111192934 20110113204915 20110114143536 20110217161649 20110217171353 20101110170100 20101214171909 20110207212034 20110216180521 20110224153154 20110303200824 20110303202721 20110304213500 20110308170707 20110310000919 20110502200512 20110505172648 20110429150927 20110512193718 20110603223356 20111026200513 20120131180323 20120927202457 20121108160450 20130107193641 20130108201748 20130109194211 20130327170939 20150603190250 20150612202649 20150617201312 20150629180149 20150629210433 20150713194717 20150812163030 20151111214857 20160120214245 20150817174942 20150820160300 20150820174640 20150820224857 20150820224935 20150826194337 20150826213441 20150826214706 20150826220106 20150827185809 20160129000705 20160929174005 \. -- -- PostgreSQL database dump complete --
X Tutup