Upgrade issue to 0.22
Running on my test server to see if upgrade process from 0.11 to 0.22
During start of containers a migration is run automatically so I assume migrate is not needed anymore so I am not running
yarn database:migrate:prod
manually anymore
when i first run workspace-sync
i receive an error (see comment, too long message)
then I run command:prod upgrade-0.22
it also receives error:
if I then run workspace-sync
again it works and then I can run command:prod upgrade-0.22
again without error followed up with workspace-sync
without error.
Is this expected behaviour or is there a better way then just "rerun both commands twice"?
I noticed that if I run
before running workspace-sync
i seem to get around this "run twice" behaviour, is this the/a correct solution?15 Replies
Hi @π
Ήπ
°ππ
±π
΄π
΄, to migrate to 0.22 from 0.11, you would need to go through each minor versions
This can be a bit challenging, please ping me in DM and send me your dump and I can do that for you π
Still working on providing smooth upgrades but things move fast and it's hard to keep track of it
So that would be 0.12 0.20 and 0.22?
Does 0.12 have any similar commands to upgrade-0.22? I think I saw upgrade-0.20
If possible i'd rather just script the "real upgrade" instead of dumping and fixing it on a dump
I ran through all the upgrades instead and it worked out much better in the end. Thank you for your suggestion.
Thank you @charles
so all good? π
Yes, going through the different versions and also running the fix commands available in those versions (for examle "upgrade-0.22:fix-object-metadata-id-standard-id" ) made it smooth.
I basically:
1. Start with Dockerimage of version+1
2. migrate
3. ran fix commands
4. ran forced workspace-sync
5. Checked health and if not v0.22 then goto 1
That's great! As the project stabilize, we might be able to upgrade without going through all versions but for now that's the best we can do without slowing too much the process ; we always make sure that we can smoothly upgrade from a minor version to the next one
How can I find out which are the fix commands for a specific version?
@charles When you say " we always make sure that we can smoothly upgrade from a minor version to the next one" how can I check the the upgrade process went smoothly ---- is there any command that returns the status of migration?
For example I raised this issue on Github: https://github.com/twentyhq/twenty/issues/6187 when trying to update from 0.20 to 0.21 and it didn't work out. This is why I'm trying to find out about how can I safely upgrade from one version to another(also before 0.21) and how can I make sure everything went smootly
GitHub
No TimeLine Events Β· Issue #6187 Β· twentyhq/twenty
Hi, For all v0.21.x of twentycrm for Any selected object there is No Event in TimeLine. I think is related to this: GraphQLError:relation "workspace_1tijfbhq4kpru5g3bwbr1anui.calendarEvent&quo...
I looked for them in src/packages/twenty/database.
There is a workspace health command to check health and workspace sync command that should be run as well (to my understanding) I can send you my ansible script when I'm back at work
(on mobile now so path above is only roughly correct from memory)
Thank you!
From what I understand @charles please correct me if I'm wrong. There are 3 major parts of upgrading.
1. DB migration which updates the meta data structure
2. Workspace sync which makes sure your database matches the meta data structure
3. Various fix commands that correct issues that came from earlier versions that can't be part of the above structure
1. is automatic by environment variable but can be run manually.
2. needs to be run manually on upgrade
3. Needs to be run "sometimes" depending on data from earlier versions. When issues are found they are added so the fix i mentioned was added in 0.21.x to correct, I assume, an issue that was found during 0.21.x being latest version
There are definetly details I'm missing but this is my current outsider perspective
@mnbro
Here is the part of my ansible script that is looped over with different versions to upgrade
These fix commands was most likely not ALL needed but I did not feel the need to eliminate which ones were redundant since they donΒ΄t exactly break anything either.
@π
Ήπ
°ππ
±π
΄π
΄ I have no words that could describe my appreciation for your help! Thank you very much!
Do remind yourself that I'm a clueless user and everything I say is based on flawed assumptions, guesswork and reading documentation & code