github.com/bcampbell/scrapeomat@v0.0.0-20220820232205-23e64141c89e/store/sqlstore/pg/003create_article_keyword.sql (about)

     1  -- add keyword storage
     2  BEGIN;
     3  
     4  CREATE TABLE article_keyword (
     5      id SERIAL PRIMARY KEY,
     6      article_id INT NOT NULL REFERENCES article (id) ON DELETE CASCADE,
     7      name TEXT NOT NULL,
     8      url TEXT NOT NULL DEFAULT ''
     9  );
    10  CREATE INDEX ON article_keyword(id);
    11  CREATE INDEX ON article_keyword(article_id);
    12  CREATE INDEX ON article_keyword(name);
    13  
    14  COMMIT;
    15