{
  "query": "CREATE TABLE `notification_preferences` (\n\t`id` int AUTO_INCREMENT NOT NULL,\n\t`userId` int NOT NULL,\n\t`emailNotifications` boolean NOT NULL DEFAULT true,\n\t`pushNotifications` boolean NOT NULL DEFAULT true,\n\t`inAppNotifications` boolean NOT NULL DEFAULT true,\n\t`paymentNotifications` boolean NOT NULL DEFAULT true,\n\t`gameNotifications` boolean NOT NULL DEFAULT true,\n\t`promotionalNotifications` boolean NOT NULL DEFAULT false,\n\t`systemAlerts` boolean NOT NULL DEFAULT true,\n\t`emailFrequency` enum('instant','daily','weekly','never') NOT NULL DEFAULT 'instant',\n\t`createdAt` timestamp NOT NULL DEFAULT (now()),\n\t`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,\n\tCONSTRAINT `notification_preferences_id` PRIMARY KEY(`id`),\n\tCONSTRAINT `notification_preferences_userId_unique` UNIQUE(`userId`)\n);\nCREATE TABLE `notifications` (\n\t`id` int AUTO_INCREMENT NOT NULL,\n\t`userId` int NOT NULL,\n\t`type` enum('payment_success','payment_failed','bonus_credited','game_win','game_loss','bet_placed','bet_settled','odds_changed','poker_table_joined','poker_hand_result','poker_tournament_update','bingo_card_purchased','bingo_number_called','bingo_win','kyc_approved','kyc_rejected','kyc_pending','account_suspended','account_restored','withdrawal_approved','withdrawal_rejected','system_alert','promotional','admin_broadcast') NOT NULL,\n\t`title` varchar(255) NOT NULL,\n\t`message` text NOT NULL,\n\t`channels` json,\n\t`data` json,\n\t`isRead` boolean NOT NULL DEFAULT false,\n\t`readAt` timestamp,\n\t`emailSent` boolean NOT NULL DEFAULT false,\n\t`pushSent` boolean NOT NULL DEFAULT false,\n\t`createdAt` timestamp NOT NULL DEFAULT (now()),\n\t`expiresAt` timestamp,\n\tCONSTRAINT `notifications_id` PRIMARY KEY(`id`)\n);\nCREATE INDEX `idx_notif_prefs_userId` ON `notification_preferences` (`userId`);\nCREATE INDEX `idx_notifications_userId` ON `notifications` (`userId`);\nCREATE INDEX `idx_notifications_createdAt` ON `notifications` (`createdAt`);",
  "command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway04.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 3sE2opaakiHhpCk.root --database 38mmEpDjJeLLr6ocaGW5p5 --execute CREATE TABLE `notification_preferences` (\n\t`id` int AUTO_INCREMENT NOT NULL,\n\t`userId` int NOT NULL,\n\t`emailNotifications` boolean NOT NULL DEFAULT true,\n\t`pushNotifications` boolean NOT NULL DEFAULT true,\n\t`inAppNotifications` boolean NOT NULL DEFAULT true,\n\t`paymentNotifications` boolean NOT NULL DEFAULT true,\n\t`gameNotifications` boolean NOT NULL DEFAULT true,\n\t`promotionalNotifications` boolean NOT NULL DEFAULT false,\n\t`systemAlerts` boolean NOT NULL DEFAULT true,\n\t`emailFrequency` enum('instant','daily','weekly','never') NOT NULL DEFAULT 'instant',\n\t`createdAt` timestamp NOT NULL DEFAULT (now()),\n\t`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,\n\tCONSTRAINT `notification_preferences_id` PRIMARY KEY(`id`),\n\tCONSTRAINT `notification_preferences_userId_unique` UNIQUE(`userId`)\n);\nCREATE TABLE `notifications` (\n\t`id` int AUTO_INCREMENT NOT NULL,\n\t`userId` int NOT NULL,\n\t`type` enum('payment_success','payment_failed','bonus_credited','game_win','game_loss','bet_placed','bet_settled','odds_changed','poker_table_joined','poker_hand_result','poker_tournament_update','bingo_card_purchased','bingo_number_called','bingo_win','kyc_approved','kyc_rejected','kyc_pending','account_suspended','account_restored','withdrawal_approved','withdrawal_rejected','system_alert','promotional','admin_broadcast') NOT NULL,\n\t`title` varchar(255) NOT NULL,\n\t`message` text NOT NULL,\n\t`channels` json,\n\t`data` json,\n\t`isRead` boolean NOT NULL DEFAULT false,\n\t`readAt` timestamp,\n\t`emailSent` boolean NOT NULL DEFAULT false,\n\t`pushSent` boolean NOT NULL DEFAULT false,\n\t`createdAt` timestamp NOT NULL DEFAULT (now()),\n\t`expiresAt` timestamp,\n\tCONSTRAINT `notifications_id` PRIMARY KEY(`id`)\n);\nCREATE INDEX `idx_notif_prefs_userId` ON `notification_preferences` (`userId`);\nCREATE INDEX `idx_notifications_userId` ON `notifications` (`userId`);\nCREATE INDEX `idx_notifications_createdAt` ON `notifications` (`createdAt`);",
  "rows": [],
  "messages": [],
  "stdout": "",
  "stderr": "",
  "execution_time_ms": 2471
}