Prepare workspace for search features at creation (#7467)
Enabling feature flags IsSearchEnabled and IsWorkspaceMigratedForSearch at workspace creation to ensure workspaces have the searchVector fields and indexes created. For the feature to be enabled in the front-end we will also need IsQueryRunnerTwentyORMEnabled to be enabled but that is an independent topic.
This commit is contained in:
@ -46,4 +46,17 @@ export class FeatureFlagService {
|
||||
|
||||
return workspaceFeatureFlagsMap;
|
||||
}
|
||||
|
||||
public async enableFeatureFlags(
|
||||
keys: FeatureFlagKey[],
|
||||
workspaceId: string,
|
||||
): Promise<void> {
|
||||
await this.featureFlagRepository.upsert(
|
||||
keys.map((key) => ({ workspaceId, key, value: true })),
|
||||
{
|
||||
conflictPaths: ['workspaceId', 'key'],
|
||||
skipUpdateIfNoValuesChanged: true,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user