Save youtube before it dies
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
602 B

1 year ago
  1. -- migrate:up
  2. create table discovered_videos (
  3. id TEXT PRIMARY KEY,
  4. info JSON,
  5. status TEXT CHECK( status IN ('DISCOVERED', 'HIDDEN', 'REQUESTED', 'DOWNLOADING', "DOWNLOADED") ) NOT NULL,
  6. requested_by TEXT DEFAULT ''
  7. );
  8. create table videos_in_playlists (
  9. video_id TEXT NOT NULL,
  10. playlist_id TEXT NOT NULL,
  11. playlist_name TEXT,
  12. PRIMARY KEY (video_id, playlist_id)
  13. );
  14. CREATE TABLE typesense_keys (
  15. id INTEGER PRIMARY KEY AUTOINCREMENT,
  16. key TEXT NOT NULL
  17. );
  18. -- migrate:down
  19. drop table discovered_videos;
  20. drop table videos_in_playlists;
  21. drop table typesense_keys;