-- Rows stamped with the widened vocabulary must be cleared before the
-- narrow CHECK can be re-added; NULL reads as "unattributed", which is
-- the honest downgrade.
UPDATE play_events SET pick_kind = NULL
    WHERE pick_kind NOT IN ('taste', 'fresh');
UPDATE playlist_tracks SET pick_kind = NULL
    WHERE pick_kind NOT IN ('taste', 'fresh');

ALTER TABLE play_events
    DROP CONSTRAINT play_events_pick_kind_check;
ALTER TABLE play_events
    ADD CONSTRAINT play_events_pick_kind_check
        CHECK (pick_kind IN ('taste', 'fresh'));

ALTER TABLE playlist_tracks
    DROP CONSTRAINT playlist_tracks_pick_kind_check;
ALTER TABLE playlist_tracks
    ADD CONSTRAINT playlist_tracks_pick_kind_check
        CHECK (pick_kind IN ('taste', 'fresh'));
