Most releases of OpenVPMS provide a script to migrate from the previous version to the new version.
These are located in the <OPENVPMS_HOME>/update/db/ directory and are named migrate-1.x-to-1.y.sql, e.g. migrate-1.7-to-1.8.sql
To simplify upgrades:
- a tool should be provided that upgrades the database to the latest version.
- the web-app should abort if the database hasn't been upgraded
The upgrade tool will:
- be based on Flyway. This adds meta-data to the database to track the updates that have been applied
- will detect the existing version, if there is no Flyway meta-data, and initialise it
- prompt to run the upgrade if required. In particular, it should warn users that a backup is required before upgrade.
Flyway does support automatic upgrades, but for OpenVPMS this should be a manual process as it can take a long time.