DROP INDEX IF EXISTS idx_contact_discovery_scans_active;

ALTER TABLE contact_discovered_profiles DROP COLUMN IF EXISTS detected_in_accounts;

ALTER TABLE contact_discovery_scans
    DROP COLUMN IF EXISTS updated_at,
    DROP COLUMN IF EXISTS nc_user_id,
    DROP COLUMN IF EXISTS book_id,
    DROP COLUMN IF EXISTS phase,
    DROP COLUMN IF EXISTS total_messages;
