fix(bugcollect): V4 迁移 SQL 修复 ADD INDEX IF NOT EXISTS 语法
MySQL 不支持 ALTER TABLE ADD INDEX IF NOT EXISTS,改用 CREATE INDEX。 已在生产数据库手动修复并标记 Flyway 迁移成功。 Co-Authored-By: Claude <noreply@anthropic.com>
这个提交包含在:
父节点
375f2c4660
当前提交
7cc0962df2
@ -34,7 +34,6 @@ CREATE TABLE IF NOT EXISTS log_sessions (
|
||||
INDEX idx_ls_started_at (started_at)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- Ensure event_id has a uniqueness constraint (was added as NULL in V3)
|
||||
-- Use an index rather than UNIQUE to tolerate legacy NULL rows
|
||||
ALTER TABLE log_issue_events
|
||||
ADD INDEX IF NOT EXISTS idx_lie_event_id (event_id);
|
||||
-- Ensure event_id has an index (was added as NULL in V3)
|
||||
-- Note: MySQL does not support ALTER TABLE ADD INDEX IF NOT EXISTS
|
||||
CREATE INDEX idx_lie_event_id ON log_issue_events (event_id);
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户