Describe the bug
I have a "beforeMigrate" flyway callback script. when I run mvn test I get the flyway error:
I'm also using test containers
2020-06-24 11:33:53,683 INFO [org.fly.cor.int.lic.VersionPrinter] (main) Flyway Community Edition 6.4.2 by Redgate
2020-06-24 11:33:54,085 INFO [org.fly.cor.int.dat.DatabaseFactory] (main) Database: jdbc:mysql://localhost:32773/test_db (MySQL 5.7)
2020-06-24 11:33:54,164 ERROR [io.qua.application] (main) Failed to start application: org.flywaydb.core.api.FlywayException: Found more than 1 SQL callback script called beforeMigrate!
Offenders:
-> /.../target/classes/db/migration/beforeMigrate.sql
-> /..../target/classes/db/migration/beforeMigrate.sql
at org.flywaydb.core.internal.callback.SqlScriptCallbackFactory.<init>(SqlScriptCallbackFactory.java:79)
at org.flywaydb.core.Flyway.prepareCallbacks(Flyway.java:655)
at org.flywaydb.core.Flyway.execute(Flyway.java:517)
at org.flywaydb.core.Flyway.migrate(Flyway.java:159)
at io.quarkus.flyway.runtime.FlywayRecorder.doStartActions(FlywayRecorder.java:53)
at io.quarkus.deployment.steps.FlywayProcessor$createBeansAndStartActions-1520831253.deploy_0(FlywayProcessor$createBeansAndStartActions-1520831253.zig:76)
at io.quarkus.deployment.steps.FlywayProcessor$createBeansAndStartActions-1520831253.deploy(FlywayProcessor$createBeansAndStartActions-1520831253.zig:36)
at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:420)
at io.quarkus.runtime.Application.start(Application.java:90)
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.run(StartupActionImpl.java:222)
at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:156)
at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:297)
at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:330)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$7(ClassBasedTestDescriptor.java:359)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:35
Describe the bug I have a "beforeMigrate" flyway callback script. when I run mvn test I get the flyway error:
I'm also using test containers
https://github.com/quarkusio/quarkus/issues/10215
$upstream:10215$