Updating MySQL database schema on update

124 Views Asked by At

We have an embedded Linux device running a MySQL instance and we have periodic updates for the system where all software, the entire system image, will be replaced on a reboot, but any previously written data stays intact. At some point we may decide that there is one thing or another incorrect in the schema for the database and decide a modification is in order. Given that there is an update service that runs on bootup after the image is replaced, but before the MySQL instance starts up, how could we make updates to the schema in a reliable and manageable way that does not require manual intervention and keeps the schema in line with the version of software on new images. For instance, some devices might be offline for a long time and not receive intermediate updates with schema changes, but will download the latest system image always. How can you version the schema and keep devices consistent with the latest version?

0

There are 0 best solutions below