Hi Jose, I wouldn't recommend removing the migration from that list unless it's a last resort. This is cause essentially you will have tables in your database that no longer match the FlywayDB migration list...and that could cause you some future upgrade headaches.
The easiest route here is to find the old migration and add it back in. If you really want to remove it, (I've never done that before with Flyway, as we never do that in DSpace development), but it seems like this StackOverflow answer may have clues: https://stackoverflow.com/questions/50173873/delete-migration-in-flyway Again, personally, I recommend finding the migration and restoring. That's a lot safer here. Once you start messing around too much at the Flyway level, we (DSpace developers) cannot help as much anymore, as you are no longer working in the DSpace code area...you are working at the Flyway / Database level. Tim ________________________________ From: [email protected] <[email protected]> on behalf of Jose Blanco <[email protected]> Sent: Monday, May 4, 2020 4:51 PM To: DSpace Technical Support <[email protected]> Subject: [dspace-tech] Re: issue upgrading db from 5.1 to 6.3 Thank you Tim. I wrote the previous email before I saw yours. I wonder if there is a way to get rid of a migration from the list. Thanks! Jose On Mon, May 4, 2020 at 5:49 PM Jose Blanco <[email protected]<mailto:[email protected]>> wrote: Is it because I'm missing the migration in this folder: dspace-api/src/main/java/org/dspace/storage/rdbms/migration On Mon, May 4, 2020 at 3:24 PM Jose Blanco <[email protected]<mailto:[email protected]>> wrote: I'm getting this error: >>> ./dspace database migrate 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:673) at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:576) at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:221) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:607) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81) Caused by: org.flywaydb.core.api.FlywayException: Validate failed: Detected applied migration not resolved locally: 5.0.2015.06.18 at org.flywaydb.core.Flyway.doValidate(Flyway.java:1008) at org.flywaydb.core.Flyway.access$100(Flyway.java:72) at org.flywaydb.core.Flyway$1.execute(Flyway.java:921) at org.flywaydb.core.Flyway$1.execute(Flyway.java:917) at org.flywaydb.core.Flyway.execute(Flyway.java:1373) at org.flywaydb.core.Flyway.migrate(Flyway.java:917) at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:662) >From running "./dspace database info" I see that I have: | 5.0.2015.06.18 | statistics-harvester | 2018-03-08 11:34:55 | Missing | Not sure what to do next. -Jose -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/ --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CAK%3DKc-s42id8pKY0H%2BDVBEUGXm%3DNB4fFGNofBCpYo3PR-T6JQA%40mail.gmail.com<https://groups.google.com/d/msgid/dspace-tech/CAK%3DKc-s42id8pKY0H%2BDVBEUGXm%3DNB4fFGNofBCpYo3PR-T6JQA%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/ --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/DM5PR2201MB1148F5923A4CE8D7EDF2B424EDA70%40DM5PR2201MB1148.namprd22.prod.outlook.com.
