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.Dismiss alert
Describe the bug
Since quarkus-version 1.4.2 the flyway plugin does not include the name of the version subfolder into the path of the migration scripts so that quarkus startup fails with an Exception org.flywaydb.core.api.FlywayException: Unable to obtain inputstream for resource: <configured location>/<script filename>.
Expected behavior
Having a folder structure like this:
If sql is the configured location i would expect that the flyway plugin builds up the path including the version subfolder:
sql/v1_0/V1_0_0_001__DoSomethingForVersion1.sql
sql/v2_0/V2_0_0_001__DoSomethingForVersion2sql
Actual behavior
In the quarkus version 1.5, 1.6 and even 1.7.0.RC2 the path for the migration paths is build up like this:
sql/V1_0_0_001__DoSomethingForVersion1.sql
sql/V2_0_0_001__DoSomethingForVersion2sql
To workaround the problem the subfolders must be configured as separate locations
So quarkus failed to startup (if migrate on start is set) with:
org.flywaydb.core.api.FlywayException: Unable to obtain inputstream for resource: sql/V1_0_0_001__DoNothing.sql
at org.flywaydb.core.internal.resource.classpath.ClassPathResource.read(ClassPathResource.java:90)
at org.flywaydb.core.internal.resolver.ChecksumCalculator.calculateChecksumForResource(ChecksumCalculator.java:67)
at org.flywaydb.core.internal.resolver.ChecksumCalculator.calculate(ChecksumCalculator.java:46)
at org.flywaydb.core.internal.resolver.sql.SqlMigrationResolver.getChecksumForLoadableResource(SqlMigrationResolver.java:143)
at org.flywaydb.core.internal.resolver.sql.SqlMigrationResolver.addMigrations(SqlMigrationResolver.java:181)
at org.flywaydb.core.internal.resolver.sql.SqlMigrationResolver.resolveMigrations(SqlMigrationResolver.java:88)
at org.flywaydb.core.internal.resolver.sql.SqlMigrationResolver.resolveMigrations(SqlMigrationResolver.java:44)
at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.collectMigrations(CompositeMigrationResolver.java:127)
at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.doFindAvailableMigrations(CompositeMigrationResolver.java:109)
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.DbMigrate.migrateGroup(DbMigrate.java:185)
at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54)
at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162)
at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159)
at org.flywaydb.core.internal.database.postgresql.PostgreSQLAdvisoryLockTemplate.execute(PostgreSQLAdvisoryLockTemplate.java:71)
at org.flywaydb.core.internal.database.postgresql.PostgreSQLConnection.lock(PostgreSQLConnection.java:99)
at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:140)
at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159)
at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137)
at org.flywaydb.core.Flyway$1.execute(Flyway.java:206)
at org.flywaydb.core.Flyway$1.execute(Flyway.java:158)
at org.flywaydb.core.Flyway.execute(Flyway.java:527)
at org.flywaydb.core.Flyway.migrate(Flyway.java:158)
at io.quarkus.flyway.runtime.FlywayRecorder.doStartActions(FlywayRecorder.java:54)
at io.quarkus.deployment.steps.FlywayProcessor$createBeansAndStartActions-1520831253.deploy_0(FlywayProcessor$createBeansAndStartActions-1520831253.zig:80)
at io.quarkus.deployment.steps.FlywayProcessor$createBeansAndStartActions-1520831253.deploy(FlywayProcessor$createBeansAndStartActions-1520831253.zig:40)
at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:521)
at io.quarkus.runtime.Application.start(Application.java:90)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:92)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:61)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:106)
at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.quarkus.runner.bootstrap.StartupActionImpl$3.run(StartupActionImpl.java:145)
at java.base/java.lang.Thread.run(Thread.java:834)
Describe the bug
Since quarkus-version 1.4.2 the flyway plugin does not include the name of the version subfolder into the path of the migration scripts so that quarkus startup fails with an Exception
org.flywaydb.core.api.FlywayException: Unable to obtain inputstream for resource: <configured location>/<script filename>
.Expected behavior
Having a folder structure like this:
If sql is the configured location i would expect that the flyway plugin builds up the path including the version subfolder:
Actual behavior
In the quarkus version 1.5, 1.6 and even 1.7.0.RC2 the path for the migration paths is build up like this:
To workaround the problem the subfolders must be configured as separate locations
So quarkus failed to startup (if migrate on start is set) with:
Configuration
The text was updated successfully, but these errors were encountered: