init.sql 790 B

12345678910111213141516171819202122232425
  1. -- 非遗新闻采集 - 数据库初始化脚本
  2. -- 库: yangyi / 模式: new_collection
  3. -- 注意: 重跑会清空 news 表数据。
  4. CREATE SCHEMA IF NOT EXISTS new_collection;
  5. DROP TABLE IF EXISTS new_collection.news;
  6. CREATE TABLE new_collection.news (
  7. id varchar(64) PRIMARY KEY,
  8. title text,
  9. url text,
  10. publish_time timestamp,
  11. channel_id varchar(64),
  12. channel_name varchar(128),
  13. editor varchar(255),
  14. text_reporters text,
  15. image_reporters text,
  16. correspondents text,
  17. content text,
  18. content_fetched_at timestamp,
  19. created_at timestamp default now()
  20. );
  21. COMMENT ON TABLE new_collection.news IS '非遗新闻采集结果';