mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-22 11:43:34 +03:00
Fix SimplifySearchVectorExpressionCommand (#8218)
## Context This command was introduced to simplify searchVector expressions that were added in v0.31.x for existing workspaces. New search vector columns have been added later during 0.32 development and should not be migrated, this actually breaks the command because we run sync-metadata before the upgrade command. The fix removes the throw since this is expected and return early if the search vector was not matched with an object that needs migration. ## Test checkout v0.31.0 reset:db command checkout this PR run typeorm migrations run upgrade 0-32 command
This commit is contained in:
parent
c7c16f7114
commit
d19bc2c224
@ -79,11 +79,10 @@ export class SimplifySearchVectorExpressionCommand extends ActiveWorkspacesComma
|
||||
fieldsUsedForSearch = SEARCH_FIELDS_FOR_OPPORTUNITY;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw new Error(
|
||||
`search vector has unexpected standardId: ${searchVectorField.standardId}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (fieldsUsedForSearch.length === 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
await this.searchService.updateSearchVector(
|
||||
|
Loading…
Reference in New Issue
Block a user