Files
bl/help/server_show冠名索引修复.sql
xinian ba1a1ffbea
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor: 统一数据库约束维护位置
2026-04-27 00:57:18 +08:00

15 lines
524 B
Go
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.

-- server_show 冠名索引修复
-- 目的允许同一服务器存在多个不同玩家的冠名记录
-- 同服同属主唯一约束统一在 约束类.sql 中维护
BEGIN;
-- 历史上 server_id 被建成了单列唯一约束/唯一索引会拦截同服多冠名
ALTER TABLE server_show DROP CONSTRAINT IF EXISTS idx_server_show_server_id;
DROP INDEX IF EXISTS idx_server_show_server_id;
-- 保留普通查询索引
CREATE INDEX IF NOT EXISTS idx_server_show_server_id ON server_show (server_id);
COMMIT;