- -- DDL generated by Postico 1.5.20
- -- Not all database features are supported. Do not use for backup.
-
- -- Table Definition ----------------------------------------------
-
- CREATE TABLE articles (
- id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,
- iid SERIAL,
- path text NOT NULL,
- domain text NOT NULL,
- title text,
- referenced_domains jsonb DEFAULT '[]'::jsonb,
- created_at timestamp without time zone,
- updated_at timestamp without time zone,
- published_at timestamp without time zone,
- sentiment_score double precision,
- sentiment_magnitude double precision,
- excerpt text,
- referenced_domains_array text[],
- metadata jsonb
- );
-
- -- Indices -------------------------------------------------------
-
- CREATE UNIQUE INDEX articles_pkey ON articles(id uuid_ops);
- CREATE INDEX articles_domain_index ON articles(domain text_ops);
- CREATE UNIQUE INDEX articles_domain_path_index ON articles(domain text_ops,path text_ops);
- CREATE UNIQUE INDEX articles_iid_index ON articles(iid int4_ops);
- CREATE INDEX articles_path_gin_index ON articles USING GIN (path gin_trgm_ops);
- CREATE INDEX articles_published_at_index ON articles(published_at timestamp_ops);
- CREATE INDEX articles_referenced_domains_array_index ON articles USING GIN (referenced_domains_array array_ops);
- CREATE INDEX articles_referenced_domains_index ON articles USING GIN (referenced_domains jsonb_ops);
- CREATE INDEX articles_referenced_domains_po ON articles USING GIN (referenced_domains jsonb_path_ops);
- CREATE INDEX articles_title_gin_index ON articles USING GIN (title gin_trgm_ops);