flyway / flyway-test-extensions

Apache License 2.0
129 stars 35 forks source link

Timeline to support Postgres11? #69

Closed chiahualiu77 closed 5 years ago

chiahualiu77 commented 5 years ago

Hello, I'm currently using Flyway v6.0.0-beta for my Spring boot project. I used to use this extension for the integration tests in order to do the DB Clean. However, I can't use the latest version(5.2.1) to do Clean in Postgres 11.

org.flywaydb.core.internal.exception.FlywaySqlException: 
Unable to clean schema "public"
-------------------------------
SQL State  : 42703
Error Code : 0
Message    : ERROR: column pg_proc.proisagg does not exist
  Hint: Perhaps you meant to reference the column "pg_proc.prolang".
  Position: 54

    at org.flywaydb.core.internal.database.base.Schema.clean(Schema.java:151)
    at org.flywaydb.core.internal.command.DbClean$3.call(DbClean.java:172)
    at org.flywaydb.core.internal.command.DbClean$3.call(DbClean.java:169)
    at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74)
    at org.flywaydb.core.internal.command.DbClean.cleanSchema(DbClean.java:169)
    at org.flywaydb.core.internal.command.DbClean.clean(DbClean.java:113)
    at org.flywaydb.core.Flyway.doClean(Flyway.java:1488)
    at org.flywaydb.core.Flyway.access$300(Flyway.java:85)
    at org.flywaydb.core.Flyway$3.execute(Flyway.java:1506)
    at org.flywaydb.core.Flyway$3.execute(Flyway.java:1499)
    at org.flywaydb.core.Flyway.execute(Flyway.java:1711)
    at org.flywaydb.core.Flyway.clean(Flyway.java:1499)
    at org.flywaydb.test.FlywayTestExecutionListener.dbResetWithAnnotation(FlywayTestExecutionListener.java:381)
    at org.flywaydb.test.FlywayTestExecutionListener.handleFlywayTestAnnotationForClass(FlywayTestExecutionListener.java:181)
    at org.flywaydb.test.FlywayTestExecutionListener.beforeTestClass(FlywayTestExecutionListener.java:160)
    at org.springframework.test.context.TestContextManager.beforeTestClass(TestContextManager.java:215)
    at org.springframework.test.context.junit.jupiter.SpringExtension.beforeAll(SpringExtension.java:76)
    at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$invokeBeforeAllCallbacks$7(ClassTestDescriptor.java:358)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
    at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.invokeBeforeAllCallbacks(ClassTestDescriptor.java:358)
    at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.before(ClassTestDescriptor.java:197)
    at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.before(ClassTestDescriptor.java:74)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:105)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
...

Wondering is there any timeline to support it? Thank you!

FlorianGWE commented 5 years ago

My plan is that I start to migrate to "Flyway 6.0.beta" in the easter week. Currently I do not know all needed changes for 6.0.

Do you try to exclude from flyway-test-extensions the transitive Flyway dependency 5.2.1.

FlorianGWE commented 5 years ago

Postgress support must be part of Flyway it self.

Can you do a "clean" on your Postgress with the command line tool of Flyway?

FlorianGWE commented 5 years ago

for the upcoming flyway.test-extensions a feature branch exists https://github.com/flyway/flyway-test-extensions/tree/feature/version_6.0.0 that provides the correct dependencies.

I think that will not help you, because it is a internal problem between Postgress and Flyway and you have to look closer to the Flyway releases.