Upgrade Versions
This part indicates the procedure to follow to upgrade versions in Squash TM. There are two steps for every version upgrade:
- Update the database schema via upgrade scripts;
- Install the app's new version.
Focus
We highly recommend that you test the version upgrade in an iso-production environment before upgrading directly in production.
Standard Procedure
You must upgrade versions on two different levels: on the one hand, the database, and on the second hand, the app.
Upgrade versions in the database
- Download the new version of Squash TM;
- Extract the archive;
- Stop Squash TM;
- Dump the database to save it (please see part on Saves);
-
Run the upgrade version scripts (
<DBType>-upgrade-to-<xxx>.sql
) to update the database. Beware, the upgrade scripts must be run according to the database type and in the order of the versions. You must always go from the script that has the version number that is superior to the one of the Squash TM version you are using and stop at the one with the target version's number.Example:
To update from Squash TM 5.0.0 to Squash TM 7.2.X with a PostgreSQL database, you must run these scripts:postgresql-upgrade-to-6.0.0.sql
;postgresql-upgrade-to-7.0.0.sql
;postgresql-upgrade-to-7.1.0.sql
;postgresql-upgrade-to-7.2.0.sql
.
-
Ensure that the
squash-tm
user has the required privileges for the database. Give the user the privileges if necessary.In PostgreSQL:
In MariaDB:GRANT ALL PRIVILEGES ON DATABASE squashtm TO "squash-tm";
GRANT ALL ON squashtm.* TO 'squash-tm'@'localhost'; FLUSH PRIVILEGES;
Focus
For PostgreSQL databases, actions on the database such as saving, recovering, and running scripts must be done by the squash-tm
user and not by the postgres
user.
You can grant the squash-tm
user a superuser role to execute the upgrade scripts, and subsequently revoke this role.
Warning
Upgrade scripts must be run in version order. If the scripts are not run in order, you must restart the version upgrade from the save dump.
Upgrade the app
- After downloading the new version of Squash TM, install the extracted app to the desired location;
- Stop Squash TM;
- Keep a copy of the configuration files that are in the
conf
folder as well as a copy of the filestartup
that is in thebin
folder of the previous version of Squash; - Manually copy the information specific to the environment in the new Squash
startup
and configuration files. Save changes; - Retrieve and install the plugins compatible with the version of Squash in the
plugins
directory. Do not forget to remove the old versions; - Do not forget to put the license file in the sub-repository
license
of the repositoryplugins
; - Empty the tomcat cache files (in
tomcat-home/work
, deletetomcat
directory) and delete the content of thetmp
directory; - Start the new version of Squash;
- Ask users to clear their browsers' cache after the version upgrade to avoid any display problem.
Learn more
For more details on how to install Squash TM and plugins, please visit these pages: Install the app and Install plugins.
Docker Procedure
To upgrade versions of Squash TM with the Docker image, please read this page.