Skip to content

Commit

Permalink
Update boolean field command to skip workspace instead of throwing (t…
Browse files Browse the repository at this point in the history
…wentyhq#6196)

as per title
  • Loading branch information
ijreilly authored and Faisal-imtiyaz123 committed Jul 10, 2024
1 parent 5ad81cb commit 509f448
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -115,9 +116,10 @@ export class UpdateBooleanFieldsNullDefaultValuesAndNullValuesCommand extends Co

for (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
Expand Down

0 comments on commit 509f448

Please sign in to comment.