Depending on the installation method you chose, upgrading Imbo can be done quite easily. If you went for the recommended version you will only have to bump the version number in your custom
composer.json file and run
If you did a git clone you could simply do a
git pull to update your working copy.
From time to time Imbo will introduce new features or fix bugs that might require you to update the contents of the database you choose to use. This chapter will contain all information you need to keep your installation up to date. Each of the following sections include the necessary steps you need to execute when upgrading to the different versions.
Below are the changes you need to be aware of when upgrading to Imbo-1.2.0.
Versions prior to 1.2.0 contained the image identifier in the response to
HTTP POST/PUT/DELETE against the metadata resource. Starting from Imbo-1.2.0 the response to these requests will contain the metadata attached to the image instead. Read more about the different responses in the metadata resource section.
Imbo-1.2.0 includes a new feature that lets you filter images based on the original checksum of the image when querying the images resource. For this to work you need to add a field to your database. You can also populate this field for all images if you want, but this is not required. If you have event listeners that update incoming images, the values already stored in the database under the
checksum field (which is used to populate the
originalChecksum field in the following examples) might not be the checksum of the original image. If you don’t have such event listeners added to your configuration you should be able to update the data as explained below and end up with 100% correct results.
If you use the Doctrine database adapter you’ll need to add the new
originalChecksum field to the table. The field has also been added to the Database setup section. The field should be added while there are no write operations pending, as a write could fail before upgrading Imbo itself.
ALTER TABLE imageinfo ADD COLUMN `originalChecksum` char(32) COLLATE utf8_danish_ci NOT NULL;
When you have added the field to your database you can run the following query to update all rows in the database:
UPDATE `imageinfo` SET `originalChecksum` = `checksum`
This query will simply copy the value of the existing
checksum field over to
originalChecksum. If you have a lot of images this operation might take a while.
In versions prior to Imbo-1.2.0 short image URLs were created automatically whenever a user agent requested the image resource (with or without transformations), and sent in the response as the
X-Imbo-ShortUrl header. This no longer done automatically. Refer to the Short URLs resource - /users/<user>/images/<image>/shorturls section for more information on how to generate short URLs from this version on.