As you, the reader, found this article, it is likely that you want to manually migrate the ZITADEL PostgreSQL database to a new version.
Now, normally this step is being done by the zitadel setup
command with the --init-projections=true
flag but, as we all know since “2001: A Space Odyssey”, computers can’t be trusted - so you are either paranoid or something went terribly wrong.
For manually updating the database, we should first understand the structure a bit. So far, the Zitadel Team seems to use versioning for their tables - meaning they create a new table for every change instead of just altering the current table. This leads to some beautifully structured schemas full of tables like users6
, users7
and users8
up to users10
.