-- PostgreSQL flavour of sqlite/0030_spotify_imports.sql. CREATE TABLE spotify_imports ( id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, user_id BIGINT NOT NULL REFERENCES users(id) ON DELETE CASCADE, created_at BIGINT NOT NULL, report TEXT NOT NULL ); CREATE INDEX idx_spotify_imports_user ON spotify_imports(user_id, created_at DESC);