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:
[Nest] 551 - 08/06/2024, 12:14:56 PM WARN [SyncWorkspaceMetadataCommand] Workspace contains 7 issues, sync has been forced.
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [WorkspaceSyncMetadataService] Syncing standard objects and fields metadata
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [WorkspaceSyncMetadataService] Syncing standard objects and fields metadata
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [WorkspaceSyncObjectMetadataService] Comparing standard objects and fields metadata
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [WorkspaceSyncObjectMetadataService] Updating workspace metadata
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [WorkspaceSyncObjectMetadataService] Generating migrations
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [WorkspaceSyncObjectMetadataService] Saving migrations
[Nest] 551 - 08/06/2024, 12:14:56 PM ERROR [WorkspaceSyncMetadataService] Sync of standard objects failed with:
[Nest] 551 - 08/06/2024, 12:14:56 PM ERROR [WorkspaceSyncMetadataService] Error: Field demoUrl not found in originalObjectMetadata
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [SyncWorkspaceMetadataCommand] Finished synchronizing all active workspaces (1 workspaces).
[Nest] 551 - 08/06/2024, 12:14:56 PM WARN [SyncWorkspaceMetadataCommand] Workspace contains 7 issues, sync has been forced.
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [WorkspaceSyncMetadataService] Syncing standard objects and fields metadata
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [WorkspaceSyncMetadataService] Syncing standard objects and fields metadata
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [WorkspaceSyncObjectMetadataService] Comparing standard objects and fields metadata
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [WorkspaceSyncObjectMetadataService] Updating workspace metadata
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [WorkspaceSyncObjectMetadataService] Generating migrations
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [WorkspaceSyncObjectMetadataService] Saving migrations
[Nest] 551 - 08/06/2024, 12:14:56 PM ERROR [WorkspaceSyncMetadataService] Sync of standard objects failed with:
[Nest] 551 - 08/06/2024, 12:14:56 PM ERROR [WorkspaceSyncMetadataService] Error: Field demoUrl not found in originalObjectMetadata
[Nest] 551 - 08/06/2024, 12:14:56 PM LOG [SyncWorkspaceMetadataCommand] Finished synchronizing all active workspaces (1 workspaces).
Any help would be appreciated, thanks!
102 Replies
thomast
thomast5mo ago
cc @Weiko , you probably have more context on 0.23
Skyfox675
Skyfox675OP5mo ago
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.
Weiko
Weiko5mo ago
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?
Skyfox675
Skyfox675OP5mo ago
@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
Weiko
Weiko5mo ago
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?
Skyfox675
Skyfox675OP5mo ago
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 anything
Weiko
Weiko5mo ago
I 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
Skyfox675
Skyfox675OP5mo ago
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
Weiko
Weiko5mo ago
@Skyfox675
UPDATE "metadata"."fieldMetadata" SET "isCustom"=TRUE WHERE "name"='demoUrl';
UPDATE "metadata"."fieldMetadata" SET "isCustom"=TRUE WHERE "name"='demoUrl';
Should do the trick
Skyfox675
Skyfox675OP5mo ago
Amazing, thank you, running now 🙏
default=# UPDATE "metadata"."fieldMetadata" SET "isCustom"=TRUE WHERE "name"='demoUrl';
UPDATE 1
default=# SELECT "metadata"."fieldMetadata"."name","metadata"."fieldMetadata"."isCustom", "metadata"."fieldMetadata"."standardId" FROM "metadata"."fieldMetadata" WHERE "name"='demoUrl';
name | isCustom | standardId
---------+----------+------------
demoUrl | t |
(1 row)
default=# UPDATE "metadata"."fieldMetadata" SET "isCustom"=TRUE WHERE "name"='demoUrl';
UPDATE 1
default=# SELECT "metadata"."fieldMetadata"."name","metadata"."fieldMetadata"."isCustom", "metadata"."fieldMetadata"."standardId" FROM "metadata"."fieldMetadata" WHERE "name"='demoUrl';
name | isCustom | standardId
---------+----------+------------
demoUrl | t |
(1 row)
Weiko
Weiko5mo ago
So now if you try the command, it should not pick it up during the sync
Skyfox675
Skyfox675OP5mo ago
Giving it a shot now!
Skyfox675
Skyfox675OP5mo ago
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 field
Weiko
Weiko5mo ago
Probably the same reason, I'm guessing this field has isCustom:false
Skyfox675
Skyfox675OP5mo ago
No description
Weiko
Weiko5mo ago
I'm really curious now how all of this happened, maybe you were on a previous version that had this bug, I can't reproduce it The one that has false is the one on the company object maybe? Since company object is a standard object, maybe there was a bug 🤔
Skyfox675
Skyfox675OP5mo ago
I'll just be honest... I'm a serious bug 🧲 like weird shit just happens around me Like restraunts loosing internet access seconds before I tap-to-pay kind of weird shit so I'm really not suprised lol Since there's duplicate name fields or this one, is it safe to update both to t , assuming yes
Weiko
Weiko5mo ago
It is yes! Both should have true anyway
Skyfox675
Skyfox675OP5mo ago
done:
No description
Skyfox675
Skyfox675OP5mo ago
and another one... I'll work though this one as well really quick
Skyfox675
Skyfox675OP5mo ago
No description
Weiko
Weiko5mo ago
Here is the list of standard fields. https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids.ts More than a isCustom bool, we have a standard-id that we use to keep in sync those fields regardless of their names (which can change, where standard-ids won't) So in theory, all field-metadata that don't have a standard-id, should be isCustom: true
Skyfox675
Skyfox675OP5mo ago
sharepointUploadLink is fixed but hitting more weird shit, looks like a uique contstraint violation
query failed: INSERT INTO "metadata"."fieldMetadata"("id", "standardId", "objectMetadataId", "type", "name", "label", "defaultValue", "description", "icon", "options", "settings", "isCustom", "isActive", "isSystem", "isNullable", "workspaceId", "createdAt", "updatedAt") VALUES (DEFAULT,.....
query failed: INSERT INTO "metadata"."fieldMetadata"("id", "standardId", "objectMetadataId", "type", "name", "label", "defaultValue", "description", "icon", "options", "settings", "isCustom", "isActive", "isSystem", "isNullable", "workspaceId", "createdAt", "updatedAt") VALUES (DEFAULT,.....
Weiko
Weiko5mo ago
So this query
UPDATE metadata."fieldMetadata"
SET "isCustom" = true
WHERE "standardId" IS NULL;
UPDATE metadata."fieldMetadata"
SET "isCustom" = true
WHERE "standardId" IS NULL;
should work
Skyfox675
Skyfox675OP5mo ago
No description
Weiko
Weiko5mo ago
it's cut, do you have the rest? Ah
Skyfox675
Skyfox675OP5mo ago
Sorry huge output was trunacting
Weiko
Weiko5mo ago
From which version are you upgrading?
Skyfox675
Skyfox675OP5mo ago
Checking the git blame one sec last few bumps: 0.22.0 -> 0.22.1 -> 0.23.0
Weiko
Weiko5mo ago
From here https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids.ts, do you see any of those fields that you could have been created by yourself before and that could clash with the creation of new fields? easier with a blame https://github.com/twentyhq/twenty/blame/main/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids.ts That's something we are not really good at yet. If we introduce a new feature that needs the creation of a new table, we need to make sure the DB does not have already one with the same name. Since we allow users to create custom objects which in result creates a table, that name could have been already taken for the table (or the field/object/api) At least we should improve the error above. The unicity constraint you see throws an error directly from the DB/ORM, we should catch that and log the field that's being created
Skyfox675
Skyfox675OP5mo ago
So this'll fix the unique constraint issue, safe to run now?
Weiko
Weiko5mo ago
Sorry, this request was suggested because you had to update multiple fields isCustom. It seems you are done with that error now and the unicity constraint won't be fixed by this query because it's based on the ['name', 'objectMetadataId', 'workspaceId'] columns regardless of the isCustom column
Skyfox675
Skyfox675OP5mo ago
So far suspect field names: - domain - stage
Skyfox675
Skyfox675OP5mo ago
List of isCustom=TRUE:
Skyfox675
Skyfox675OP5mo ago
Just as a note I use deal(s) and lead(s) instead of opportunity(s) those do share many of the same field names as the Opportunity object
Weiko
Weiko5mo ago
Mmm, should be fine since the constraint is based on the name and the object so it won't fail if Opportunity and deal have the same fields I don't see anything wrong with your fields. If you wait for a bit I will try to push a change that will improve the error
Skyfox675
Skyfox675OP5mo ago
Absolutely, thank you for the support, I really appreciate it
charles
charles5mo ago
@Skyfox675 do you still need support here? 🙂
Skyfox675
Skyfox675OP5mo ago
Yes please, waiting on a more verbose query error on the duplicate key constraint @charles not sure if you saw my reply, thanks!
charles
charles5mo ago
oh yes! I've faced this non verbose issue too (logger is a bit too silent). I'm pushing a patch in 0.23 tonight to get more verbose logs, will ping you
Skyfox675
Skyfox675OP5mo ago
I did just notice that v0.23.1 was pushed like 6 days ago lol I'll wait for your message though on next steps
charles
charles5mo ago
Logs have been improved, I'm still working on the patch, will ping you today
Skyfox675
Skyfox675OP5mo ago
Thank you!!
charles
charles5mo ago
Hi @Skyfox675 sorry for the long dealy, the patch has been published and includes more verbose logs!
Skyfox675
Skyfox675OP5mo ago
Thank you! No worries 🙂 updating now and will grab the new error logs yarn command:prod workspace:sync-metadata -f
error: error: duplicate key value violates unique constraint "IndexOnNameObjectMetadataIdAndWorkspaceIdUnique"
[Nest] 128 - 08/22/2024, 12:56:09 PM ERROR [WorkspaceSyncMetadataService] Sync of standard objects failed with:
[Nest] 128 - 08/22/2024, 12:56:09 PM ERROR [WorkspaceSyncMetadataService] QueryFailedError: duplicate key value violates unique constraint "IndexOnNameObjectMetadataIdAndWorkspaceIdUnique"
[Nest] 128 - 08/22/2024, 12:56:09 PM ERROR [WorkspaceSyncMetadataService] Key (name, "objectMetadataId", "workspaceId")=(objectMetadataId, e0f94b08-826c-4382-9252-205e051de179, 1eee8d72-e48c-47b1-a2de-13dd5c75458f) already exists.
[Nest] 128 - 08/22/2024, 12:56:09 PM LOG [SyncWorkspaceMetadataCommand] Finished synchronizing all active workspaces (1 workspaces).
error: error: duplicate key value violates unique constraint "IndexOnNameObjectMetadataIdAndWorkspaceIdUnique"
[Nest] 128 - 08/22/2024, 12:56:09 PM ERROR [WorkspaceSyncMetadataService] Sync of standard objects failed with:
[Nest] 128 - 08/22/2024, 12:56:09 PM ERROR [WorkspaceSyncMetadataService] QueryFailedError: duplicate key value violates unique constraint "IndexOnNameObjectMetadataIdAndWorkspaceIdUnique"
[Nest] 128 - 08/22/2024, 12:56:09 PM ERROR [WorkspaceSyncMetadataService] Key (name, "objectMetadataId", "workspaceId")=(objectMetadataId, e0f94b08-826c-4382-9252-205e051de179, 1eee8d72-e48c-47b1-a2de-13dd5c75458f) already exists.
[Nest] 128 - 08/22/2024, 12:56:09 PM LOG [SyncWorkspaceMetadataCommand] Finished synchronizing all active workspaces (1 workspaces).
charles
charles5mo ago
In your DB, what does e0f94b08-826c-4382-9252-205e051de179 objectMetadata.Id corresponds to (metadata.objectMetadata table)
Skyfox675
Skyfox675OP5mo ago
Looks like auditLog
No description
charles
charles5mo ago
Ok! could you show me the fieldMetadata having objectMetadataId = 'e0f94b08-826c-4382-9252-205e051de179' (the fields of auditLog) I suspect that the standardId of the "objectMetadataId" field of auditLog is wrong (it's confusing because the field itself is named objectMetadataId :p )
Skyfox675
Skyfox675OP5mo ago
My psql is very rusty lol so it'll be a min to grab the tables
charles
charles5mo ago
the standardId of this "objectMetadataId" field should be: '20202020-127b-409d-9864-0ec44aa9ed98' I think it's different on your end the standardId identifies a given standard field, during metadata-sync we use it to understand if we need to update or create a field here we are trying to create this field so the standardId must be wrong (different than then one we have in code base)
charles
charles5mo ago
No description
Skyfox675
Skyfox675OP5mo ago
Interesting! Ok sounds good so we need to check the fieldMetadata table where objectMetadataId = 'e0f94b08-826c-4382-9252-205e051de179'?
Skyfox675
Skyfox675OP5mo ago
No description
charles
charles5mo ago
yes could you change the standardId of the "objectMetadataId" field displayed on your screenshot? on your screenshot you have two standardIds ending with 00a the second one (objectMetadataId) should be 20202020-127b-409d-9864-0ec44aa9ed98 I think it's an error we missed in an old version of Twenty (likely 0.20)
Skyfox675
Skyfox675OP5mo ago
How's this look? UPDATE "metadata"."fieldMetadata" SET "standardId"='20202020-127b-409d-9864-0ec44aa9ed98' WHERE "name"='objectMetadataId';
Skyfox675
Skyfox675OP5mo ago
Looks like same error, new field:
No description
Skyfox675
Skyfox675OP5mo ago
fieldMetadata matching that key:
No description
charles
charles5mo ago
Weird! It should be 20202020-d6de-4fd5-84dd-47f9e730368b ! oh ok! UPDATE "metadata"."fieldMetadata" SET "standardId"='20202020-127b-409d-9864-0ec44aa9ed98' WHERE "name"='objectMetadataId'; ==> this is wrong, you have updated all fields having "objectMetadataId" name that's why you are facing the new issue UPDATE "metadata"."fieldMetadata" SET "standardId"='20202020-127b-409d-9864-0ec44aa9ed98' WHERE "name"='objectMetadataId' AND objectMetadataId = 'xxxx' Actually, we only have two fields named "objectMetadataId", one on "AuditLog' and one on "View" For AuditLog you are fine For View you need to make it 20202020-d6de-4fd5-84dd-47f9e730368b as it was before your update
Skyfox675
Skyfox675OP5mo ago
Sorry catching up 😅 Sorry I'm not sure I"m following
Skyfox675
Skyfox675OP5mo ago
No description
charles
charles5mo ago
yep, update the "View target object" one to be 20202020-d6de-4fd5-84dd-47f9e730368b
Skyfox675
Skyfox675OP5mo ago
This feels off, mind double checking?: UPDATE "metadata"."fieldMetadata" SET "standardId"='20202020-127b-409d-9864-0ec44aa9ed98' WHERE "name"='objectMetadataId' AND objectMetadataId = '67dcb7ee-c385-48c5-864a-b463da21a696';
charles
charles5mo ago
same but with 20202020-d6de-4fd5-84dd-47f9e730368b
Skyfox675
Skyfox675OP5mo ago
UPDATE "metadata"."fieldMetadata" SET "standardId"='20202020-d6de-4fd5-84dd-47f9e730368b' WHERE "name"='objectMetadataId' AND objectMetadataId = '67dcb7ee-c385-48c5-864a-b463da21a696';
charles
charles5mo ago
LGTM! then, actually you should not run the sync-metadata just do: - yarn command:prod upgrade-0.23 (the sync-metadata is already included in this command)
Skyfox675
Skyfox675OP5mo ago
Something is up, 0 rows updated
charles
charles5mo ago
sorry! UPDATE "metadata"."fieldMetadata" SET "standardId"='20202020-d6de-4fd5-84dd-47f9e730368b' WHERE "id" = '67dcb7ee-c385-48c5-864a-b463da21a696';
Skyfox675
Skyfox675OP5mo ago
and statement is off just saw it that did it thanks!
charles
charles5mo ago
ok, before going further could you check what you have in metadata workspaceMigration table? do you have any row with applyAt = null? (I'm making sure you don't have anything stuck as you faced issue during the migration) If not you are good, you can run yarn command:prod upgrade-0.23 and it should work :p
Skyfox675
Skyfox675OP5mo ago
Looks from from where I'm sitting lol
No description
Skyfox675
Skyfox675OP5mo ago
4-5 file not found's, looks like migration failed for workspace:
No description
Skyfox675
Skyfox675OP5mo ago
I don't need those attachments if it's easier to purge them, was doing testing with the attachments REST API
charles
charles5mo ago
damned 😄 the issue is that you don't have the correct messageChannel_syncstatus_enum I think it's a legacy issue on your workspace prior to 0.22 Could you run the following queries:
CREATE TYPE "${schema}"."messageChannel_syncStatus_enum" AS ENUM (
'ONGOING',
'NOT_SYNCED',
'ACTIVE',
'FAILED_INSUFFICIENT_PERMISSIONS',
'FAILED_UNKNOWN'
);

ALTER TABLE "${schema}"."messageChannel" ALTER COLUMN "syncStatus" DROP DEFAULT;

ALTER TABLE "${schema}"."messageChannel" ALTER COLUMN "syncStatus" TYPE text;

UPDATE "${schema}"."messageChannel" SET "syncStatus" = 'ACTIVE' WHERE "syncStatus" = 'COMPLETED';

ALTER TABLE "${schema}"."messageChannel" ALTER COLUMN "syncStatus" TYPE "${schema}"."messageChannel_syncStatus_enum" USING "syncStatus"::text::"${schema}"."messageChannel_syncStatus_enum";

ALTER TABLE "${schema}"."messageChannel" ALTER COLUMN "syncStatus" SET DEFAULT NULL;

DROP TYPE "${schema}"."messageChannel_syncstatus_enum"
CREATE TYPE "${schema}"."messageChannel_syncStatus_enum" AS ENUM (
'ONGOING',
'NOT_SYNCED',
'ACTIVE',
'FAILED_INSUFFICIENT_PERMISSIONS',
'FAILED_UNKNOWN'
);

ALTER TABLE "${schema}"."messageChannel" ALTER COLUMN "syncStatus" DROP DEFAULT;

ALTER TABLE "${schema}"."messageChannel" ALTER COLUMN "syncStatus" TYPE text;

UPDATE "${schema}"."messageChannel" SET "syncStatus" = 'ACTIVE' WHERE "syncStatus" = 'COMPLETED';

ALTER TABLE "${schema}"."messageChannel" ALTER COLUMN "syncStatus" TYPE "${schema}"."messageChannel_syncStatus_enum" USING "syncStatus"::text::"${schema}"."messageChannel_syncStatus_enum";

ALTER TABLE "${schema}"."messageChannel" ALTER COLUMN "syncStatus" SET DEFAULT NULL;

DROP TYPE "${schema}"."messageChannel_syncstatus_enum"
replace ${schema} by your workspaceSchema
Skyfox675
Skyfox675OP5mo ago
No description
Skyfox675
Skyfox675OP5mo ago
CREATE TYPE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel_syncStatus_enum" AS ENUM (
'ONGOING',
'NOT_SYNCED',
'ACTIVE',
'FAILED_INSUFFICIENT_PERMISSIONS',
'FAILED_UNKNOWN'
);

ALTER TABLE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel" ALTER COLUMN "syncStatus" DROP DEFAULT;

ALTER TABLE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel" ALTER COLUMN "syncStatus" TYPE text;

UPDATE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel" SET "syncStatus" = 'ACTIVE' WHERE "syncStatus" = 'COMPLETED';

ALTER TABLE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel" ALTER COLUMN "syncStatus" TYPE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel_syncStatus_enum" USING "syncStatus"::text::"workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel_syncStatus_enum";

ALTER TABLE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel" ALTER COLUMN "syncStatus" SET DEFAULT NULL;

DROP TYPE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel_syncstatus_enum"
CREATE TYPE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel_syncStatus_enum" AS ENUM (
'ONGOING',
'NOT_SYNCED',
'ACTIVE',
'FAILED_INSUFFICIENT_PERMISSIONS',
'FAILED_UNKNOWN'
);

ALTER TABLE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel" ALTER COLUMN "syncStatus" DROP DEFAULT;

ALTER TABLE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel" ALTER COLUMN "syncStatus" TYPE text;

UPDATE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel" SET "syncStatus" = 'ACTIVE' WHERE "syncStatus" = 'COMPLETED';

ALTER TABLE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel" ALTER COLUMN "syncStatus" TYPE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel_syncStatus_enum" USING "syncStatus"::text::"workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel_syncStatus_enum";

ALTER TABLE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel" ALTER COLUMN "syncStatus" SET DEFAULT NULL;

DROP TYPE "workspace_1txac8c4raz2nkwk4mmgyf4b3"."messageChannel_syncstatus_enum"
Here we go 🙂
charles
charles5mo ago
good! and then you can retry to upgrade
Skyfox675
Skyfox675OP5mo ago
Is there a missing ; on the last line?
charles
charles5mo ago
yes indeed
Skyfox675
Skyfox675OP5mo ago
sweet just wanted to double check, thanks!!!!
Skyfox675
Skyfox675OP5mo ago
No description
Skyfox675
Skyfox675OP5mo ago
Looks like the UPDATE had 0 items, is that ok?
charles
charles5mo ago
yes 🙂 it was just in case!
Skyfox675
Skyfox675OP5mo ago
Trying the upgrade again 🙂 Figured that was the case lol
Skyfox675
Skyfox675OP5mo ago
I think we're good? lol Figuring that the files can be ignored and I can hunt them down and delete the references and readd
No description
charles
charles5mo ago
yes we are good! great! is your Twenty up and running?
Skyfox675
Skyfox675OP5mo ago
Amazing thank you so much!! Checking now Looks like I've got a hung loading on /companies
charles
charles5mo ago
are you using redis?
Skyfox675
Skyfox675OP5mo ago
nope, just the db, server and worker so far
charles
charles5mo ago
ok, could you share your network tab? from your browser console
Skyfox675
Skyfox675OP5mo ago
sure thing
Skyfox675
Skyfox675OP5mo ago
All looks good there:
No description
Skyfox675
Skyfox675OP5mo ago
Seeing a GraphQL error in the pod logs on the server though:
No description
charles
charles5mo ago
mmmh oh yes
Skyfox675
Skyfox675OP5mo ago
Looks like it's this query:
No description
No description
charles
charles5mo ago
Ok so we have introduce new fields that are composite and composed of different subfields and the library we use to query the data (pg_graphql) has a limitation of the number of parmeters we can send (100) I think the issue is that you have too many fields or objects in your workspace could you share the whole query? query CombinedFindManyRecords... (in your screenshot, it's cropped in the middle by ...) The good news is that next week when we release the 0.24 we get rid of pg_graphql It has been a 6 months effort to get rid of it but here we are!
Skyfox675
Skyfox675OP5mo ago
I think I got it 🙂 So /settings is still working
charles
charles5mo ago
if you can disable some fields there you should be good
Skyfox675
Skyfox675OP5mo ago
was able to go into the Company data model and disable a bunch of fields I've moved to my new Automation object Just loaded up! I can break it to grab the query if you're interested still
charles
charles5mo ago
no it's fine! great! 0.24 will remove this limitation happy we figured this out! I promise it will become smoother and smoother
Skyfox675
Skyfox675OP5mo ago
Thank you so much, seriously couldn't have done this without both you and @Weiko really appreciate the help! Oh quick question while I have you 🙂 Can you confirm which storage paths should be persisted across pod restarts? - /app/docker-data - /app/packages/twenty-server/.local-storage Assuming both but wanted to double check
charles
charles5mo ago
both yes: - /app/docker-data: this one enables us to differentiate new setup from existing one to see if we need to initialize the database - /app/packages/twenty-server/.local-storage: this one is the storage for Twenty for files and future serverless functions (automations) if you choose to store them locally
Skyfox675
Skyfox675OP5mo ago
Amazing, thank you! @xSwampxFox @xSwampxFox (seriously figure out your accounts lol) ^here's your answer you need for your open PR 🙂
Want results from more Discord servers?
Add your server