Closed vxavictor513 closed 6 years ago
While this seems like a bug, the syntax you used was never valid in the first place. See https://dev.mysql.com/doc/refman/5.7/en/comments.html and https://dev.mysql.com/doc/refman/5.7/en/ansi-diff-comments.html
This invalid syntax worked by chance in the past as Flyway skipped comments between statements. Starting with Flyway 5.1 this is no longer the case in order to preserve header comments on stored procedures among other things.
This is a bug in your scripts and not a Flyway defect.
"This syntax differs slightly from standard SQL comment syntax, as discussed in Section 1.8.2.4, “'--' as the Start of a Comment”."
With this in mind, can we have option to allow '--' without space?
Which version and edition of Flyway are you using?
Flyway Community Edition, version 5.1.4
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Java API
Which database are you using (type & version)?
MySQL 5.7
Which operating system are you using?
Mac OS
What did you do?
I upgraded from Flyway 5.0.7 to 5.1.4 for my Spring Boot application, then tried to run a unit test but it failed at DB migration step.
My Flyway script contains a single-line comment starting with "--" but not followed by a whitespace.
What did you expect to see?
DB Migration to be successful, as it was in 5.0.7.
What did you see instead?