-- migrations/001_migrate_ids_to_uuid_down.sql
-- Migration DOWN script for reverting standardization of IDs to uuid.UUID

-- Drop all new UUID primary key columns

-- HLSTranscodeQueue
ALTER TABLE hls_transcode_queue DROP COLUMN IF EXISTS new_id;

-- BitrateAdaptationLog
ALTER TABLE bitrate_adaptation_logs DROP COLUMN IF EXISTS new_id;

-- Contest
ALTER TABLE contests DROP COLUMN IF EXISTS new_id;

-- ContestEntry
ALTER TABLE contest_entries DROP COLUMN IF EXISTS new_id;

-- ContestJudge
ALTER TABLE contest_judges DROP COLUMN IF EXISTS new_id;

-- ContestVote
ALTER TABLE contest_votes DROP COLUMN IF EXISTS new_id;

-- ContestSponsor
ALTER TABLE contest_sponsors DROP COLUMN IF EXISTS new_id;

-- ContestStems
ALTER TABLE contest_stems DROP COLUMN IF EXISTS new_id;

-- ContestAnalytics
ALTER TABLE contest_analytics DROP COLUMN IF EXISTS new_id;

-- ContestBadge
ALTER TABLE contest_badges DROP COLUMN IF EXISTS new_id;

-- FederatedIdentity
ALTER TABLE federated_identities DROP COLUMN IF EXISTS new_id;

-- Equipment
ALTER TABLE equipment DROP COLUMN IF EXISTS new_id;

-- HardwareSale
ALTER TABLE hardware_sales DROP COLUMN IF EXISTS new_id;

-- EquipmentTrade
ALTER TABLE equipment_trades DROP COLUMN IF EXISTS new_id;

-- HardwareOffer
ALTER TABLE hardware_offers DROP COLUMN IF EXISTS new_id;

-- MFAConfig
ALTER TABLE mfa_configs DROP COLUMN IF EXISTS new_id;

-- PlaybackAnalytics
ALTER TABLE playback_analytics DROP COLUMN IF EXISTS new_id;

-- RecoveryCode
ALTER TABLE recovery_codes DROP COLUMN IF EXISTS new_id;

-- RefreshToken
ALTER TABLE refresh_tokens DROP COLUMN IF EXISTS new_id;

-- Role
ALTER TABLE roles DROP COLUMN IF EXISTS new_id;

-- Permission
ALTER TABLE permissions DROP COLUMN IF EXISTS new_id;

-- UserRole
ALTER TABLE user_roles DROP COLUMN IF EXISTS new_id;

-- RoyaltyRecord
ALTER TABLE royalty_records DROP COLUMN IF EXISTS new_id;

-- RoyaltyPayout
ALTER TABLE royalty_payouts DROP COLUMN IF EXISTS new_id;

-- RoyaltyRate
ALTER TABLE royalty_rates DROP COLUMN IF EXISTS new_id;

-- CreatorRoyaltyRate
ALTER TABLE creator_royalty_rates DROP COLUMN IF EXISTS new_id;

-- RoyaltyConfig
ALTER TABLE royalty_config DROP COLUMN IF EXISTS new_id;

-- SellableContent
ALTER TABLE sellable_contents DROP COLUMN IF EXISTS new_id;

-- JuryMember
ALTER TABLE jury_members DROP COLUMN IF EXISTS new_id;

-- TrackHistory
ALTER TABLE track_history DROP COLUMN IF EXISTS new_id;

-- TrackVersion
ALTER TABLE track_versions DROP COLUMN IF EXISTS new_id;

-- UserSettings
ALTER TABLE user_settings DROP COLUMN IF EXISTS new_id;

-- UserProfile
ALTER TABLE user_profiles DROP COLUMN IF EXISTS new_id;

-- RolePermission does not have a single new_id column to drop in this phase
