T
Twenty3mo ago
thilles

Db issues from v0.52.11 to v0.53

Hi, I'm trying to do the update process 0.51 -> 0.52 -> 0.53 -> 0.54 -> 0.55 -> 0.60 -> 1.0 following the upgrade guide. Self-hosting on a VM using docker compose. 0.51 to 0.52 went like expected, and I can access twenty ui. But when trying to 0.53 I can't login anymore. I'm using Microsoft OIDC and the login screen just keeps kicking me back to the welcome modal. I think the problem lies with the database somehow.. Any pointers?
user:my-infra/ $ echo 'echo $APP_VERSION; exit' | docker exec -i twenty-server sh
v0.52.11
user:my-infra/ $ echo 'SELECT version FROM core.workspace;' | docker exec -i twenty-db psql -U postgres
ERROR: relation "core.workspace" does not exist
LINE 1: SELECT version FROM core.workspace;
^
user:my-infra/ $ echo 'echo $APP_VERSION; exit' | docker exec -i twenty-server sh
v0.52.11
user:my-infra/ $ echo 'SELECT version FROM core.workspace;' | docker exec -i twenty-db psql -U postgres
ERROR: relation "core.workspace" does not exist
LINE 1: SELECT version FROM core.workspace;
^
5 Replies
Prastoin
Prastoin3mo ago
Hello @thilles, indeed core.workspace should always exist Could you please restore a 0.51 backup and try to search for your workspace version ? Are you also upgrading to either vMAJOR.MINOR or latest patch version each time ( for example not taking v0.52.0 but v0.52 )
thilles
thillesOP3mo ago
found a mistake in the exec command, hadn't added the -d default option so it seems like both reported ok on 0.52.11
user:crm/ (main✗) $ echo 'SELECT version FROM core.workspace' | docker exec -i twenty-db psql -U postgres -d default
version
---------
0.52.11
(1 row)

user:crm/ (main✗) $ echo 'echo $APP_VERSION; exit' | docker exec -i twenty-server sh
v0.52.11
user:crm/ (main✗) $ echo 'SELECT version FROM core.workspace' | docker exec -i twenty-db psql -U postgres -d default
version
---------
0.52.11
(1 row)

user:crm/ (main✗) $ echo 'echo $APP_VERSION; exit' | docker exec -i twenty-server sh
v0.52.11
using tags v0.52, v0.53 etc I tried now v0.53, and have this
user:crm/ (main✗) $ echo 'echo $APP_VERSION; exit' | docker exec -i twenty-server sh

v0.53.8
user:crm/ (main✗) $ echo 'SELECT version FROM core.workspace' | docker exec -i twenty-db psql -U postgres -d default
version
---------
0.52.11
(1 row)
user:crm/ (main✗) $ echo 'echo $APP_VERSION; exit' | docker exec -i twenty-server sh

v0.53.8
user:crm/ (main✗) $ echo 'SELECT version FROM core.workspace' | docker exec -i twenty-db psql -U postgres -d default
version
---------
0.52.11
(1 row)
seeing this from the logs when trying to run yarn command:prod upgrade manually on 0.53.8 ERROR [UpgradeCommand] Error in workspace 3ac342ae-513a-4667-836a-ee2b7ede53cc: Field metadata settings are missing for field workflow found this, that worked! ⭐ https://discord.com/channels/1130383047699738754/1381926650828292096/1381936725370077214
Prastoin
Prastoin3mo ago
Perfect ! Congrats ! Please double check that your workspace version got upgraded to v0.53 before continuing upgrading !
thilles
thillesOP3mo ago
Yeah it was all good! At 1.0.2 now!
Prastoin
Prastoin3mo ago
Cool ! Bravo

Did you find this page helpful?