Issue Upgrading to 2.0.5

I was able to upgrade from 1.11.5 to 1.12.0 When I tried upgrading to 2.0.0 I ran into this error ???There was an error while updating the database to the latest. file: liquibase-update-to-latest.xml. Error: Migration failed for change set liquibase-update-to-latest.xml::201411101055-TRUNK-3386::pmuchowski:??? Unable to update the database. See server error logs for the full stacktrace. ??? liquibase-update-to-latest.xml : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ID FROMimportWHERE 1 = 0' at line 1??? ??? Caused By: Precondition Error??? ??? Reason: ??? ???:??? . Anybody who has experienced anything similar?

In your database, do you have a table named “import”?

Yeah we do,

Do a database backup, drop that table, and then try again.

I’ve come across similar error while running cohort module master branch on top of platform 2.1.2 database

I’ve tried the suggestion from @dkayiwa above but didn’t work.

@ibacher @corneliouzbett I suppose the issue might have been introduced by one of your recent changes to the module. I’d appreciate any suggestions of how to go about this.

Regards

@jechijoy Would you be able to post the exact error you see? That would be helpful in figuring out what’s broken (we don’t touch a table named “import” so it must at least differ in that respect).

@ibacher here is error log

Do you have an import_backup table? Maybe dropping that…

Actually that was the issue, I though renaming table import to something else, import_backup would do the trick but openmrs went ahead to check that table again.

I’ve just done a backup of that table and dropped it and it has worked.

@ibacher thanks a bunch

2 Likes