Which version and edition of Flyway are you using?
6.0.7
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Spring Boot integration
Which database are you using (type & version)?
HSQLDB 2.5.0
Which operating system are you using?
macOS 10.14.6
What did you do?
Wrote a migration with a simple conditional DROP INDEX statement:
DROP INDEX IF EXISTS blog_post__name_idx;
What did you expect to see?
Successful migration and a dropped index.
What did you see instead?
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Unable to parse statement in db/migration/common/V2__drop_blog_post_name_idx.sql at line 1 col 1: Incomplete statement at line 1 col 1: DROP INDEX IF EXISTS blog_post__name_idx;
Also when I debug into the HSQLDBParser in line 77 I can see that the INDEX token has the type IDENTIFIER which seams wrong and it is therefore looking for the token DROP in CONDITIONALLY_CREATABLE_OBJECTS which it won't find. It is then increasing the blockDepth and failing later because of that.
It's not the same as #2442 but it's definitely failing to spot INDEX as a keyword that can appear in the form DROP <THING> IF EXISTS. I have a fix which should go in 6.0.8.
Which version and edition of Flyway are you using?
6.0.7
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Spring Boot integration
Which database are you using (type & version)?
HSQLDB 2.5.0
Which operating system are you using?
macOS 10.14.6
What did you do?
Wrote a migration with a simple conditional
DROP INDEX
statement:What did you expect to see?
Successful migration and a dropped index.
What did you see instead?
Also when I debug into the
HSQLDBParser
in line 77 I can see that theINDEX
token has the typeIDENTIFIER
which seams wrong and it is therefore looking for the tokenDROP
inCONDITIONALLY_CREATABLE_OBJECTS
which it won't find. It is then increasing theblockDepth
and failing later because of that.This might be related to #2442
The text was updated successfully, but these errors were encountered: