Which version and edition of Flyway are you using?
If this is not the latest version, can you reproduce the issue with the latest one as well?
(Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Java API and Maven Plugin
Which database are you using (type & version)?
Which operating system are you using?
Linux and OS X
What did you do?
(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
Parsing a simple sql-migration script containing a couple of:
DROP TABLE IF EXISTS mytable CASCADE;
What did you expect to see?
A successful migration, worked in version 4 and 5.
What did you see instead?
A failed migration, the parser believes that there is only ONE single statement, it failes to separate the rows at the ; and newline.
This is due to that the blockdepth is increased at the 'IF'-keyword and the DELIMITER is still used instead of NEW_DELIMETER. This makes the login not see the delimiter at all, none of the two delimiter-paths are taken.
The text was updated successfully, but these errors were encountered:
As stated above, DROP TABLE IF EXISTS mytable CASCADE; is enough to trigger the error.
You however need to put ANY statement or text after this row and see that the parser continues without breaking on the statement.
The comment also contains details of where in the code the error resides. The pull-request also gives indications of where to start looking.