mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-24 17:30:03 +00:00
Remove outdated migration (#5551)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
7ee0b0060c
commit
a8c91993de
@ -14,23 +14,23 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import { getCategories } from '@anticrm/skillset'
|
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 {
|
import {
|
||||||
type ModelLogger,
|
|
||||||
createDefaultSpace,
|
createDefaultSpace,
|
||||||
createOrUpdate,
|
createOrUpdate,
|
||||||
tryMigrate,
|
tryMigrate,
|
||||||
tryUpgrade,
|
tryUpgrade,
|
||||||
type MigrateOperation,
|
type MigrateOperation,
|
||||||
type MigrationClient,
|
type MigrationClient,
|
||||||
type MigrationUpgradeClient
|
type MigrationUpgradeClient,
|
||||||
|
type ModelLogger
|
||||||
} from '@hcengineering/model'
|
} from '@hcengineering/model'
|
||||||
import tags, { type TagCategory } from '@hcengineering/model-tags'
|
import tags, { type TagCategory } from '@hcengineering/model-tags'
|
||||||
import task, { DOMAIN_TASK, createSequence, migrateDefaultStatusesBase } from '@hcengineering/model-task'
|
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 { DOMAIN_SPACE } from '@hcengineering/model-core'
|
||||||
|
import recruit from './plugin'
|
||||||
import { defaultApplicantStatuses } from './spaceType'
|
import { defaultApplicantStatuses } from './spaceType'
|
||||||
|
|
||||||
export const recruitOperation: MigrateOperation = {
|
export const recruitOperation: MigrateOperation = {
|
||||||
@ -64,16 +64,6 @@ export const recruitOperation: MigrateOperation = {
|
|||||||
const tx = new TxOperations(client, core.account.System)
|
const tx = new TxOperations(client, core.account.System)
|
||||||
await createDefaults(client, tx)
|
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: [] })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user