Skip to content

Commit

Permalink
Fix sync metadata script (twentyhq#5253)
Browse files Browse the repository at this point in the history
While troubleshooting self-hosting migration, we run into issues with
sync-metadata script introduced by recent changes
  • Loading branch information
charlesBochet authored May 2, 2024
1 parent 8d90c60 commit 3015f4c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,24 @@
"internalConsoleOptions": "openOnSessionStart",
"console": "internalConsole",
"cwd": "${workspaceFolder}/packages/twenty-server/"
},
{
"name": "twenty-server - command debug example",
"type": "node",
"request": "launch",
"runtimeExecutable": "npx",
"runtimeVersion": "18",
"runtimeArgs": [
"nx",
"run",
"twenty-server:command",
"my-command",
"--my-parameter value",
],
"outputCapture": "std",
"internalConsoleOptions": "openOnSessionStart",
"console": "internalConsole",
"cwd": "${workspaceFolder}/packages/twenty-server/"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const commonFieldPropertiesToIgnore = [
'objectMetadataId',
'isActive',
'options',
'settings',
'joinColumn',
'gate',
];

const fieldPropertiesToStringify = ['defaultValue'] as const;
Expand Down Expand Up @@ -73,7 +76,7 @@ export class WorkspaceFieldComparator {
standardObjectMetadata.fields,
{
shouldIgnoreProperty: (property, originalMetadata) => {
if (['options', 'gate'].includes(property)) {
if (commonFieldPropertiesToIgnore.includes(property)) {
return true;
}

Expand Down

0 comments on commit 3015f4c

Please sign in to comment.