Upgrade embedded mysql version of openmrs-standalone

Hello house, how do I upgrade the mysql version of openmrs-standalone?

Do you mind sharing some background regarding why you wanna do that?

Thank you @dkayiwa. Some modules we want to deploy contain sql scripts in liquibase that reference mysql functions that are only available from mysql 5.5. The embeded mysql version of the referenceapp 2.7.0 does not have those functions. E.g now() function.

The standalone version of OpenMRS runs MySQL version 5.5.9

Thank you very much @dkayiwa. I just confirmed now, it is using mysql 5.5.9. This version of mysql does not allow you to use now() function as default value of a date field in a create table statement.

Use of the now() function as default value of a field in the “create table” statement is only supported from version mysql 5.6 up. How do we upgrade the embedded mysql in the openmrs 2.7.0 standalone to mysql 5.6 or 5.7.

Hi @brightoibe. I don’t think is necessarily about updating MySQL version. There might be a lot of reasons to why the OpenMRS-standalone version uses version 5.5.9. I think you may look for a way around your problem maybe with an alternative solution.

@brightoibe can you share the full create table sql statement?

Link to code set

The failure is coming from this line <column name="date_ended" type="TIMESTAMP" defaultValueDate="now()"/>

This is not supported by mysql 5.5.9

What happens when you replace defaultValueDate="now()" with defaultValueComputed="CURRENT_TIMESTAMP" ?