-- 移除 Dice_* 表的 channel_id 和 department_id 字段
-- 需 MySQL 8.0.23+ 支持 DROP COLUMN IF EXISTS；若版本较低请逐条执行并忽略报错

ALTER TABLE `dice_config` DROP COLUMN IF EXISTS `channel_id`, DROP COLUMN IF EXISTS `department_id`;
ALTER TABLE `dice_player` DROP COLUMN IF EXISTS `channel_id`, DROP COLUMN IF EXISTS `department_id`;
ALTER TABLE `dice_play_record` DROP COLUMN IF EXISTS `channel_id`, DROP COLUMN IF EXISTS `department_id`;
ALTER TABLE `dice_player_ticket_record` DROP COLUMN IF EXISTS `channel_id`, DROP COLUMN IF EXISTS `department_id`;
ALTER TABLE `dice_player_wallet_record` DROP COLUMN IF EXISTS `channel_id`, DROP COLUMN IF EXISTS `department_id`;
ALTER TABLE `dice_reward_config` DROP COLUMN IF EXISTS `channel_id`, DROP COLUMN IF EXISTS `department_id`;
ALTER TABLE `dice_lottery_pool_config` DROP COLUMN IF EXISTS `channel_id`, DROP COLUMN IF EXISTS `department_id`;
