T
Twenty3w ago
Rob

Upgrade from v0.40.8 to v0.41.4 fails due to column "createdByContext" of relation does not exist

has anyone found a solution to the issue raised in the issue: https://github.com/twentyhq/twenty/issues/9969 ? When executing yarn command:prod upgrade-0.41 I get the error QueryFailedError: column "createdByContext" of relation "task" does not exist (I have attached the error in the log/output). Thanks!
GitHub
Endless loading after update to 0.41.1 · Issue #9969 · twentyhq/twe...
The latest update breaks everything again. I updated to 0.41.1 using the latest tag. Since there are no specific instructions in the documentation, I ran the usual command: yarn database:migrate:pr...
5 Replies
thomast
thomast2w ago
Hi! did you run yarn database:migrate:prod first as suggested here https://twenty.com/developers/section/self-hosting/upgrade-guide#v0.40.0-to-v0.41.0 ?
Rob
RobOP2w ago
Yes. I did. I also tried running it a few times. Any other suggestions? Thanks It seems several people have the same issue based on the GitHub issue.
thomast
thomast2w ago
@Guillaume could you have a look? 🙏
Guillaume
Guillaume2w ago
Hello, Could you try to do this command yarn command:prod upgrade-0.41:add-context-to-actor-composite-type Because this command is supposed to add the context to every single object in your database that has a "createdBy" column. And IMO your problem is that your "tasks" object probably is missing the context column in your DB. This command should fix that.
thiel
thiel2w ago
I tried that: [Nest] 452873 - 02/12/2025, 6:40:38 PM ERROR [AddContextToActorCompositeTypeCommand] Error for workspace: 35fc1aa0-8cbd-4b05-887f-f3756fdae4db [Nest] 452873 - 02/12/2025, 6:40:38 PM ERROR [AddContextToActorCompositeTypeCommand] TypeORMError: Table "workspace_3721ymu0vgv4cznrw0n3rn93v.workflow" does not exist. [Nest] 452873 - 02/12/2025, 6:40:38 PM LOG [AddContextToActorCompositeTypeCommand] Command completed!

Did you find this page helpful?