Snippet content copied to clipboard.
Are you sure to delete this snippet? No, don't delete
  1. -- DDL generated by Postico 1.5.20
  2. -- Not all database features are supported. Do not use for backup.
  3. -- Table Definition ----------------------------------------------
  4. CREATE TABLE articles (
  5. id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,
  6. iid SERIAL,
  7. path text NOT NULL,
  8. domain text NOT NULL,
  9. title text,
  10. referenced_domains jsonb DEFAULT '[]'::jsonb,
  11. created_at timestamp without time zone,
  12. updated_at timestamp without time zone,
  13. published_at timestamp without time zone,
  14. sentiment_score double precision,
  15. sentiment_magnitude double precision,
  16. excerpt text,
  17. referenced_domains_array text[],
  18. metadata jsonb
  19. );
  20. -- Indices -------------------------------------------------------
  21. CREATE UNIQUE INDEX articles_pkey ON articles(id uuid_ops);
  22. CREATE INDEX articles_domain_index ON articles(domain text_ops);
  23. CREATE UNIQUE INDEX articles_domain_path_index ON articles(domain text_ops,path text_ops);
  24. CREATE UNIQUE INDEX articles_iid_index ON articles(iid int4_ops);
  25. CREATE INDEX articles_path_gin_index ON articles USING GIN (path gin_trgm_ops);
  26. CREATE INDEX articles_published_at_index ON articles(published_at timestamp_ops);
  27. CREATE INDEX articles_referenced_domains_array_index ON articles USING GIN (referenced_domains_array array_ops);
  28. CREATE INDEX articles_referenced_domains_index ON articles USING GIN (referenced_domains jsonb_ops);
  29. CREATE INDEX articles_referenced_domains_po ON articles USING GIN (referenced_domains jsonb_path_ops);
  30. CREATE INDEX articles_title_gin_index ON articles USING GIN (title gin_trgm_ops);

Edit this Snippet