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.
Windows 7 & 10 (local development). Probably not relevant.
What did you do?
(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
A script with a delimiter:
delimiter #
create procedure init_fact_references()
begin
start transaction;
alter table facts add reference int;
update facts set reference = (position + 1) where publication_date is not null;
update facts set reference = 0 where publication_date is null;
commit;
end #
delimiter ;
What did you expect to see?
The script works fine using Flyway 3.1. I expect it to keep working when I upgrade my Flyway version :)
What did you see instead?
Migration V1.1.9__facts_reference.sql failed
--------------------------------------------
SQL State : 42000
Error Code : 1064
Message : 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 'DELIMITER' at line 13
Location : db/migration/V1.1/V1.1.9__facts_reference.sql (C:\Users\Romain Fromi\IdeaProjects\ejust\src\main\resources\db\migration\V1.1\V1.1.9__facts_reference.sql)
Line : 7
Statement : CREATE PROCEDURE init_fact_references()
BEGIN
START TRANSACTION;
ALTER TABLE facts ADD reference INT;
UPDATE facts
SET reference = (position + 1)
WHERE publication_date IS NOT NULL;
UPDATE facts
SET reference = 0
WHERE publication_date IS NULL;
COMMIT;
END #
DELIMITER
at org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java:117) ~[flyway-core-3.2.1.jar:na]
[...]
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'DELIMITER' at line 13
The text was updated successfully, but these errors were encountered:
What version of Flyway are you using?
3.2
What database are you using (type & version)?
MySQL
What operating system are you using?
Windows 7 & 10 (local development). Probably not relevant.
What did you do?
(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
A script with a delimiter:
What did you expect to see?
The script works fine using Flyway 3.1. I expect it to keep working when I upgrade my Flyway version :)
What did you see instead?
The text was updated successfully, but these errors were encountered: