hi-server/initialize/migrate/database/02118_traffic_log_idx.up.sql
EUForest bacdf2f301 fix(migration): correct SQL syntax for traffic_log index creation
Change ALTER TABLE ADD INDEX IF NOT EXISTS to CREATE INDEX IF NOT EXISTS
to comply with MySQL syntax requirements. The IF NOT EXISTS clause is
only supported with CREATE INDEX statement, not with ALTER TABLE ADD INDEX.
2026-02-10 00:25:40 +08:00

3 lines
70 B
SQL

CREATE INDEX IF NOT EXISTS idx_timestamp ON traffic_log (timestamp);