flyway / flyway-sbt

Flyway SBT plugin
Apache License 2.0
127 stars 36 forks source link

New releases #82

Open KOnaitis opened 3 years ago

KOnaitis commented 3 years ago

Hello!

Any reason why in Maven Central the 6.5.0 is the latest version. Although it seems like 7+ versions are out already.. Would really want to have my flyway-core match flyway-sbt version.

I might be misunderstanding how to add the newer versions (even though 6.5.0 works fine), but neither the option in docs, nor even adding sonatype snapshot repo helps.

rossproduct commented 3 years ago

It doesn't look like the new releases are published to Maven (or any other popular repos) yet. In the interim, you'll have to publish your own or mix versions.

flyway-core 7.5.2 seems perfectly happy with flyway-sbt 6.5.0 in my testing, but YMMV: mixing linked major versions like that sketches me out even if there are no compatibility-breaking major changes.

mkurz commented 1 year ago

Current flyway-sbt release does not work with latest flyway 9.20.1:

[info] Flyway Community Edition 7.4.0 by Redgate
[info] Database: jdbc:h2:./test (H2 2.2)
[error] org.flywaydb.core.internal.exception.FlywaySqlException: 
[error] Unable to determine H2 compatibility mode
[error] -----------------------------------------
[error] SQL State  : 42001
[error] Error Code : 42001
[error] Message    : Syntax error in SQL statement "SELECT [*]VALUE FROM INFORMATION_SCHEMA.SETTINGS WHERE NAME = 'MODE'"; expected "TOP, DISTINCT, ALL, *, INTERSECTS (, NOT, EXISTS, UNIQUE, INTERSECTS"; SQL statement:
[error] SELECT VALUE FROM INFORMATION_SCHEMA.SETTINGS WHERE NAME = 'MODE' [42001-220]
[error] 
[error]         at org.flywaydb.core.internal.database.h2.H2Database.determineCompatibilityMode(H2Database.java:103)
[error]         at org.flywaydb.core.internal.database.h2.H2Database.<init>(H2Database.java:76)
[error]         at org.flywaydb.core.internal.database.h2.H2DatabaseType.createDatabase(H2DatabaseType.java:61)
[error]         at org.flywaydb.core.internal.database.base.DatabaseType.createDatabase(DatabaseType.java:149)
[error]         at org.flywaydb.core.Flyway.execute(Flyway.java:543)
[error]         at org.flywaydb.core.Flyway.migrate(Flyway.java:165)
[error]         at io.github.davidmweber.FlywayPlugin$.$anonfun$flywayBaseSettings$47(FlywayPlugin.scala:190)
[error]         at io.github.davidmweber.FlywayPlugin$.$anonfun$flywayBaseSettings$47$adapted(FlywayPlugin.scala:190)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error]         at sbt.Execute.work(Execute.scala:292)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error]         at java.base/java.lang.Thread.run(Thread.java:829)
[error] Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT [*]VALUE FROM INFORMATION_SCHEMA.SETTINGS WHERE NAME = 'MODE'"; expected "TOP, DISTINCT, ALL, *, INTERSECTS (, NOT, EXISTS, UNIQUE, INTERSECTS"; SQL statement:
[error] SELECT VALUE FROM INFORMATION_SCHEMA.SETTINGS WHERE NAME = 'MODE' [42001-220]
[error]         at org.h2.message.DbException.getJdbcSQLException(DbException.java:514)
[error]         at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)
[error]         at org.h2.message.DbException.getSyntaxError(DbException.java:261)
[error]         at org.h2.command.Parser.getSyntaxError(Parser.java:910)
[error]         at org.h2.command.Parser.readTermWithoutIdentifier(Parser.java:5283)
[error]         at org.h2.command.Parser.readTerm(Parser.java:4983)
[error]         at org.h2.command.Parser.readFactor(Parser.java:3463)
[error]         at org.h2.command.Parser.readSum(Parser.java:3450)
[error]         at org.h2.command.Parser.readConcat(Parser.java:3415)
[error]         at org.h2.command.Parser.readCondition(Parser.java:3205)
[error]         at org.h2.command.Parser.readExpression(Parser.java:3125)
[error]         at org.h2.command.Parser.parseSelectExpressions(Parser.java:2925)
[error]         at org.h2.command.Parser.parseSelect(Parser.java:2943)
[error]         at org.h2.command.Parser.parseQueryPrimary(Parser.java:2834)
[error]         at org.h2.command.Parser.parseQueryTerm(Parser.java:2690)
[error]         at org.h2.command.Parser.parseQueryExpressionBody(Parser.java:2669)
[error]         at org.h2.command.Parser.parseQueryExpressionBodyAndEndOfQuery(Parser.java:2662)
[error]         at org.h2.command.Parser.parseQueryExpression(Parser.java:2655)
[error]         at org.h2.command.Parser.parseQuery(Parser.java:2624)
[error]         at org.h2.command.Parser.parsePrepared(Parser.java:732)
[error]         at org.h2.command.Parser.parse(Parser.java:697)
[error]         at org.h2.command.Parser.parse(Parser.java:674)
[error]         at org.h2.command.Parser.prepareCommand(Parser.java:577)
[error]         at org.h2.engine.SessionLocal.prepareLocal(SessionLocal.java:634)
[error]         at org.h2.engine.SessionLocal.prepareCommand(SessionLocal.java:557)
[error]         at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116)
[error]         at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:92)
[error]         at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288)
[error]         at org.flywaydb.core.internal.jdbc.JdbcTemplate.prepareStatement(JdbcTemplate.java:344)
[error]         at org.flywaydb.core.internal.jdbc.JdbcTemplate.queryForString(JdbcTemplate.java:196)
[error]         at org.flywaydb.core.internal.database.h2.H2Database.determineCompatibilityMode(H2Database.java:97)
[error]         at org.flywaydb.core.internal.database.h2.H2Database.<init>(H2Database.java:76)
[error]         at org.flywaydb.core.internal.database.h2.H2DatabaseType.createDatabase(H2DatabaseType.java:61)
[error]         at org.flywaydb.core.internal.database.base.DatabaseType.createDatabase(DatabaseType.java:149)
[error]         at org.flywaydb.core.Flyway.execute(Flyway.java:543)
[error]         at org.flywaydb.core.Flyway.migrate(Flyway.java:165)
[error]         at io.github.davidmweber.FlywayPlugin$.$anonfun$flywayBaseSettings$47(FlywayPlugin.scala:190)
[error]         at io.github.davidmweber.FlywayPlugin$.$anonfun$flywayBaseSettings$47$adapted(FlywayPlugin.scala:190)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error]         at sbt.Execute.work(Execute.scala:292)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error]         at java.base/java.lang.Thread.run(Thread.java:829)
[error] (flyway / flywayMigrate) org.flywaydb.core.internal.exception.FlywaySqlException: 
[error] Unable to determine H2 compatibility mode
[error] -----------------------------------------
[error] SQL State  : 42001
[error] Error Code : 42001
[error] Message    : Syntax error in SQL statement "SELECT [*]VALUE FROM INFORMATION_SCHEMA.SETTINGS WHERE NAME = 'MODE'"; expected "TOP, DISTINCT, ALL, *, INTERSECTS (, NOT, EXISTS, UNIQUE, INTERSECTS"; SQL statement:
[error] SELECT VALUE FROM INFORMATION_SCHEMA.SETTINGS WHERE NAME = 'MODE' [42001-220]
[error] Total time: 0 s, completed Jul 15, 2023, 12:17:42 PM

Would be nice if you could upgrade to latest flyway 9.x

mkurz commented 9 months ago

@davidmweber You need help? I have lots of experience with sbt plugins and could help out releasing new version etc. WDYT?

mkurz commented 6 months ago

New releases will happen soon: