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: [] }) - } - } } ]) }