Openmrs upgrade error on database description

I am upgrading openmrs from 2.0.6 version to 2.3.2 on Ubuntu linux server. After deploying openmrs.war it get stuck at database updates. From the log file I have come across error bellow. Does it mean the update want to change the table description? and how do I fix it?

WARNING 11/17/20 5:20 PM:liquibase: modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case

Sorry for the error! Kindly always use to share your error logs.

ok I have done that.

1 Like

Update the database script file on this path by: Opening the /api/src/main/resources/liquibase-update-to-latest.xml file then add your update to the end using liquibase’s format for updates. See the liquibase manual for more information.

This path is not found

/api/src/main/resources/liquibase-update-to-latest.xml .

From the website liquibase manual it look like an application. How will this help with the running openmrs upgrade because after producing the above error openmrs is stuck it does not continue upgrading.

@jerome24 can you share the contents of the database table named liquibasechangeloglock?

Hi Daniel, This table is empty mysql> select * from liquibasechangeloglock; Empty set (0.00 sec).

I think the error come from the table liquibasechangelog.

liquibasechangelog.csv (242.6 KB)

Add one row to the liquibasechangeloglock table as per this sql statement:


Then restart your OpenMRS instance.

I have added the row and restart Openmrs but i think it is stuck somewhere else.

Is it still stuck? Can you share the current log?

Yes it is still stuck.

Is the browser showing anything?

This is what the browser shows

It is still executing this changeset.

You probably have a big number of records in the obs table, hence the longer you will have to wait for it and a few obs related changesets below it.

yes obs table is big. It is more than 2.5GB . So I just need to wait? But from the log file why does it seems like it is stuck.

Yes you just need to wait. It could take hours. I have seen some big databases where it takes days. It logs the changesets one by one after executing each. So it will log the next changeset only after finishing the currently executing one.

Ok thank you. Let me wait see.

I am getting an error from the log file. Does it mean the upgrade is stuck or continue?

This looks like it is still running. Do you see any serious activity on your MySQL database?