Flyway migration errors when upgrading from 7.2.1 to 7.3

390 views
Skip to first unread message

Agustina Martinez

unread,
Jun 29, 2022, 10:18:14 AM6/29/22
to DSpace Technical Support
Hi all,

I am in the process of upgrading our DSpace test instance from 7.2.1 to 7.3 and I am encountering the following error when running the dspace database migrate command:

Database URL: jdbc:postgresql://sql-pri-05.ds.lib.cam.ac.uk:5432/dspace7_splittest

Migrating database to latest version... (Check dspace logs for details)

Migration exception:

java.sql.SQLException: Flyway migration error occurred

   at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:785)

   at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:672)

   at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:647)

   at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:233)

   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

   at java.base/java.lang.reflect.Method.invoke(Method.java:566)

   at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:277)

   at org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:133)

   at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:98)

Caused by: org.flywaydb.core.api.exception.FlywayValidateException: Validate failed: Migrations have failed validation

Migration checksum mismatch for migration version 6.0.2015.03.07

-> Applied to database : -1903686462

-> Resolved locally    : -169168287. Either revert the changes to the migration, or run repair to update the schema history.

Need more flexibility with validation rules? Learn more: https://rd.gt/3AbJUZE

   at org.flywaydb.core.Flyway$1.execute(Flyway.java:131)

   at org.flywaydb.core.Flyway$1.execute(Flyway.java:124)

   at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:214)

   at org.flywaydb.core.Flyway.migrate(Flyway.java:124)

   at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:772)

   ... 10 more


The migration that fails is Migration checksum mismatch for migration version 6.0.2015.03.07.

Running the database repair command, and then reattempt the database migrate command fixes the issue.


Best,

Agustina

Reply all
Reply to author
Forward
0 new messages