-- What each import of a Spotify export did, kept so the numbers can be read again later: the report as JSON (see -- internal/spotifyimport). The files themselves are never kept. CREATE TABLE spotify_imports ( id INTEGER PRIMARY KEY, user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE, created_at INTEGER NOT NULL, -- unix seconds report TEXT NOT NULL ); CREATE INDEX idx_spotify_imports_user ON spotify_imports(user_id, created_at DESC);