You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 28, 2018. It is now read-only.
I am trying to create a migration which adds a trigger to the database. The trigger creation statement contains a semicolon (;). However the mysql migrator splits the input migration file on semicolons, and treats them as separate statements. Because of this I get a syntax error when trying to run the migration.
For example:
createtriggertest_insert after insert on test
for each row
begininsert into test_event set type='insert', test_id=NEW.id;
end
Error: Error 1064: 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 '' at line 4
1: create trigger test_insert after insert on test
2: for each row
3: begin
4: insert into test_event set type='insert', test_id=NEW.id
The text was updated successfully, but these errors were encountered:
Would you be willing to have the mysql driver look for DELIMITER FOO on the first line of each migration, and split on that instead of ;? It would be a bit magicish since the DELIMITER statement isn't actually being parsed by mysql, but it would be valid SQL instead of creating a new syntax just for mattes/migrate.
I am trying to create a migration which adds a trigger to the database. The trigger creation statement contains a semicolon (
;
). However the mysql migrator splits the input migration file on semicolons, and treats them as separate statements. Because of this I get a syntax error when trying to run the migration.For example:
The text was updated successfully, but these errors were encountered: