-- Postgres cannot drop an enum value, so removed_file stays in -- quarantine_action_kind; its history rows read as deleted_file again. UPDATE quarantine_actions SET action = 'deleted_file' WHERE action = 'removed_file'; ALTER TABLE tracks DROP CONSTRAINT IF EXISTS tracks_removed_only_missing, DROP CONSTRAINT IF EXISTS tracks_removed_reason_check, DROP COLUMN IF EXISTS removed_by, DROP COLUMN IF EXISTS removed_reason;