ALTER TABLE llx_scrap ADD COLUMN IF NOT EXISTS fk_ws INT DEFAULT NULL COMMENT 'FK to workstation' => ERR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS fk_ws INT DEFAULT NULL COMMENT 'FK to workstation'' at line 1 ALTER TABLE llx_scrap ADD COLUMN IF NOT EXISTS op_rank SMALLINT DEFAULT NULL COMMENT 'Routing position snapshot' => ERR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS op_rank SMALLINT DEFAULT NULL COMMENT 'Routing position snapshot'' at line 1 CREATE INDEX IF NOT EXISTS idx_scrap_ws ON llx_scrap (fk_ws) => ERR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_scrap_ws ON llx_scrap (fk_ws)' at line 1 --- Reason table reset --- TRUNCATE TABLE llx_scrap_reason... => OK INSERT INTO llx_scrap_reason (code, label, category, active, position) VALUES (... => OK DONE