The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Update boolean field command to skip workspace instead of throwing (#6196)
Marie02e5c5ea9744
diff --git a/packages/twenty-server/src/database/commands/upgrade-version/0-22/0-22-update-boolean-fields-null-default-values-and-null-values.command.ts b/packages/twenty-server/src/database/commands/upgrade-version/0-22/0-22-update-boolean-fields-null-default-values-and-null-values.command.tsindex 1bbcef9caa4..b001e7c5e23 100644--- a/packages/twenty-server/src/database/commands/upgrade-version/0-22/0-22-update-boolean-fields-null-default-values-and-null-values.command.ts+++ b/packages/twenty-server/src/database/commands/upgrade-version/0-22/0-22-update-boolean-fields-null-default-values-and-null-values.command.ts@@ -76,9 +76,10 @@ export class UpdateBooleanFieldsNullDefaultValuesAndNullValuesCommand extends Co);if (!dataSourceMetadata) {- throw new Error(+ this.logger.log(`Could not find dataSourceMetadata for workspace ${workspaceId}`,);+ continue;}const workspaceDataSource =@@ -115,9 +116,10 @@ export class UpdateBooleanFieldsNullDefaultValuesAndNullValuesCommand extends Cofor (const booleanField of booleanFieldsWithoutDefaultValue) {if (!booleanField.object) {- throw new Error(+ this.logger.log(`Could not find objectMetadataItem for field ${booleanField.id}`,);+ continue;}// Could be done via a batch update but it's safer in this context to run it sequentially with the ALTER TABLE