Upgrade to v0.23.0 failing
Hi @charles hope you and team are doing well!
I'm running into issues with the v0.23.0 migration following the upgrade guide on the docs page.
-
yarn database:migrate:prod
✅
- yarn command:prod workspace:sync-metadata -f
❌
I'm receiving the following errors after running the second command:
Any help would be appreciated, thanks!102 Replies
cc @Weiko , you probably have more context on 0.23
If it helps, I'm all for wiping out the troublesome "demoUrl" attribute.
There were some other errors related to profile pictures and workspace avatars and attachments missing as well. I'm also open to resetting those to defaults and wiping all attachments to get this up and running again.
Hi @Skyfox675, that's weird, this one seems to be a custom field, the sync command should ignore those. Did you rename an existing standard-field by any chance? If we check in the field-metadata table, does demoUrl have isCustom: false or a standardId?
@Weiko sorry for the late reply, late getting home from the office..
Ok so assuming my psql game isn't too rust 😅 , it looks like
demoUrl
has isCustom=f
and standardId IS NULL
Ok so that's the issue. demoUrl is not a standard field. isCustom should be true. If you change its value to true it should be ignored by the sync command
It shouldn't be false though, I'm not sure what happened. Did you create this field via the UI? Or updated it by any chance?
I've guaranteed only made data model changes via the UI, I'm not looking for trouble 😂
I did start on v0.10 when first starting to use Twenty. I recently found a misconfiguration with my deployment that wasn't persisting .local-data correctly. So I may have missing data that may still be referenced in the database. Happy to wipe out all of those entries if needed for missing data.
I did originally start by extending the standard Company object via the UI and adding attributes specific to my business/processes there, until @charles highly recommended not doing this (thank you btw) and as of v0.20.0 I added an
Automation
Custom Object that has all of these custom fields. But I don't remember if demoUrl is on the standard Company, or both (Automation and Company)
FYI I do have daily pg_dumps available should we need to restore anythingI see! Well, hard to tell, I don't see any other report / bugs related to custom fields having the wrong isCustom value. I'll keep an eye on it. Did the rest succeed for you?
We changed the model a lot these last few months but we are trying to make upgrade easier after each update.
Let me know if you still have any issue
Would you mind providing the exact psql query I should run to change the field value, I can work it out myself if it's too much, would rather be safer though if it's something easy for you to share
@Skyfox675
Should do the trick
Amazing, thank you, running now 🙏
So now if you try the command, it should not pick it up during the sync
Giving it a shot now!
Looks like it failed on another field
invoicePortalLink
this did (or still does) reside on both Company and Automation. I believe though that for Automation since the introduction of Link types in 0.12 I removed the <type> from the attribute name so this might actually be the Company fieldProbably the same reason, I'm guessing this field has isCustom:false