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

15 lines
871 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.
-- dice_reward_config 表结构迁移:按 DiceRewardConfigTest 配置
-- 1. s_end_index 改为 n_start_index逆时针起始索引
-- 2. n_end_index 改为 s_start_index顺时针起始索引
-- 3. weight 改为 1-10000 整数(原为 0-100 小数则需先改类型再改范围)
-- 若表已有 s_end_index / n_end_index先重命名
ALTER TABLE `dice_reward_config`
CHANGE COLUMN `s_end_index` `n_start_index` int NOT NULL DEFAULT 0 COMMENT '逆时针起始索引';
ALTER TABLE `dice_reward_config`
CHANGE COLUMN `n_end_index` `s_start_index` int NOT NULL DEFAULT 0 COMMENT '顺时针起始索引';
-- weight 改为 1-10000 无符号整数(若原为 decimal(5,2),先改类型)
ALTER TABLE `dice_reward_config`
MODIFY COLUMN `weight` int unsigned NOT NULL DEFAULT 1 COMMENT '权重 1-10000档位内按权重比抽取 grid_number';