Fixing changesets because upgrade from 1.10.6 to 1.11.8 fails


(Svitlana Honcharuk) #1

Seems like the things I’m struggling with are silly but I’ve already tried so much that I don’t even have any solutions left in my head. I’m working on TRUNK-5304 which is ‘Upgrade from 1.10.6 to 1.11.8 fails because of inconsistent changeset’.

I was able to reproduce the bug thanks to mentors’ help. Right now I’m trying to modify changesets to solve it. I’ve already tried just deleting bad changesets’ code (sadly it doesn’t work like this :joy:), deleting the preconditions which actually cause an error, adding <validCheckSum> tag with those checksums which maven gives, replacing <insert> tag with <dropTable> but none of it worked. Seems like the thing has to be somewhere in preconditions, but could you direct me what I should focus on to fix it?

In Talk thread people say I only have to delete the changesets from the liquibasechangelog table, but I have no idea how to do it and Google doesn’t help


(Daniel Kayiwa) #2

In your last sentence, are you looking for how to locate the “liquibasechangelog” table in the database?


(Svitlana Honcharuk) #3

I’m looking for the way to solve problem at all. But yes, right now the thing which I don’t understand is where “liquibasechangelog” table is located and how I can modify it


(Daniel Kayiwa) #4

Are you able to look at the database and its tables?


(Svitlana Honcharuk) #5

No. Where can I find it? I thought the thing is somewhere in liquibase-update-to-latest.xml file, isn’t it?


(Daniel Kayiwa) #6

Are you running the standalone version of OpenMRS?


(Svitlana Honcharuk) #7

I ran the standalone version. On ‘Database Changes’ page I could see that these changesets are marked as ALREADY_RAN. However, I still don’t get what can I do with this information


(Daniel Kayiwa) #8

Did you get a chance to look at how to access the underlying MySQL database using these instructions? https://wiki.openmrs.org/display/docs/OpenMRS+Standalone


(Svitlana Honcharuk) #9

I’ve accessed MySQL and now I can see what liquibasechangelog table looks like. As far as I understand, there are two ways to delete these bad changesets from it:

  • Delete them locally through MySQL command line which doesn’t make sense when solving a problem globally

  • Create a new changeset that would delete them

But I’m not sure whether this just-created changeset should be in 1.10.x branch or 1.11.x or both. Do I understand the thing correctly at all?


(Daniel Kayiwa) #10

Did you take a look at the solution that i proposed on the talk thread linked to the ticket?


(Svitlana Honcharuk) #11

I saw it but somehow didn’t put enough attention. Thank you for your patience, now seems like everything is clear for me!