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.

19 lines
562 B

1 year ago
  1. CREATE TABLE IF NOT EXISTS "schema_migrations" (version varchar(128) primary key);
  2. CREATE TABLE video_states (
  3. id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  4. name TEXT
  5. );
  6. CREATE TABLE discovered_videos (
  7. id TEXT PRIMARY KEY,
  8. info JSON,
  9. status INTEGER REFERENCES video_states(id)
  10. );
  11. CREATE TABLE videos_in_playlists (
  12. video_id TEXT NOT NULL,
  13. playlist_id TEXT NOT NULL,
  14. playlist_name TEXT,
  15. PRIMARY KEY (video_id, playlist_id)
  16. );
  17. -- Dbmate schema migrations
  18. INSERT INTO "schema_migrations" (version) VALUES
  19. ('20230519145608');