-- Restore the prior tighter CHECK constraints (pre-Deezer/Last.fm). -- This will fail if any rows currently have artist_art_source = -- 'deezer' or 'lastfm' (likewise album); operator must clear those -- rows manually before rolling back. ALTER TABLE artists DROP CONSTRAINT IF EXISTS artists_artist_art_source_check; ALTER TABLE artists ADD CONSTRAINT artists_artist_art_source_check CHECK (artist_art_source IS NULL OR artist_art_source IN ('theaudiodb','none')); ALTER TABLE albums DROP CONSTRAINT IF EXISTS albums_cover_art_source_check; ALTER TABLE albums ADD CONSTRAINT albums_cover_art_source_check CHECK (cover_art_source IS NULL OR cover_art_source IN ('embedded','sidecar','mbcaa','theaudiodb','none')); ALTER TABLE cover_art_sources_meta DROP COLUMN IF EXISTS last_registered_providers_hash;