You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Hsin-Ying Lee (Jira)" <ji...@apache.org> on 2020/11/03 06:09:00 UTC

[jira] [Commented] (NIFIREG-429) Flyway error when upgrading from older release to 0.8.0

    [ https://issues.apache.org/jira/browse/NIFIREG-429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17225157#comment-17225157 ] 

Hsin-Ying Lee commented on NIFIREG-429:
---------------------------------------

Hi [~bbende]

I'm suffering this issue too, and it only happened when non-empty registry upgrade to 0.8.0. the root cause is Flyway changed the default schema history table, as you mentioned

due to this issue only fix on 0.9.0+,

maybe we can provide some workaround solutions on [Migration Guidance|[https://cwiki.apache.org/confluence/display/NIFIREG/Migration+Guidance],]

add argument -Dspring.flyway.table=schema_version to nifi-registry.sh/nifi-registry.bat if users want to upgrade to 0.8.0

> Flyway error when upgrading from older release to 0.8.0
> -------------------------------------------------------
>
>                 Key: NIFIREG-429
>                 URL: https://issues.apache.org/jira/browse/NIFIREG-429
>             Project: NiFi Registry
>          Issue Type: Bug
>    Affects Versions: 0.8.0
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>            Priority: Major
>             Fix For: 0.9.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When taking an H2 database from 0.3.0 and dropping it into 0.8.0 or 0.9.0-SNAPSHOT, it produces the following error:
> {code:java}
> Caused by: org.flywaydb.core.api.FlywayException: Found non-empty schema(s) "PUBLIC" without schema history table! Use baseline() or set baselineOnMigrate to true to initialize the schema history table.
>         at org.flywaydb.core.Flyway$1.execute(Flyway.java:177)
>         at org.flywaydb.core.Flyway$1.execute(Flyway.java:149)
>         at org.flywaydb.core.Flyway.execute(Flyway.java:511)
>         at org.flywaydb.core.Flyway.migrate(Flyway.java:149)
>         at org.apache.nifi.registry.db.CustomFlywayMigrationStrategy.migrate(CustomFlywayMigrationStrategy.java:88)
>         at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:62)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)
>         ... 98 common frames omitted {code}
> Looks like the issue is because Flyway changed their default table name at some point.
> https://github.com/flyway/flyway/issues/1848
> The issue does not happen going from 0.7.0 to 0.8.0, or 0.3.0 to 0.7.0, which is probably because 0.8.0 changed the Flyway version from 5.x to 6.x.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)