DB数据库文件

This commit is contained in:
2026-05-26 09:43:42 +08:00
parent e0b303c5d4
commit a4c8f623be
30 changed files with 1416 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
-- dice_player同一渠道内用户名唯一dept_id + username— 数据库根本约束
-- 执行前请备份;若存在重复数据需先清理后再执行
-- 推荐php db/run_dice_player_dept_username_unique.php
-- 移除仅按 username 的普通索引(若不存在可忽略报错)
-- ALTER TABLE `dice_player` DROP INDEX `idx_dice_player_username`;
-- 同一渠道下用户名唯一UNIQUE 为数据库层最终约束)
ALTER TABLE `dice_player`
ADD UNIQUE INDEX `uk_dice_player_dept_username` (`dept_id`, `username`);