Remove outdated migration (#5551)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-05-08 22:17:35 +05:00 committed by GitHub
parent 7ee0b0060c
commit a8c91993de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<void> => {
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: [] })
}
}
}
])
}