mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 19:11:33 +03:00
migration improvement (#5614)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
7128585f05
commit
d91c3e5a44
@ -368,6 +368,18 @@ async function migrateIssueStatuses (client: MigrationClient): Promise<void> {
|
||||
}
|
||||
}
|
||||
)
|
||||
await client.update(
|
||||
DOMAIN_TX,
|
||||
{
|
||||
objectClass: core.class.Status,
|
||||
'attributes.ofAttribute': tracker.attribute.IssueStatus
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
objectClass: tracker.class.IssueStatus
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
await client.update(
|
||||
DOMAIN_STATUS,
|
||||
@ -386,6 +398,10 @@ async function migrateIssueStatuses (client: MigrationClient): Promise<void> {
|
||||
export const trackerOperation: MigrateOperation = {
|
||||
async preMigrate (client: MigrationClient, logger: ModelLogger): Promise<void> {
|
||||
await tryMigrate(client, trackerId, [
|
||||
{
|
||||
state: 'fixIncorrectIssueStatuses',
|
||||
func: migrateIssueStatuses
|
||||
},
|
||||
{
|
||||
state: 'migrate-default-statuses',
|
||||
func: (client) => migrateDefaultStatuses(client, logger)
|
||||
@ -402,10 +418,6 @@ export const trackerOperation: MigrateOperation = {
|
||||
state: 'passIdentifierToParentInfo',
|
||||
func: passIdentifierToParentInfo
|
||||
},
|
||||
{
|
||||
state: 'fixIncorrectIssueStatuses',
|
||||
func: migrateIssueStatuses
|
||||
},
|
||||
{
|
||||
state: 'statusesToModel-2',
|
||||
func: migrateStatusesToModel
|
||||
|
Loading…
Reference in New Issue
Block a user