Updating the Platform

Keeping your Platform up to date is very straightforward. To do so SSH into your Droplet and run the following command from your installation folder to install the latest versions of the packages:

cd /var/www/laravel/

composer update

One thing to note is that composer will automatically get the latest patch release of the current version specified in the composer.json file located in the root of the install folder. This would be set at the time you ran composer require commands. Presently these will be a mix of v1.3.x and 1.2.x. If a new minor version is released (e.g. 1.2.x -> 1.3.0) then you will need to edit the composer.json file and update the version numbers for the enjin packages like so:

"enjin/platform-core": "^1.3",
"enjin/platform-fuel-tanks": "^1.3",
"enjin/platform-marketplace": "^1.3",
"enjin/platform-beam": "^1.3",
"enjin/platform-ui": "^1.2",

In composer, the ^ symbol tells the command to get the latest patch of the version tag specified, so ^1.3 will get any versions of the package starting at v1.3.0 but won't get anything starting at v1.4.0 and above.

It will be worth keeping an eye on the repos for when the minor/major versions of the packages change as these will usually coincide with blockchain upgrades as well.

Once you have updated composer it's best practice to run the migration command to apply any database changes that have been made in the latest versions. If no database changes were made then the migration will complete without altering anything. Run the migrations with:

php artisan migrate

Finally you will then need to restart both the queue worker and in the ingest commands so they also use the latest code.
If the Platform Decoder was also updated and rebuilt then it should also be restarted.