execute'DELETE FROM identities WHERE id NOT IN ( SELECT MIN(id) FROM tt_migration_DeduplicateUserIdentities GROUP BY user_id, provider);'execute'DROP TABLE IF EXISTS tt_migration_DeduplicateUserIdentities;'enddefdown# This is an irreversible migration;# If someone is trying to rollback for other reasons, we should not throw an Exception.# raise ActiveRecord::IrreversibleMigrationendend