[jira] [Commented] (FINERACT-1008) Field 'version_rank' doesn't have a default value (blocking updates on fineract.dev)
[ https://issues.apache.org/jira/browse/FINERACT-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17120589#comment-17120589 ] Michael Vorburger commented on FINERACT-1008: - It took me a little longer than I thought it should and would to wrap up this problem (both because 1. I secured the DB running inside [https://www.fineract.dev|https://www.fineract.dev/] so well that it took me a moment to figure out how to run some SQL against it, from "outside"; and then 2. to find the right SQL required for this: {code:sql} show create table fineract_default.m_deposit_account_term_and_preclosure; alter table fineract_default.m_deposit_account_term_and_preclosure drop foreign key m_deposit_account_term_and_preclosure_ibfk_1; alter table fineract_default.m_deposit_account_term_and_preclosure drop column transfer_to_savings_account_id;{code} but I now have done so, and [https://demo.fineract.dev/fineract-provider/actuator/info] is again auto-updating and "in line" with the latest changes from https://github.com/apache/fineract/commits/develop. Thus Resolving this now. Thanks again [~fynmanoj] and [~ptuomola]. > 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 >Assignee: Manoj >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 >
[jira] [Commented] (FINERACT-1008) Field 'version_rank' doesn't have a default value (blocking updates on fineract.dev)
[ https://issues.apache.org/jira/browse/FINERACT-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17119805#comment-17119805 ] Manoj commented on FINERACT-1008: - Yes, the migration already executed successfully and did not apply the schema_version table due to the error. As this migration has a DDL statement, it did not get rolled back when system failed. So [~vorburger] I agree with you, there is nothing much to dig on it, lets mark the issue as fixed. > 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 >Assignee: Manoj >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 ? >
[jira] [Commented] (FINERACT-1008) Field 'version_rank' doesn't have a default value (blocking updates on fineract.dev)
[ https://issues.apache.org/jira/browse/FINERACT-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17119780#comment-17119780 ] Michael Vorburger commented on FINERACT-1008: - [~ptuomola] thanks for research!! [~fynmanoj] thanks for (now already merged) PR. > This piece of code can be removed later when all instances are updated. I think we'll probably want to keep this in "forever". https://demo.fineract.dev/fineract-provider/actuator/info is still "behind", on old 01e8014 from 3 days ago, because it fails to start new versions due to: {noformat}Migration V358__fixed_deposit_rollover_transfer.sql failed -- SQL State : 42S21 Error Code : 1060 Message: Duplicate column name 'transfer_to_savings_account_id' Location : sql/migrations/core_db/V358__fixed_deposit_rollover_transfer.sql (/app/sql/migrations/core_db/V358__fixed_deposit_rollover_transfer.sql) Line : 20 Statement : alter table m_deposit_account_term_and_preclosure add column transfer_to_savings_account_id bigint(20) DEFAULT NULL, add CONSTRAINT FOREIGN KEY (`transfer_to_savings_account_id`) REFERENCES `m_savings_account` (`id`){noformat} I suspect that this because it's in a "half way state", and the easiest to unblock and conclude this is probably if I manually drop the column, so I'll try to do this. Just for the record and for future searches, there was also another error in the logs of Fineract.dev: {noformat}java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [sql/migrations/core_db/V358__fixed_deposit_rollover_transfer.sql]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading (WebappClassLoaderBase.java:1385) at org.apache.catalina.loader.WebappClassLoaderBase.getResource (WebappClassLoaderBase.java:1038) at org.flywaydb.core.internal.resource.classpath.ClassPathResource.getUrl (ClassPathResource.java:83) at org.flywaydb.core.internal.resource.classpath.ClassPathResource.getAbsolutePathOnDisk (ClassPathResource.java:72) at org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException.getMessage (FlywaySqlScriptException.java:81) at ch.qos.logback.classic.spi.ThrowableProxy. (ThrowableProxy.java:54) at ch.qos.logback.classic.spi.ThrowableProxy. (ThrowableProxy.java:60) at ch.qos.logback.classic.spi.ThrowableProxy. (ThrowableProxy.java:60) at ch.qos.logback.classic.spi.ThrowableProxy. (ThrowableProxy.java:60) at ch.qos.logback.classic.spi.ThrowableProxy. (ThrowableProxy.java:60) at ch.qos.logback.classic.spi.ThrowableProxy. (ThrowableProxy.java:60) at ch.qos.logback.classic.spi.ThrowableProxy. (ThrowableProxy.java:60) at ch.qos.logback.classic.spi.ThrowableProxy. (ThrowableProxy.java:60) at ch.qos.logback.classic.spi.ThrowableProxy. (ThrowableProxy.java:60) at ch.qos.logback.classic.spi.ThrowableProxy. (ThrowableProxy.java:60) at ch.qos.logback.classic.spi.ThrowableProxy. (ThrowableProxy.java:60) at ch.qos.logback.classic.spi.ThrowableProxy. (ThrowableProxy.java:60) at ch.qos.logback.classic.spi.LoggingEvent. (LoggingEvent.java:119) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend (Logger.java:419) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus (Logger.java:383) at ch.qos.logback.classic.Logger.log (Logger.java:765) at org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog.error (LogAdapter.java:433) at org.springframework.boot.SpringApplication.reportFailure (SpringApplication.java:826) at org.springframework.boot.SpringApplication.handleRunFailure (SpringApplication.java:801) at org.springframework.boot.SpringApplication.run (SpringApplication.java:325) at org.springframework.boot.builder.SpringApplicationBuilder.run (SpringApplicationBuilder.java:140) at org.apache.fineract.ServerApplication.main (ServerApplication.java:63){noformat} but, as far as I can tell, this is "just" what happens when we fail to apply data migrations and can't start properly, the error handling in that particlar case seems like it's not perfect; personally I don't think it worth to sink time into fix this corner case. > 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 >
[jira] [Commented] (FINERACT-1008) Field 'version_rank' doesn't have a default value (blocking updates on fineract.dev)
[ https://issues.apache.org/jira/browse/FINERACT-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17119494#comment-17119494 ] Manoj commented on FINERACT-1008: - A Fix is provided for fixing the version issue with out any release downgrade or manual updates which involves moving all the existing schema_version data to a new table with updated structure. Checks are added so that this will happen only once and for only for old schema_version table. Corrections will be applied to `all available tenant dbs` and the fineract_tenant db as well. This piece of code can be removed later when all instances are updated. > 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 >Assignee: Manoj >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 >
[jira] [Commented] (FINERACT-1008) Field 'version_rank' doesn't have a default value (blocking updates on fineract.dev)
[ https://issues.apache.org/jira/browse/FINERACT-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17117383#comment-17117383 ] Manoj commented on FINERACT-1008: - 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] > 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
[jira] [Commented] (FINERACT-1008) Field 'version_rank' doesn't have a default value (blocking updates on fineract.dev)
[ https://issues.apache.org/jira/browse/FINERACT-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17117381#comment-17117381 ] Petri Tuomola commented on FINERACT-1008: - This Flyway upgrade is really a pain, isn't it! Reading through the issue: it seems that the problem is that you should not go directly from Flyway 4 to Flyway 6 as this breaks one of the Flyway tables. Instead, you should migrate first to Flyway 5. Three solutions are proposed: * Manually create the relevant tables with SQL and then run repair. I suppose we could do this, but running direct SQL from Gradle sort of defeats the whole point of Flyway * First migrate to Flyway 5, ensure that all databases are upgraded, and then only later upgrade to Flyway 6. But can we guarantee that everyone will download and use the version of Fineract that relies on Flyway 5 before using the version with Flyway 6? Probably not... * Manually download Flyway 5 and run it against the database as a standalone executable. But this requires setting up a separate config, classpath etc for Flyway 5 in the Gradle file (as well as some magic to work out when you should run this task) Personally I would probably take the easy way out and go back to Flyway 5 for 12 months or so... and then upgrade to latest version. Any thoughts? > 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
[jira] [Commented] (FINERACT-1008) Field 'version_rank' doesn't have a default value (blocking updates on fineract.dev)
[ https://issues.apache.org/jira/browse/FINERACT-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17116956#comment-17116956 ] Michael Vorburger commented on FINERACT-1008: - https://github.com/flyway/flyway/issues/1925 => https://github.com/spring-projects/spring-boot/issues/12033 ... I have not actually read that (long) issue - would someone else like to, and raise a PR to fix this Blocker issue for Fineract? > 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