Update to 0.50 failed

Hello I updated and launched usual commands: yarn database:migrate:prod QueryFailedError: check constraint "onboarded_workspace_requires_default_role" of relation "workspace" is violated by some row (the rest in attached file) yarn command:prod upgrade (...) [Nest] 297 - 03/28/2025, 8:58:26 AM LOG [UpgradeCommand] Running command on workspace 7823fcc0-feff-4ae5-8555-86c42cf82b6c 1/1 [Nest] 297 - 03/28/2025, 8:58:27 AM LOG [UpgradeCommand] Upgrading workspace 7823fcc0-feff-4ae5-8555-86c42cf82b6c 1/1 [Nest] 297 - 03/28/2025, 8:58:27 AM WARN [UpgradeCommand] Error in workspace 7823fcc0-feff-4ae5-8555-86c42cf82b6c: WORKSPACE_VERSION_NOT_DEFINED workspace=7823fcc0-feff-4ae5-8555-86c42cf82b6c [Nest] 297 - 03/28/2025, 8:58:27 AM ERROR [UpgradeCommand] Error in workspace 7823fcc0-feff-4ae5-8555-86c42cf82b6c: WORKSPACE_VERSION_NOT_DEFINED workspace=7823fcc0-feff-4ae5-8555-86c42cf82b6c [Nest] 297 - 03/28/2025, 8:58:27 AM ERROR [UpgradeCommand] undefined Any idea how to solve this ?
12 Replies
Prastoin
Prastoin6d ago
Coucou @Weiko, it seems to be related to permission default role ID ? Do you have one ? ( Idea )
Weiko
Weiko6d ago
Hi @greg [iero], you'll need to run upgrade:0-44:initialize-permissions first, it seems your workspace does not have a default role Ideally using the upgrade command for 0-44 directly if you haven't done yet
greg [iero]
greg [iero]OP6d ago
Thanks @prastoin & @Weiko ! yarn command:prod upgrade:0-44:initialize-permissions Resolved the default role id permission and yarn database:migrate:prod run now without error. But I still have a WORKSPACE_VERSION_NOT_DEFINED problem: /app/packages/twenty-server $ yarn command:prod upgrade [Nest] 3134 - 03/28/2025, 9:34:37 AM LOG [InstanceLoader] AuthModule dependencies initialized [Nest] 3134 - 03/28/2025, 9:34:37 AM LOG [UpgradeCommand] Running command on workspace 7823fcc0-feff-4ae5-8555-86c42cf82b6c 1/1 [Nest] 3134 - 03/28/2025, 9:34:37 AM LOG [UpgradeCommand] Upgrading workspace 7823fcc0-feff-4ae5-8555-86c42cf82b6c 1/1 [Nest] 3134 - 03/28/2025, 9:34:37 AM WARN [UpgradeCommand] Error in workspace 7823fcc0-feff-4ae5-8555-86c42cf82b6c: WORKSPACE_VERSION_NOT_DEFINED workspace=7823fcc0-feff-4ae5-8555-86c42cf82b6c [Nest] 3134 - 03/28/2025, 9:34:37 AM ERROR [UpgradeCommand] Error in workspace 7823fcc0-feff-4ae5-8555-86c42cf82b6c: WORKSPACE_VERSION_NOT_DEFINED workspace=7823fcc0-feff-4ae5-8555-86c42cf82b6c [Nest] 3134 - 03/28/2025, 9:34:37 AM ERROR [UpgradeCommand] undefined [Nest] 3134 - 03/28/2025, 9:34:37 AM LOG [UpgradeCommand] Command completed! Any idea ?
Prastoin
Prastoin6d ago
No worries @greg [iero] Yes it seems like you haven't run a succesful 0.44 migration, from my point of view, you have two possibilities: - Rollback to 0.43 and re-run the upgrade command ( Recommended ) -> should set, the expected way your workspace version - Manually set in database your workspaces versions to 0.44.19 ( be sure to follow valid semver, patch value has not importance )
greg [iero]
greg [iero]OP6d ago
I've manualy setup the workspace version to 0.44.19 in the db and rerun the command. No error 🙂 Now everything seems fine! Thanks, you rock guys!
Prastoin
Prastoin6d ago
Sounds good ! your workspace version should now be 0.50.2 ? ( after upgrade to 0.50 version )
greg [iero]
greg [iero]OP6d ago
0.50.1
Prastoin
Prastoin6d ago
Yeah that's also good
greg [iero]
greg [iero]OP6d ago
I use docker, so maybe I need to wait for 50.2
Prastoin
Prastoin6d ago
Double checked, lol my bad there is no 0.50.2 ( for the moment :p )
greg [iero]
greg [iero]OP6d ago
Thanks again, have a great day!
Prastoin
Prastoin6d ago
You too ! enjoy coding

Did you find this page helpful?