CREATE TABLE `ai_employee_chats` (
	`id` int AUTO_INCREMENT NOT NULL,
	`employeeId` int NOT NULL,
	`userMessage` text NOT NULL,
	`assistantMessage` text NOT NULL,
	`createdAt` timestamp DEFAULT 'CURRENT_TIMESTAMP'
);
--> statement-breakpoint
CREATE TABLE `ai_employee_tasks` (
	`id` int AUTO_INCREMENT NOT NULL,
	`title` varchar(255) NOT NULL,
	`description` text NOT NULL,
	`assignedTo` int NOT NULL,
	`priority` enum('low','medium','high','urgent') DEFAULT 'medium',
	`status` enum('pending','in_progress','completed','cancelled') DEFAULT 'pending',
	`dueDate` varchar(50),
	`createdAt` timestamp DEFAULT 'CURRENT_TIMESTAMP',
	`updatedAt` timestamp DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP
);
--> statement-breakpoint
CREATE TABLE `ai_employees` (
	`id` int AUTO_INCREMENT NOT NULL,
	`name` varchar(100) NOT NULL,
	`role` varchar(100) NOT NULL,
	`department` varchar(100) NOT NULL,
	`systemPrompt` text,
	`avatarUrl` text,
	`isActive` tinyint DEFAULT 1,
	`tasksCompleted` int DEFAULT 0,
	`totalChats` int DEFAULT 0,
	`createdAt` timestamp DEFAULT 'CURRENT_TIMESTAMP',
	`updatedAt` timestamp DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP
);
--> statement-breakpoint
CREATE TABLE `payment_methods` (
	`id` int AUTO_INCREMENT NOT NULL,
	`name` varchar(100) NOT NULL,
	`provider` varchar(100) NOT NULL,
	`type` enum('purchase','redemption') NOT NULL,
	`feePercent` decimal(5,2) DEFAULT '0',
	`flatFee` decimal(10,2) DEFAULT '0',
	`minAmount` decimal(10,2) DEFAULT '0',
	`maxAmount` decimal(10,2) DEFAULT '10000',
	`isEnabled` tinyint DEFAULT 1,
	`iconUrl` text,
	`description` text,
	`sortOrder` int DEFAULT 0,
	`createdAt` timestamp DEFAULT 'CURRENT_TIMESTAMP',
	`updatedAt` timestamp DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP
);
--> statement-breakpoint
ALTER TABLE `ai_generated_games` DROP INDEX `ai_generated_games_gameSlug_unique`;--> statement-breakpoint
ALTER TABLE `casino_games` DROP INDEX `casino_games_slug_unique`;--> statement-breakpoint
ALTER TABLE `friends` DROP INDEX `idx_friends_unique`;--> statement-breakpoint
ALTER TABLE `notification_preferences` DROP INDEX `notification_preferences_userId_unique`;--> statement-breakpoint
ALTER TABLE `platform_settings` DROP INDEX `platform_settings_setting_key_unique`;--> statement-breakpoint
ALTER TABLE `player_profiles` DROP INDEX `player_profiles_userId_unique`;--> statement-breakpoint
ALTER TABLE `referrals` DROP INDEX `referrals_referralCode_unique`;--> statement-breakpoint
ALTER TABLE `restricted_states` DROP INDEX `restricted_states_stateCode_unique`;--> statement-breakpoint
ALTER TABLE `staff` DROP INDEX `staff_userId_unique`;--> statement-breakpoint
ALTER TABLE `staff` DROP INDEX `staff_staffId_unique`;--> statement-breakpoint
ALTER TABLE `user_achievements` DROP INDEX `idx_user_achievements_unique`;--> statement-breakpoint
ALTER TABLE `user_favorites` DROP INDEX `idx_user_favorites_unique`;--> statement-breakpoint
ALTER TABLE `user_vip_status` DROP INDEX `user_vip_status_userId_unique`;--> statement-breakpoint
ALTER TABLE `users` DROP INDEX `users_openId_unique`;--> statement-breakpoint
ALTER TABLE `users` DROP INDEX `users_username_unique`;--> statement-breakpoint
ALTER TABLE `users` DROP INDEX `users_stripeCustomerId_unique`;--> statement-breakpoint
ALTER TABLE `achievements` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `ai_generated_games` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `ai_social_content` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `audit_logs` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `bingo_cards` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `bingo_rooms` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `bingo_sessions` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `casino_games` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `chat_messages` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `coin_packages` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `daily_bonuses` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `event_participation` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `fraud_alerts` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `friends` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `game_analytics` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `game_chat` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `game_sessions` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `jackpot_history` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `kyc_documents` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `leaderboards` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `mini_game_rounds` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `multiplier_boosts` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `notification_preferences` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `notifications` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `platform_settings` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `player_profiles` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `poker_hands` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `poker_tables` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `poker_tournaments` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `progressive_jackpots` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `promo_banners` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `recently_played` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `referrals` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `restricted_states` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `rtp_overrides` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `sc_redemptions` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `seasonal_events` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `social_stream` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `sport_bets` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `sport_events` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `staff` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `stream_interactions` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `support_tickets` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `ticket_messages` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `time_clock` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `tournament_participants` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `tournament_snapshots` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `tournaments` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `transactions` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `user_achievements` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `user_favorites` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `user_vip_status` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `users` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `vip_tiers` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `wallets` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `win_share_events` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `achievements` MODIFY COLUMN `isActive` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `achievements` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `ai_generated_games` MODIFY COLUMN `rtp` decimal(5,2) NOT NULL DEFAULT '96';--> statement-breakpoint
ALTER TABLE `ai_generated_games` MODIFY COLUMN `isActive` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `ai_generated_games` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `ai_social_content` MODIFY COLUMN `isPublished` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `ai_social_content` MODIFY COLUMN `isPublished` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `ai_social_content` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `audit_logs` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `bingo_cards` MODIFY COLUMN `hasBingo` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `bingo_cards` MODIFY COLUMN `hasBingo` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `bingo_cards` MODIFY COLUMN `purchasedAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `bingo_rooms` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `bingo_sessions` MODIFY COLUMN `jackpotWon` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `bingo_sessions` MODIFY COLUMN `jackpotWon` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `bingo_sessions` MODIFY COLUMN `startedAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `casino_games` MODIFY COLUMN `isActive` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `casino_games` MODIFY COLUMN `isFeatured` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `casino_games` MODIFY COLUMN `isFeatured` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `casino_games` MODIFY COLUMN `isNew` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `casino_games` MODIFY COLUMN `isNew` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `casino_games` MODIFY COLUMN `playCount` bigint NOT NULL;--> statement-breakpoint
ALTER TABLE `casino_games` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `chat_messages` MODIFY COLUMN `isDeleted` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `chat_messages` MODIFY COLUMN `isDeleted` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `chat_messages` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `coin_packages` MODIFY COLUMN `isPopular` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `coin_packages` MODIFY COLUMN `isPopular` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `coin_packages` MODIFY COLUMN `isBestValue` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `coin_packages` MODIFY COLUMN `isBestValue` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `coin_packages` MODIFY COLUMN `isActive` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `coin_packages` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `daily_bonuses` MODIFY COLUMN `claimedAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `event_participation` MODIFY COLUMN `rewardClaimed` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `event_participation` MODIFY COLUMN `rewardClaimed` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `event_participation` MODIFY COLUMN `joinedAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `fraud_alerts` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `friends` MODIFY COLUMN `requestedAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `game_analytics` MODIFY COLUMN `totalWagered` decimal(15,2) NOT NULL DEFAULT '0';--> statement-breakpoint
ALTER TABLE `game_analytics` MODIFY COLUMN `totalWon` decimal(15,2) NOT NULL DEFAULT '0';--> statement-breakpoint
ALTER TABLE `game_analytics` MODIFY COLUMN `totalRevenue` decimal(15,2) NOT NULL DEFAULT '0';--> statement-breakpoint
ALTER TABLE `game_analytics` MODIFY COLUMN `avgBetSize` decimal(10,2) NOT NULL DEFAULT '0';--> statement-breakpoint
ALTER TABLE `game_analytics` MODIFY COLUMN `rtp` decimal(5,2) NOT NULL DEFAULT '96';--> statement-breakpoint
ALTER TABLE `game_analytics` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `game_chat` MODIFY COLUMN `isPublic` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `game_chat` MODIFY COLUMN `isPinned` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `game_chat` MODIFY COLUMN `isPinned` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `game_chat` MODIFY COLUMN `isModerated` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `game_chat` MODIFY COLUMN `isModerated` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `game_chat` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `game_sessions` MODIFY COLUMN `multiplier` float NOT NULL;--> statement-breakpoint
ALTER TABLE `game_sessions` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `jackpot_history` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `kyc_documents` MODIFY COLUMN `submittedAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `leaderboards` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `mini_game_rounds` MODIFY COLUMN `multiplier` float NOT NULL;--> statement-breakpoint
ALTER TABLE `mini_game_rounds` MODIFY COLUMN `isVerified` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `mini_game_rounds` MODIFY COLUMN `isVerified` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `mini_game_rounds` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `multiplier_boosts` MODIFY COLUMN `isActive` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `multiplier_boosts` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `notification_preferences` MODIFY COLUMN `emailNotifications` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `notification_preferences` MODIFY COLUMN `pushNotifications` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `notification_preferences` MODIFY COLUMN `inAppNotifications` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `notification_preferences` MODIFY COLUMN `paymentNotifications` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `notification_preferences` MODIFY COLUMN `gameNotifications` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `notification_preferences` MODIFY COLUMN `promotionalNotifications` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `notification_preferences` MODIFY COLUMN `promotionalNotifications` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `notification_preferences` MODIFY COLUMN `systemAlerts` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `notification_preferences` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `notifications` MODIFY COLUMN `isRead` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `notifications` MODIFY COLUMN `isRead` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `notifications` MODIFY COLUMN `emailSent` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `notifications` MODIFY COLUMN `emailSent` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `notifications` MODIFY COLUMN `pushSent` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `notifications` MODIFY COLUMN `pushSent` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `notifications` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `player_profiles` MODIFY COLUMN `totalWins` decimal(15,2) NOT NULL DEFAULT '0';--> statement-breakpoint
ALTER TABLE `player_profiles` MODIFY COLUMN `isPublic` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `player_profiles` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `poker_hands` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `poker_tables` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `poker_tournaments` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `progressive_jackpots` MODIFY COLUMN `is_active` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `progressive_jackpots` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `promo_banners` MODIFY COLUMN `isActive` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `promo_banners` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `recently_played` MODIFY COLUMN `playedAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `referrals` MODIFY COLUMN `referrerRewardGiven` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `referrals` MODIFY COLUMN `referrerRewardGiven` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `referrals` MODIFY COLUMN `refereeRewardGiven` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `referrals` MODIFY COLUMN `refereeRewardGiven` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `referrals` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `restricted_states` MODIFY COLUMN `isActive` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `restricted_states` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `rtp_overrides` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `sc_redemptions` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `seasonal_events` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `social_stream` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `sport_bets` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `sport_events` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `staff` MODIFY COLUMN `isActive` tinyint NOT NULL DEFAULT 1;--> statement-breakpoint
ALTER TABLE `staff` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `stream_interactions` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `support_tickets` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `ticket_messages` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `time_clock` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `tournament_participants` MODIFY COLUMN `joinedAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `tournament_snapshots` MODIFY COLUMN `snapshotTime` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `tournaments` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `transactions` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `user_achievements` MODIFY COLUMN `unlockedAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `user_achievements` MODIFY COLUMN `rewardClaimed` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `user_achievements` MODIFY COLUMN `rewardClaimed` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `user_favorites` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `user_vip_status` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `users` MODIFY COLUMN `isBanned` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `users` MODIFY COLUMN `isBanned` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `users` MODIFY COLUMN `isAgeVerified` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `users` MODIFY COLUMN `isAgeVerified` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `users` MODIFY COLUMN `twoFactorEnabled` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `users` MODIFY COLUMN `twoFactorEnabled` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `users` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `users` MODIFY COLUMN `lastSignedIn` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `vip_tiers` MODIFY COLUMN `prioritySupport` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `vip_tiers` MODIFY COLUMN `prioritySupport` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `vip_tiers` MODIFY COLUMN `customAvatarFrame` tinyint NOT NULL;--> statement-breakpoint
ALTER TABLE `vip_tiers` MODIFY COLUMN `customAvatarFrame` tinyint NOT NULL DEFAULT 0;--> statement-breakpoint
ALTER TABLE `vip_tiers` MODIFY COLUMN `createdAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
ALTER TABLE `win_share_events` MODIFY COLUMN `sharedAt` timestamp NOT NULL DEFAULT 'CURRENT_TIMESTAMP';--> statement-breakpoint
CREATE INDEX `ai_generated_games_gameSlug_unique` ON `ai_generated_games` (`gameSlug`);--> statement-breakpoint
CREATE INDEX `casino_games_slug_unique` ON `casino_games` (`slug`);--> statement-breakpoint
CREATE INDEX `idx_friends_unique` ON `friends` (`userId`,`friendId`);--> statement-breakpoint
CREATE INDEX `notification_preferences_userId_unique` ON `notification_preferences` (`userId`);--> statement-breakpoint
CREATE INDEX `setting_key` ON `platform_settings` (`setting_key`);--> statement-breakpoint
CREATE INDEX `player_profiles_userId_unique` ON `player_profiles` (`userId`);--> statement-breakpoint
CREATE INDEX `referrals_referralCode_unique` ON `referrals` (`referralCode`);--> statement-breakpoint
CREATE INDEX `restricted_states_stateCode_unique` ON `restricted_states` (`stateCode`);--> statement-breakpoint
CREATE INDEX `staff_userId_unique` ON `staff` (`userId`);--> statement-breakpoint
CREATE INDEX `staff_staffId_unique` ON `staff` (`staffId`);--> statement-breakpoint
CREATE INDEX `idx_user_achievements_unique` ON `user_achievements` (`userId`,`achievementId`);--> statement-breakpoint
CREATE INDEX `idx_user_favorites_unique` ON `user_favorites` (`userId`,`gameId`);--> statement-breakpoint
CREATE INDEX `user_vip_status_userId_unique` ON `user_vip_status` (`userId`);--> statement-breakpoint
CREATE INDEX `users_openId_unique` ON `users` (`openId`);--> statement-breakpoint
CREATE INDEX `users_username_unique` ON `users` (`username`);--> statement-breakpoint
CREATE INDEX `users_stripeCustomerId_unique` ON `users` (`stripeCustomerId`);