Fix sync metadata script (#5253)
While troubleshooting self-hosting migration, we run into issues with sync-metadata script introduced by recent changes
This commit is contained in:
18
.vscode/launch.json
vendored
18
.vscode/launch.json
vendored
@ -33,6 +33,24 @@
|
|||||||
"internalConsoleOptions": "openOnSessionStart",
|
"internalConsoleOptions": "openOnSessionStart",
|
||||||
"console": "internalConsole",
|
"console": "internalConsole",
|
||||||
"cwd": "${workspaceFolder}/packages/twenty-server/"
|
"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/"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -23,6 +23,9 @@ const commonFieldPropertiesToIgnore = [
|
|||||||
'objectMetadataId',
|
'objectMetadataId',
|
||||||
'isActive',
|
'isActive',
|
||||||
'options',
|
'options',
|
||||||
|
'settings',
|
||||||
|
'joinColumn',
|
||||||
|
'gate',
|
||||||
];
|
];
|
||||||
|
|
||||||
const fieldPropertiesToStringify = ['defaultValue'] as const;
|
const fieldPropertiesToStringify = ['defaultValue'] as const;
|
||||||
@ -73,7 +76,7 @@ export class WorkspaceFieldComparator {
|
|||||||
standardObjectMetadata.fields,
|
standardObjectMetadata.fields,
|
||||||
{
|
{
|
||||||
shouldIgnoreProperty: (property, originalMetadata) => {
|
shouldIgnoreProperty: (property, originalMetadata) => {
|
||||||
if (['options', 'gate'].includes(property)) {
|
if (commonFieldPropertiesToIgnore.includes(property)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user