Which version and edition of Flyway are you using?
Community 6.4.2, but bug seems to happen on releases after 6.2.4 (6.2.4 worked. 6.3.0, 6.3.3, and 6.4.2 didn't)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Command-line
Which database are you using (type & version)?
h2-1.4.200
Which operating system are you using?
Windows
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.)
I set sqlMigrationPrefix to be empty, (as in I name my migrations like 0__create_table.sql, 1__add_column.sql)
The repro uses 6.3.3, but 6.3.0, 6.3.3, and 6.4.2 all fail, and 6.2.4 works
What did you expect to see?
It should accept the R__foo_table.sql with no issue, which is what happens in 6.2.4
What did you see instead?
Running flyway info exits with "Found more than one repeatable migration with description foo table", listing the exact same file path twice.
Here's the full debug output:
DEBUG: Loading config file: C:\proj\sql-schema\bug_repro\conf\flyway.conf
DEBUG: Unable to load config file: C:\Users\Angus\flyway.conf
DEBUG: Unable to load config file: C:\proj\sql-schema\bug_repro\flyway.conf
DEBUG: Using configuration:
DEBUG: flyway.jarDirs -> C:\proj\sql-schema\bug_repro\jars
DEBUG: flyway.locations -> filesystem:C:\proj\sql-schema\bug_repro\sql
DEBUG: flyway.password -> **********
DEBUG: flyway.sqlMigrationPrefix ->
DEBUG: flyway.url -> jdbc:h2:mem:testdb
DEBUG: flyway.user -> myuser
DEBUG: Adding location to classpath: C:\proj\sql-schema\bug_repro\drivers\h2-1.4.200.jar
Flyway Community Edition 6.3.3 by Redgate
DEBUG: Scanning for filesystem resources at 'C:\proj\sql-schema\bug_repro\sql'
DEBUG: Scanning for resources in path: C:\proj\sql-schema\bug_repro\sql (C:\proj\sql-schema\bug_repro\sql)
DEBUG: Found filesystem resource: C:\proj\sql-schema\bug_repro\sql\R__foo_table.sql
Database: jdbc:h2:mem:testdb (H2 1.4)
DEBUG: Driver : H2 JDBC Driver 1.4.200 (2019-10-14)
DEBUG: DDL Transactions Supported: false
DEBUG: Schemas:
DEBUG: Default schema: null
DEBUG: Scanning for SQL callbacks ...
DEBUG: Memory usage: 19 of 245M
ERROR: Unexpected error
org.flywaydb.core.api.FlywayException: Found more than one repeatable migration with description foo table
Offenders:
-> C:\proj\sql-schema\bug_repro\sql\R__foo_table.sql (SQL)
-> C:\proj\sql-schema\bug_repro\sql\R__foo_table.sql (SQL)
at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.checkForIncompatibilities(CompositeMigrationResolver.java:155)
at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.doFindAvailableMigrations(CompositeMigrationResolver.java:112)
at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.resolveMigrations(CompositeMigrationResolver.java:95)
at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.resolveMigrations(CompositeMigrationResolver.java:46)
at org.flywaydb.core.internal.info.MigrationInfoServiceImpl.refresh(MigrationInfoServiceImpl.java:130)
at org.flywaydb.core.internal.command.DbInfo.info(DbInfo.java:52)
at org.flywaydb.core.Flyway$4.execute(Flyway.java:331)
at org.flywaydb.core.Flyway$4.execute(Flyway.java:324)
at org.flywaydb.core.Flyway.execute(Flyway.java:530)
at org.flywaydb.core.Flyway.info(Flyway.java:324)
at org.flywaydb.commandline.Main.executeOperation(Main.java:198)
at org.flywaydb.commandline.Main.main(Main.java:128)
The text was updated successfully, but these errors were encountered:
angusholder
changed the title
Setting sqlMigrationPrefix to empty breaks locators for repeatable migrations since 6.3.0+
Setting sqlMigrationPrefix to empty "Found more than one repeatable migration with description" since 6.3.0+
May 18, 2020
angusholder
changed the title
Setting sqlMigrationPrefix to empty "Found more than one repeatable migration with description" since 6.3.0+
Setting sqlMigrationPrefix to empty causes error "Found more than one repeatable migration with description" since 6.3.0+
May 18, 2020
Which version and edition of Flyway are you using?
Community 6.4.2, but bug seems to happen on releases after 6.2.4 (6.2.4 worked. 6.3.0, 6.3.3, and 6.4.2 didn't)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Command-line
Which database are you using (type & version)?
h2-1.4.200
Which operating system are you using?
Windows
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.)
I set
sqlMigrationPrefix
to be empty, (as in I name my migrations like0__create_table.sql
,1__add_column.sql
)Here's a minimal reproduction:
bug_repro.zip
The repro uses 6.3.3, but 6.3.0, 6.3.3, and 6.4.2 all fail, and 6.2.4 works
What did you expect to see?
It should accept the
R__foo_table.sql
with no issue, which is what happens in 6.2.4What did you see instead?
Running
flyway info
exits with "Found more than one repeatable migration with description foo table", listing the exact same file path twice.Here's the full debug output:
The text was updated successfully, but these errors were encountered: