Use postgres addon with immich hacks exposed as service api

This commit is contained in:
Johannes Zellner
2024-03-06 16:59:26 +01:00
parent d77285f2c4
commit 3de1c6e499
2 changed files with 1 additions and 11 deletions

View File

@@ -620,16 +620,6 @@ async function update(app, args, progressCallback) {
await progressCallback({ percent: 60, message: 'Updating addons' });
await services.setupAddons(app, updateConfig.manifest.addons);
// hack for immich pgvecto_rs migration remove with next version
// if (app.appstoreId === 'app.immich.cloudronapp' && updateConfig.manifest.version === '1.55.0') {
if ((app.appStoreId === 'app.immich.cloudronapp' || updateConfig.manifest.id === 'app.immich.cloudronapp') && updateConfig.manifest.version === '1.55.0') {
console.log('i ====> RUNNING IMMICH POSTGRES MIGRATION HOOK');
await progressCallback({ percent: 65, message: 'Updating pgvectors extension for immich' });
const { database, username } = services._postgreSqlNames(app.id);
execSync(`docker exec postgresql /app/code/immich_migrate_pgvectors.sh ${database} ${username}`);
// execSync(`docker exec postgresql psql -U root --dbname=${database} -c "ALTER SCHEMA vectors OWNER TO ${username}"`);
}
await progressCallback({ percent: 70, message: 'Creating container' });
await createContainer(app);