[
https://issues.apache.org/jira/browse/FINERACT-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17117383#comment-17117383
]
Manoj edited comment on FINERACT-1008 at 5/27/20, 4:40 AM:
-----------------------------------------------------------
This issue is due to spring boot(flyway) version upgrade. Flyway might have
been upgraded skipping the version 4.x.
ref: [https://github.com/spring-projects/spring-boot/issues/12033]
[https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide#flyway]
catch: Solutions provided here either requires version downgrade and the
upgrade or a manual action. First solution is preferred, as it is automatic.
But still there is a pain, as it requires customers to upgrade even Fineract
linearly without skipping a version(the flyway downgrade one).
was (Author: fynmanoj):
This issue is due to spring boot(flyway) version upgrade. Flyway might have
been upgraded skipping the version 4.x.
ref: [https://github.com/spring-projects/spring-boot/issues/12033]
[https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide#flyway]
catch: Solutions provided here requires version downgrade and the upgrade, or
a manual action. First solution is preferred more as it is automatic. But
still there is a pain, as it requires customers to upgrade fineract linearly
without skipping a version(the flyway downgrade one) as well.
> Field 'version_rank' doesn't have a default value (blocking updates on
> fineract.dev)
> ------------------------------------------------------------------------------------
>
> Key: FINERACT-1008
> URL: https://issues.apache.org/jira/browse/FINERACT-1008
> Project: Apache Fineract
> Issue Type: Bug
> Affects Versions: 1.4.0
> Reporter: Michael Vorburger
> Priority: Blocker
> Fix For: 1.4.0
>
>
> See FINERACT-932 for general background; I'm currently seeing this in logs of
> https://www.fineract.dev, and it's preventing upgrading the demo to recently
> merged PRs:
> {noformat}Caused by: java.sql.SQLException: Field 'version_rank' doesn't have
> a default value
> at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException
> (SQLError.java:129)
> at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException
> (SQLError.java:97)
> at
> com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException
> (SQLExceptionsMapping.java:122)
> at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal
> (ClientPreparedStatement.java:953)
> at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal
> (ClientPreparedStatement.java:1092)
> at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal
> (ClientPreparedStatement.java:1040)
> at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate
> (ClientPreparedStatement.java:1347)
> at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate
> (ClientPreparedStatement.java:1025)
> at org.flywaydb.core.internal.jdbc.JdbcTemplate.update
> (JdbcTemplate.java:331)
> at
> org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.doAddAppliedMigration
> (JdbcTableSchemaHistory.java:163)
> at
> org.flywaydb.core.internal.schemahistory.SchemaHistory.addAppliedMigration
> (SchemaHistory.java:163)
> at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup
> (DbMigrate.java:384)
> at org.flywaydb.core.internal.command.DbMigrate.access$200
> (DbMigrate.java:54)
> at org.flywaydb.core.internal.command.DbMigrate$3.call
> (DbMigrate.java:282)
> at
> org.flywaydb.core.internal.jdbc.TransactionalExecutionTemplate.execute
> (TransactionalExecutionTemplate.java:66)
> at org.flywaydb.core.internal.command.DbMigrate.applyMigrations
> (DbMigrate.java:279)
> at org.flywaydb.core.internal.command.DbMigrate.migrateGroup
> (DbMigrate.java:244)
> 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.mysql.MySQLNamedLockTemplate.execute
> (MySQLNamedLockTemplate.java:60)
> at org.flywaydb.core.internal.database.mysql.MySQLConnection.lock
> (MySQLConnection.java:161)
> 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:199)
> at org.flywaydb.core.Flyway$1.execute (Flyway.java:159)
> at org.flywaydb.core.Flyway.execute (Flyway.java:530)
> at org.flywaydb.core.Flyway.migrate (Flyway.java:159)
> at
> org.apache.fineract.infrastructure.core.service.TenantDatabaseUpgradeService.upgradeAllTenants
> (TenantDatabaseUpgradeService.java:80){noformat}
> The "trigger" seems to have been the merge of [~fynmanoj]'s
> https://github.com/apache/fineract/pull/769 for FINERACT-893 by [~avikg]
> ([~avikganguly] ? [~avikganguly010] ??) but the
> {{core_db/V358__fixed_deposit_rollover_transfer.sql}} from that PR is
> unlikely to have caused this?
> Field {{version_rank}} which _doesn't have a default value_ appears to be in
> (Flyway's own!) {{schema_version}} table, defined in
> https://github.com/apache/fineract/blob/develop/fineract-db/mifospltaform-tenants-first-time-install.sql
> ... so is this an impact of and related to FINERACT-979 / FINERACT-810 ?
> (Perhaps that PR above was just the first time that we merged a PR with a
> schema migration after the Flyway upgrade?)
> I haven't been able to locally reproduce this though.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)