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.
3 lines
70 B
SQL
3 lines
70 B
SQL
CREATE INDEX IF NOT EXISTS idx_timestamp ON traffic_log (timestamp);
|
|
|