CREATE TABLE IF NOT EXISTS "schema_migrations" (version varchar(128) primary key);
CREATE TABLE video_states (
    id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
    name TEXT
);
CREATE TABLE discovered_videos (
    id TEXT PRIMARY KEY,
    info JSON,
    status INTEGER REFERENCES video_states(id)
);
CREATE TABLE videos_in_playlists (
    video_id TEXT NOT NULL,
    playlist_id TEXT NOT NULL,
    playlist_name TEXT,
    PRIMARY KEY (video_id, playlist_id)
);
-- Dbmate schema migrations
INSERT INTO "schema_migrations" (version) VALUES
  ('20230519145608');
