[Microservices:DatabaseRepository] Migration

I have the following problem. I am a beginner. I had been running it for a long time. I wanted to do an update because the app was no longer working. However, the web client was working. Now, after trying to switch the database to vectorchord, I am having problems. Unfortunately, I don't know what to do next.
84 Replies
Immich
Immich3w ago
:wave: Hey @Casey-eXF, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time). 2. :ballot_box_with_check: read applicable release notes. 3. :ballot_box_with_check: reviewed the FAQs for known issues. 4. :ballot_box_with_check: reviewed Github for known issues. 5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy). 6. :ballot_box_with_check: uploaded the relevant information (see below). 7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed. Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
Casey-eXF
Casey-eXFOP3w ago
I stopped the immich server because it keeps restarting FYI
Sergey Katsubo
Hey! How is it going?
I wanted to do an update
Do you remember your previous version? There is an article link in the error message in logs, read through it:
2025/09/21 19:33:22 stderr microservices worker error: Error: Invalid upgrade path. For more information, see https://immich.app/errors#typeorm-upgrade, stack: Error: Invalid upgrade path. For more information, see https://immich.app/errors#typeorm-upgrade
Basically, this means you should upgrade to v1.132.3 first.
Casey-eXF
Casey-eXFOP2w ago
hey, i dont know the older version. i download now the v1.123.3 but can not upload to portainer or contain manager to use it. I now have to figure out how to upload the image so I can use it. I'm still researching that. FYI oh i found an old screenshot it can be v1.122.0
Mraedis
Mraedis2w ago
You can use docker exec immich_postgres psql -U postgres -d immich -c 'select version, "createdAt" from version_history' to check @Casey-eXF
Casey-eXF
Casey-eXFOP2w ago
thx for the answer, but i dont know how to put this command into. - container -> immich_postgres ? console -> command?
Mraedis
Mraedis2w ago
What are you using to host immich?
Casey-eXF
Casey-eXFOP2w ago
synology -> portainer.io(container manager)
Mraedis
Mraedis2w ago
In that case, on the portainer gui select the > (console) icon for the immich_postgres container
Casey-eXF
Casey-eXFOP2w ago
got it
Mraedis
Mraedis2w ago
and execute psql -U postgres -d immich -c 'select version, "createdAt" from version_history' as root
Casey-eXF
Casey-eXFOP2w ago
No description
Casey-eXF
Casey-eXFOP2w ago
So im happy my screenshot that i found was right... 1.122.0
Mraedis
Mraedis2w ago
Alright so, upgrade to 1.136 while applying the breaking changes for 133 https://github.com/immich-app/immich/discussions?discussions_q=label%3Achangelog%3Abreaking-change+sort%3Adate_created Then upgrade to latest
Casey-eXF
Casey-eXFOP2w ago
how can i step down to a older version do you have a link for me?
No description
Mraedis
Mraedis2w ago
You set IMMICH_VERSION=v1.136.0 in your .env file and then docker compose pull -d
Casey-eXF
Casey-eXFOP2w ago
check to be sure which container?
Mraedis
Mraedis2w ago
compose pull does all containers an right portainer, so just a stack update with the pull toggled
Casey-eXF
Casey-eXFOP2w ago
give me a sec - sorry I understand what I have to do, but I don't know where to enter the command. What I did, however, was to adjust the env file. But this is not being accepted, or at least it seems that way.
Mraedis
Mraedis2w ago
How do you have an env file on portainer? 😛
Casey-eXF
Casey-eXFOP2w ago
,
No description
Mraedis
Mraedis2w ago
You just
No description
Casey-eXF
Casey-eXFOP2w ago
here? 😄
Mraedis
Mraedis2w ago
and
No description
Casey-eXF
Casey-eXFOP2w ago
No description
Mraedis
Mraedis2w ago
Did you put .env instead of stack.env in your compose?
Casey-eXF
Casey-eXFOP2w ago
No description
Mraedis
Mraedis2w ago
in the compose itself immich releases use .env and not stack.env so if you've copy pasted that content you need to adjust for portainer
Casey-eXF
Casey-eXFOP2w ago
No description
Casey-eXF
Casey-eXFOP2w ago
ah i see i change it now the deployment progress is startet.. holy im so sorry whatever i have done ... all containers are gone
Casey-eXF
Casey-eXFOP2w ago
No description
Mraedis
Mraedis2w ago
Could you post your full compose You're just using a feature that is not available on such an old docker install
Mraedis
Mraedis2w ago
uh
Casey-eXF
Casey-eXFOP2w ago
Mraedis
Mraedis2w ago
You're not supposed to include the - the idea there is to remove all lines with - from database: and the ones with + are the replacements, but they also don't need the + at the front Like so:
database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
restart: always
database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
restart: always
Casey-eXF
Casey-eXFOP2w ago
okay - i change it
Mraedis
Mraedis2w ago
Er I accidentally included my personal config line there 😛 Fixed it @Casey-eXF it's the - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
Casey-eXF
Casey-eXFOP2w ago
done okay the stack is rebuild and starting
Casey-eXF
Casey-eXFOP2w ago
No description
Casey-eXF
Casey-eXFOP2w ago
postgres is still starting and server is still restarting
Mraedis
Mraedis2w ago
it's migrating can take a bit check the logs if you want to be sure
Casey-eXF
Casey-eXFOP2w ago
No description
Casey-eXF
Casey-eXFOP2w ago
looks good
No description
Mraedis
Mraedis2w ago
logs for server then? not really normal that it's stuck there
Casey-eXF
Casey-eXFOP2w ago
okay wth?
Casey-eXF
Casey-eXFOP2w ago
No description
Casey-eXF
Casey-eXFOP2w ago
No description
Mraedis
Mraedis2w ago
weird 👀
Mraedis
Mraedis2w ago
this was edited, yes?
No description
Casey-eXF
Casey-eXFOP2w ago
yeah thru the env file ? in the .env file is still this verison in it
Mraedis
Mraedis2w ago
why through the env file? The GUI is literally an editor for stack.env
Casey-eXF
Casey-eXFOP2w ago
okay so change in the gui and rebuild again 😄
Mraedis
Mraedis2w ago
choo choo
Casey-eXF
Casey-eXFOP2w ago
In Germany we say, “Not as punishment, but for practice.” 🤦‍♂️
Mraedis
Mraedis2w ago
You also say* Zwei Jager treffen, beide tot*
Casey-eXF
Casey-eXFOP2w ago
xDDDDDDDDD fml
Casey-eXF
Casey-eXFOP2w ago
No description
Casey-eXF
Casey-eXFOP2w ago
here we go but now i got a lot of more error in logs and still restarting server
Mraedis
Mraedis2w ago
But which errors
Casey-eXF
Casey-eXFOP2w ago
one sec.
Casey-eXF
Casey-eXFOP2w ago
No description
Mraedis
Mraedis2w ago
That's the sound of progress
Casey-eXF
Casey-eXFOP2w ago
But why does it restart every few seconds?
Mraedis
Mraedis2w ago
It means it's broken but different broken for the postgres container, go in the console > again This time execute psql -U postgres -d immich next \d+ geodata_places; and show the output
Casey-eXF
Casey-eXFOP2w ago
No description
Mraedis
Mraedis2w ago
ALTER TABLE geodata_places RENAME CONSTRAINT geodata_places_tmp_pkey TO geodata_places_pkey; that should output "ALTER TABLE" then just \q and exit the console
Casey-eXF
Casey-eXFOP2w ago
No description
Casey-eXF
Casey-eXFOP2w ago
so?
Mraedis
Mraedis2w ago
Nees to press enter first
Casey-eXF
Casey-eXFOP2w ago
after this picture is not possible to write in the window only the end is flashing
Casey-eXF
Casey-eXFOP2w ago
No description
Mraedis
Mraedis2w ago
Even if you press q
Casey-eXF
Casey-eXFOP2w ago
ah here we go
Casey-eXF
Casey-eXFOP2w ago
No description
Casey-eXF
Casey-eXFOP2w ago
now it works holy what a journey thank u a lot no more errors .. db is back in business and server is running
Mraedis
Mraedis2w ago
Don't forget to switch back to release
Casey-eXF
Casey-eXFOP2w ago
I will do it tomorrow Thank you and good night Thanks again for yesterday. I now understand a lot better and can grasp things better. However, I've found that the people don't appear in the app. They do appear in the web application, though. Is there anything else I need to do before I switch to release? Thanks in advance.
Mraedis
Mraedis2w ago
Where are you looking for them?
Casey-eXF
Casey-eXFOP2w ago
in the app - under library - persons its empty
Mraedis
Mraedis2w ago
And everything else works? 🤔 I'd just upgrade first really
Casey-eXF
Casey-eXFOP2w ago
yes everything else works perfect and in the web app also -> perfect Ok updated - persons in app backs case closed
Immich
Immich2w ago
This thread has been closed. To re-open, use the button below.

Did you find this page helpful?