0.53 Field metadata settings are missing for field workspaceMember

@Jas0r @Badr
69 Replies
Prastoin
PrastoinOP3w ago
Hello there, if you're facing the Field metadata settings are missing for field workspaceMember while upgrading to 0.53 high chances that it means you've missed the 0.52 upgrade. First things first you need to retrieve your workspace version from your core.workspace table. If it's between 0.52.0 and 0.52.6 you will need to: - Manually update in database your workspace version to 0.51.0 ( in order for the 0.52 ugprade to run over your workspace ) - pull twenty's version 0.52.11 ( replace TAG env var value ) - run yarn database:migrate:prod - run yarn command:prod upgrade - Optionally double check that your workspace version is now correctly 0.52.11 Finally pull twenty's version 0.53 ( upgrade is not done automatically ) and check your workspace version is now correctly 0.53.X If you still face the error, unfortunately it might means your workspace got corrupted. Would recommend restoring a previous backup and apply the same process described above
Badr
Badr3w ago
Hi! I was successfully running v0.52.8 before upgrading to v0.53 today. Do you still recommend the flow you suggest? Trying to go through what you suggest, I can't update the db.
root@gp:~/infrastructure-deployment-files/twenty# docker exec -it 4ce4723c64fc /bin/sh
# psql -U postgres -l
List of databases
Name | Owner | Encoding | Locale Provider | Collate | Ctype | ICU Locale | ICU Rules | Access privileges
-----------+----------+----------+-----------------+------------+------------+------------+-----------+-----------------------
default | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | |
postgres | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | |
template0 | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
(4 rows)
root@gp:~/infrastructure-deployment-files/twenty# docker exec -it 4ce4723c64fc /bin/sh
# psql -U postgres -l
List of databases
Name | Owner | Encoding | Locale Provider | Collate | Ctype | ICU Locale | ICU Rules | Access privileges
-----------+----------+----------+-----------------+------------+------------+------------+-----------+-----------------------
default | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | |
postgres | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | |
template0 | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
(4 rows)
I was expecting to find a database related to twenty A \d in the shell after running # PGPASSWORD=xxxxx psql -h localhost -p 5432 -U postgres -d postgres returns Did not find any relations.
Prastoin
PrastoinOP3w ago
Should not be necessary It should be within default database Have you run both the migrate and upgrade command for your 0.52 upgrade ? Could you please share your upgrade logs ?
Badr
Badr3w ago
So I went ahead and did as you said, here are the upgrade logs.
Prastoin
PrastoinOP3w ago
Hey @Rob following your message from #🏡︱general
Taldres
Taldres3w ago
Hey, I'm getting the same error. I've upgraded from 0.51 to 0.52 and then to 0.53
Prastoin
PrastoinOP3w ago
Ok about to prio reproducing this in about 30 mins Would anyone be up for a call in order to check your instance please ? still unable to reproduce. Or if a good willing soul could share a backup that I could restore with the minimal repro would be lovely This errors occur because your workspace does not seem to have completed the MigrateRelationsToFieldMetadataCommand command done through the upgrade one. You can manually, starting from 0.52 ( also avaiable in 0.53 ), run using
yarn command:prod cache:flush
# Then
yarn command:prod upgrade:0-52:migrate-relations-to-field-metadata
yarn command:prod cache:flush
# Then
yarn command:prod upgrade:0-52:migrate-relations-to-field-metadata
Could you please share this command logs ? @Taldres @Badr
Taldres
Taldres3w ago
@prastoin thanks. But I'm running into Field metadata settings are missing for field workflow. I could open a new thread to this specific error, if needed
Prastoin
PrastoinOP3w ago
That's the same issue
Taldres
Taldres3w ago
Here are my logs
Prastoin
PrastoinOP3w ago
@Taldres could you please share the row matching this query please
SELECT id, "objectMetadataId", "type", name, "label", "defaultValue", description, icon, "isCustom", "isActive", "isSystem", "isNullable", "workspaceId", "createdAt", "updatedAt", "options", "standardId", settings, "isUnique", "isLabelSyncedWithName", "relationTargetFieldMetadataId", "relationTargetObjectMetadataId", "standardOverrides"
FROM metadata."fieldMetadata"
WHERE "name" = 'workflow' AND "workspaceId" = 'a2c6daa8-8616-4378-b0a4-9eba41071af0';
SELECT id, "objectMetadataId", "type", name, "label", "defaultValue", description, icon, "isCustom", "isActive", "isSystem", "isNullable", "workspaceId", "createdAt", "updatedAt", "options", "standardId", settings, "isUnique", "isLabelSyncedWithName", "relationTargetFieldMetadataId", "relationTargetObjectMetadataId", "standardOverrides"
FROM metadata."fieldMetadata"
WHERE "name" = 'workflow' AND "workspaceId" = 'a2c6daa8-8616-4378-b0a4-9eba41071af0';
Taldres
Taldres3w ago
ERROR: relation "metadata.fieldMetadata" does not exist
LINE 2: FROM metadata."fieldMetadata"
ERROR: relation "metadata.fieldMetadata" does not exist
LINE 2: FROM metadata."fieldMetadata"
Prastoin
PrastoinOP3w ago
Your metadata schema is empty ?
Badr
Badr3w ago
@prastoin happy to share a backup. I just sent you a friend request to share it in DM.
Prastoin
PrastoinOP3w ago
Hey @Rorschach in order to espace 0.52 please follow initial message process. please always do a backup before upgrading, and always upgrade to 0.52 agonistically of the patch
Rorschach
Rorschach3w ago
Hi prastoin, what does "agnostically of the patch" mean?
Prastoin
PrastoinOP3w ago
I wanted to mean that by pulling from the 0.52 mirror if a new patch is added it will get pulled automatically
Rorschach
Rorschach3w ago
Not 100% sure what you mean, but if it isn't that important, it should be fine I am unfamiliar with postgres (normally use maria), can you give me a suggestion of which section contains the required field to alter the version?
Rorschach
Rorschach3w ago
No description
Prastoin
PrastoinOP3w ago
No worries, should be located at default.core.workspace table in schemas
Rorschach
Rorschach3w ago
This is what I have under schemas, I can see nothing that looks relevant under 'core'
No description
Rorschach
Rorschach3w ago
Okay, this appears to be the correct place, where does the version number get entered?
No description
Prastoin
PrastoinOP3w ago
Depends on your database GUI/explorer but I would tend to think you can find an edit option ? What's the current value still ?
Rorschach
Rorschach3w ago
I'm looking around for a 'version' value but can't see one
Prastoin
PrastoinOP3w ago
Please double click on workspace table to see value I guess, what software are you using to iterate through your db ?
Rorschach
Rorschach3w ago
pgadmin
Rorschach
Rorschach3w ago
This is where I currently am
No description
Prastoin
PrastoinOP3w ago
Please run SELECT * from core.workspace; as query
Rorschach
Rorschach3w ago
Okay I found it I think
Prastoin
PrastoinOP3w ago
Please share the value
Rorschach
Rorschach3w ago
No description
Prastoin
PrastoinOP3w ago
Please pull latest 0.52 version by changing your .env TAG=0.52 To finally upgrade following https://twenty.com/developers/section/self-hosting/upgrade-guide#v0.51-to-v0.52 Nothing blocking here
Rorschach
Rorschach3w ago
Do I still amend the version within pgadmin to 0.51.0?
Rorschach
Rorschach3w ago
Running the upgrade commands without amending the version results in the following error
No description
Prastoin
PrastoinOP3w ago
No need Please run the migrate command before the upgrade
Rorschach
Rorschach3w ago
Hi, I did that (and just repeated the process to confirm)
Prastoin
PrastoinOP3w ago
What version are you using exactly ?
Rorschach
Rorschach3w ago
The twenty server container is 0.52
Prastoin
PrastoinOP3w ago
Have you restarted your containers ? Please review your workspace version in order to check if has been migrated to 0.52 My hunch is that you haven't refreshed your twenty instance to 0.52 correclty
Rorschach
Rorschach3w ago
I did a compose up with --force-recreate Worth noting only the server container has the 0.52 tag set
Rorschach
Rorschach3w ago
This is the set of container as they are now
No description
Rorschach
Rorschach3w ago
Database still reports 0.51.1
Prastoin
PrastoinOP3w ago
docker compose down docker compose up
Rorschach
Rorschach3w ago
That has already been done I will do it again though
Rorschach
Rorschach3w ago
Did a compose down, deleted unused images, compose up (redownloaded images), re-ran upgrade commands and had a different error
No description
dialnco
dialnco3w ago
did you migrated (dump & restore) dbs to new postgres?? remember having similar issues related to corrupt data state (had to repeat dumping and restoring a couple of times to fix)
Rorschach
Rorschach3w ago
Nope
Prastoin
PrastoinOP3w ago
Hey @Rorschach @dialnco is right since 0.42 we do not support spilo postgres image anymore please find official migration here https://twenty.com/developers/section/self-hosting/upgrade-guide#(option-2)-database-migration
Rorschach
Rorschach3w ago
Oh, I did this process at the time
Prastoin
PrastoinOP3w ago
from this screen looks like you still use spilo db
Rorschach
Rorschach3w ago
Will check this out later When doing the dump/restore, am I deleting the original database prior to doing the import?
dialnco
dialnco3w ago
dont delete the db! I recommend creating a new staging project and test if you can migrate your data successfully first to the new staging project with the new db. After you confirm your dump and restoration flow is successful then you can proceed to use your staging as your main.
Rorschach
Rorschach2w ago
Sorry dialnco, but I have no idea what you mean by "new staging project" After a bunch of failed attempts to migrate/upgrade/whatever, I now have a backup of the original db in a "databases_backup.sql" What exactly should I be doing with this to put something back into production ie) what version of Twenty should I spin up to be able to use this
matspi
matspi2w ago
I see the same errors. I restored a backup with version 0.52.0 and still cannot upgrade, nor is it working anymore with server-version 0.52.0. In the database I see that columns "relationTargetFieldMetadataId" and "relationTargetObjectMetadataId" are empty for all rows but 2. Any hints?
Prastoin
PrastoinOP2w ago
please use latest 0.52 patch version and double check your workspace version value
matspi
matspi2w ago
I use tag v0.52 of the docker image. I changed the version in the db by doing update core.workspace set version='0.51.0'; Still get
[Nest] 128 - 05/19/2025, 11:51:21 AM LOG [UpgradeCommand] Running command on workspace c73dbca2-bbc6-44e1-b4c0-07a2092714c0 1/1 Computing new Datasource for cacheKey: c73dbca2-bbc6-44e1-b4c0-07a2092714c0-26 out of 0 [Nest] 128 - 05/19/2025, 11:51:22 AM WARN [UpgradeCommand] Error in workspace c73dbca2-bbc6-44e1-b4c0-07a2092714c0: Field metadata settings are missing for field workspaceMember [Nest] 128 - 05/19/2025, 11:51:22 AM ERROR [UpgradeCommand] Error in workspace c73dbca2-bbc6-44e1-b4c0-07a2092714c0: Field metadata settings are missing for field workspaceMember [Nest] 128 - 05/19/2025, 11:51:22 AM ERROR [UpgradeCommand] undefined [Nest] 128 - 05/19/2025, 11:51:22 AM LOG [UpgradeCommand] Command completed!
Prastoin
PrastoinOP2w ago
You have to target a specific workspace in order to mutate the version Please double check the value of your workspace version before and after mutation attempt to assert it has been modified
matspi
matspi2w ago
I have only one workspace in the database:
twentycrm=# select count(*) from core.workspace ; count ------- 1 (1 row)
After the update, it is set to 0.51.0:
twentycrm=# select version from core.workspace; version --------- 0.51.0 (1 row)
Anit was 0.52.0 before
Rorschach
Rorschach2w ago
Also, during the import of my .sql file into postgres, it appears to be mostly successful aside from these error messages at the end... are these of any concern, or even related to the login message?
No description
Rorschach
Rorschach2w ago
Thanks in advance for any further input
Taldres
Taldres2w ago
@prastoin Hey 🙂 I'm at 0.54 rn 🙂 It worked for me to set the version in the workspace table row to 0.51 and metadataVersion to 51. After that I upgraded version to version
Prastoin
PrastoinOP2w ago
Glad to hear that @Taldres ! Congrats Enjoy coding !
Taldres
Taldres2w ago
Thanks for your time ✌️
Prastoin
PrastoinOP2w ago
GitHub
Upgrade from v0.52.11 to v0.53.0 failed · Issue #12030 · twentyhq...
I am currently on v52.11, trying to upgrade to v0.53.0, v0.53.2, and the latest (by changing the tag), all unsuccessful. root@hs3:~/twenty# docker compose down; docker compose up -d WARN[0000] The ...
rebelliouswhiz
Hi everyone, I just got some time today and am reviewing the solution. I think my issue is not the same. For the solution @Prastoin provide, it's more for: Error in workspace ...: Field metadata settings are missing for field people But my issue was originally: Error in workspace 22a31f1b-091e-4b2d-b0c7-2a2c02c4f847: Field c7f7233c-35be-48dd-a93f-de6e520267b8 of type RELATION is a many to one relation but does not have a join column name Totally different. I am in a kinda awkward situation checking if I should open up the issue again, or just checking.. I followed the instruction, and it was not helping my case. I am trying back-and-forth with the version to see if there's more clues I can get.
rebelliouswhiz
I was able to jump v0.53 from v0.52.11 and updated directly to v0.54.6, but when I try to log in to the system, I get this
No description
Prastoin
PrastoinOP7d ago
Hello @rebelliouswhiz you should never skip upgrading a version If you can't upgrade from a 0.52 backup high chances that it means your workspace got corrupted anterioraly after not being ugpraded incrementally
Antonio Pinto
Antonio Pinto5d ago
Hello Going from 0.52 to 0.53 and getting this:
WARN [UpgradeCommand] Error in workspace 9827aaba-3e8c-4bd0-9620-4fe3a1124e08: Field metadata settings are missing for field workflow
WARN [UpgradeCommand] Error in workspace 9827aaba-3e8c-4bd0-9620-4fe3a1124e08: Field metadata settings are missing for field workflow
What can I do?
Prastoin
PrastoinOP5d ago
GitHub
Upgrade from v0.52.11 to v0.53.0 failed `Field metadata setting...
I am currently on v52.11, trying to upgrade to v0.53.0, v0.53.2, and the latest (by changing the tag), all unsuccessful. root@hs3:~/twenty# docker compose down; docker compose up -d WARN[0000] The ...

Did you find this page helpful?