From a8c91993def96d243e3f88e6a73492c5a0b34be8 Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Wed, 8 May 2024 22:17:35 +0500 Subject: [PATCH] Remove outdated migration (#5551) Signed-off-by: Denis Bykhov --- models/recruit/src/migration.ts | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/models/recruit/src/migration.ts b/models/recruit/src/migration.ts index fd63d05a4f..3bbf4d6db1 100644 --- a/models/recruit/src/migration.ts +++ b/models/recruit/src/migration.ts @@ -14,23 +14,23 @@ // import { getCategories } from '@anticrm/skillset' -import core, { DOMAIN_TX, type Status, TxOperations, type Ref } from '@hcengineering/core' +import core, { DOMAIN_TX, TxOperations, type Ref, type Status } from '@hcengineering/core' import { - type ModelLogger, createDefaultSpace, createOrUpdate, tryMigrate, tryUpgrade, type MigrateOperation, type MigrationClient, - type MigrationUpgradeClient + type MigrationUpgradeClient, + type ModelLogger } from '@hcengineering/model' import tags, { type TagCategory } from '@hcengineering/model-tags' import task, { DOMAIN_TASK, createSequence, migrateDefaultStatusesBase } from '@hcengineering/model-task' -import { type Applicant, recruitId } from '@hcengineering/recruit' +import { recruitId, type Applicant } from '@hcengineering/recruit' -import recruit from './plugin' import { DOMAIN_SPACE } from '@hcengineering/model-core' +import recruit from './plugin' import { defaultApplicantStatuses } from './spaceType' export const recruitOperation: MigrateOperation = { @@ -64,16 +64,6 @@ export const recruitOperation: MigrateOperation = { const tx = new TxOperations(client, core.account.System) await createDefaults(client, tx) } - }, - { - state: 'remove-members', - func: async (client): Promise => { - const ops = new TxOperations(client, core.account.System) - const docs = await ops.findAll(recruit.class.Vacancy, { members: { $exists: true, $ne: [] } }) - for (const d of docs) { - await ops.update(d, { members: [] }) - } - } } ]) }