USE dating_app; -- Existing profiles remain nullable for backward compatibility. New email/phone -- registrations require one of the four values at the API validation layer. SET @column_exists = ( SELECT COUNT(*) FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = 'user_profiles' AND column_name = 'relationship_goal' ); SET @statement = IF( @column_exists = 0, 'ALTER TABLE user_profiles ADD COLUMN relationship_goal VARCHAR(30) NULL AFTER country', 'SELECT 1' ); PREPARE migration_statement FROM @statement; EXECUTE migration_statement; DEALLOCATE PREPARE migration_statement;