-- The cover/artist art `*_source` column stores the recording
-- provider's registry ID. coverart.Register makes the provider set
-- extensible, so a fixed IN-list CHECK (0016 → 0018 → 0020) required a
-- schema migration for every new provider and rejected any
-- out-of-list value (e.g. test stub providers). Same brittleness
-- class as the discovery-mix CHECK incident (#433): a fixed-value
-- CHECK fighting an extensible value set. Relax to "NULL or any
-- non-empty string" — the registry, not the schema, is the source of
-- truth for valid provider IDs.

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 <> '');

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 <> '');
