Upgrade Versions
This part indicates the procedure to follow to upgrade versions in Squash TM. There are two steps for every version upgrade: first, update the database schema via upgrade scripts and second, 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 1.22.2 to Squash TM 4.0.0 with a PostgreSQL database, you must run these scripts:- postgresql-upgrade-to-1.22.3.sql
- postgresql-upgrade-to-1.22.5.sql
- postgresql-upgrade-to-2.00.0.sql
- postgresql-upgrade-to-2.1.0.sql
- postgresql-upgrade-to-3.0.0.sql
- postgresql-upgrade-to-4.0.0.sql
-
Ensure that the squash-tm user has the required privileges for the database. Give the user the privileges if necessary.
In PostgreSQL:GRANT ALL PRIVILEGES ON DATABASE squashtm TO "squash-tm";
In MariaDB:
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 give squash-tm user a superuser role to run the upgrade scripts and then remove this role form him.
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, download the app squash-tm and extract it to the desired location
- Download and extract the plugins compatible with this new version of Squash TM
- Stop Squash TM
- Keep a copy of the configuration files that are in the folder 'conf' as well as a copy of the file startup that is in the folder 'bin' folder of the previous version of squash-tm
- Manually copy the information specific to the environment in the new squash-tm's startup and configuration files. Save changes
- Install .jar files for all plugins in the repository 'plugins'. Delete the former plugins versions
- Don't forget to put the license file in the sub-repository 'license' of the repository 'plugins'
- Empty the tomcat cache files (in tomcat-home/work, delete "tomcat" directory) and delete the content of the "tmp" directory
- Start the new version of squash-tm
- Ask users to empty 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 et Install plugins
Docker Procedure
To upgrade versions of Squash TM with the Docker image, please read the documentation on Docker Hub.