Files
dafuweng-saiadmin6.x/server/db/dice_lottery_config_add_profit_amount.sql
2026-04-28 10:24:01 +08:00

8 lines
696 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 彩金池盈利字段:使用 profit_amount计算方式为每局抽奖累加付费=win_coin-paid_amount免费=win_coin
-- 1. 添加 profit_amount若已存在则报错可忽略
ALTER TABLE `dice_lottery_pool_config` ADD COLUMN `profit_amount` decimal(14,2) NOT NULL DEFAULT 0.00 COMMENT '池子累计盈利(每局抽奖累加:付费=win_coin-paid_amount免费=win_coin' AFTER `t5_weight`;
-- 2. 若表中原有 ev 字段,可将数据同步到 profit_amount若无 ev 可注释本行)
-- UPDATE `dice_lottery_pool_config` SET `profit_amount` = IFNULL(`ev`, 0) WHERE 1;
-- 3. 可选:删除旧字段 ev
-- ALTER TABLE `dice_lottery_pool_config` DROP COLUMN `ev`;