20220914205500_add_article_table.sql 433 B

1234567891011121314151617
  1. -- +goose Up
  2. CREATE TABLE article
  3. (
  4. id SERIAL PRIMARY KEY,
  5. url TEXT NOT NULL UNIQUE,
  6. title TEXT NOT NULL,
  7. image TEXT NOT NULL,
  8. text TEXT NOT NULL,
  9. preview_text TEXT,
  10. meta_keywords TEXT,
  11. meta_desc TEXT,
  12. publish_time TIMESTAMP NOT NULL DEFAULT NOW(),
  13. is_active BOOLEAN NOT NULL
  14. );
  15. -- +goose Down
  16. DROP TABLE article;