Closed nsg closed 1 year ago
I need to handle the potential breaking change in the database, I have considered the following things:
With that in mind I'm pushing a pre-refresh
hook that checks the database for duplicate asset paths. If they exists the refresh will be aborted leaving the user at a older (but working) version until he or she has manually fixed the state.
If you run snap refresh
interactively you will see:
error: cannot perform the following tasks:
- Run pre-refresh hook of "immich-distribution" snap if present (run hook "pre-refresh":
-----
There are duplicate assets originalPath in the database.
You need to manually fix this, the update is blocked until this is fixed.
For more information see: https://github.com/immich-app/immich/issues/2931#issuecomment-1605396092
Run 'sudo immich-distribution.psql -d immich' to query the database.
The affected assets are:
originalPath | count
--------------------------------------------------------------+-------
upload/library/admin/2020/2020-05-01/IMG_20200501_151923.jpg | 2
(1 row)
-----)
Two installs are still at v1.60, these systems has apparently automatic updates turned off. There is no way for me to know when they updates so I will move forward and release this to stable now.
Message
This release adds this constraint to the database:
It appears that this column is non-unique on a few installations, I guess this could be true for Immich Distribution installations as well. The official fix suggest that you lists conflicts in the database, delete these assets from the database and re-import the files.
Stages
./update.sh old-tag new-tag
like./update.sh v1.52.1 v1.53.0
to diff a few select files and make relevant changes.