4. Update database¶
Some versions require updates to the database. Look through the list of database update scripts for MySQL and find a script for the database version you are updating to.
Database version number
Database version number corresponds to the
To find out which
ezpublish-kernel version you have, after running
composer update or
composer show ezsystems/ezpublish-kernel|grep versions.
During database update, you have to go through all the changes between your current version and your final version e.g. during update from v2.2 to v2.5 you have to perform all the steps from: <2.3, <2.4 and <2.5.
Start with the version closest to your current version:
- Updating from <1.7
- Updating from <1.13
- Updating from <2.2
- Updating from <2.3
- Updating from <2.4
- Updating from <2.5
- Updating from <3.0
- Updating from <3.1
Only after applying all changes your database will work properly.
Always back up your data before running any database update scripts.
After updating the database, clear the cache.
Do not use
--force argument for
psql commands when performing update queries.
If there is any problem during the update, it is best if the query fails immediately, so you can fix the underlying problem before you execute the update again.
If you leave this for later you risk ending up with an incompatible database, though the problems might not surface immediately.