UBERF-8504: Fix DocSyncInfo in transactions (#6998)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-10-21 10:16:40 +05:00
committed by GitHub
parent f1bee10ebb
commit 8bd62ecede
2 changed files with 10 additions and 3 deletions
@@ -2,7 +2,7 @@
// Copyright © 2023 Hardcore Engineering Inc.
//
import core, { toIdMap, type AnyAttribute, type Ref, type Status } from '@hcengineering/core'
import core, { DOMAIN_TX, toIdMap, type AnyAttribute, type Ref, type Status } from '@hcengineering/core'
import {
tryMigrate,
tryUpgrade,
@@ -326,6 +326,12 @@ export const githubOperationPreTime: MigrateOperation = {
{
state: 'migrate-missing-states',
func: migrateMissingStates
},
{
state: 'remove-doc-sync-info-txes',
func: async (client) => {
await client.deleteMany(DOMAIN_TX, { objectClass: github.class.DocSyncInfo })
}
}
])
},