Files
junhong_cmp_fiber/migrations
huang e8eb5766cb fix(migration): 为所有 CREATE INDEX 语句添加 IF NOT EXISTS
为 5 个 RBAC 表的所有 18 个索引语句添加 IF NOT EXISTS,使迁移脚本具有幂等性:
- tb_account: 6 个索引(包括 2 个唯一索引)
- tb_role: 2 个索引
- tb_permission: 4 个索引(包括 1 个唯一索引)
- tb_account_role: 4 个索引(包括 1 个唯一索引)
- tb_role_permission: 4 个索引(包括 1 个唯一索引)

这样即使表和索引已经存在(如通过 GORM AutoMigrate 创建),
迁移脚本也能成功执行,COMMENT 语句可以正常应用。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 15:08:18 +08:00
..