After successfully migrating a 5x database to 6x, I ran the dspace database info command and noticed one migration was "ignored"
| 4.9.2015.10.26 | DS-2818 registry update | | Ignored |
It seems that it is acceptible for the flyway migration to fix
DS-2818 to be ignored. However, running the database validate command throws an error:
bin/dspace database validate
Database URL: jdbc:postgresql:Attempting to validate database status (and migration checksums) via FlywayDB...
org.flywaydb.core.api.FlywayException: Validate failed: Detected resolved migration not applied to database: 4.9.2015.10.26
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Discussed during today's developer meeting in IRC, Tim Donohue notes:
"The validation script literally just runs Flyway's 'validate' command. It might throw errors on ignored migrations...not sure. If so, maybe we should see if there's a way to tell Flyway's 'validate' that ignored migrations are 'warnings' instead."
And further suggests:
"Also, if it really bugs you locally, you could run "./dspace database migrate ignored" (which runs any old migrations flagged as ignored). In this scenario it won't hurt, as that old migration will be a noop. But, it's best to not generally run migrations "out of order" (which is what that does)"