mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 08:48:01 +00:00
UBERF-8504: Fix DocSyncInfo in transactions (#6998)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
f1bee10ebb
commit
8bd62ecede
@ -444,7 +444,8 @@ export class ApplyOperations extends TxOperations {
|
|||||||
constructor (
|
constructor (
|
||||||
readonly ops: TxOperations,
|
readonly ops: TxOperations,
|
||||||
readonly scope?: string,
|
readonly scope?: string,
|
||||||
readonly measureName?: string
|
readonly measureName?: string,
|
||||||
|
isDerived?: boolean
|
||||||
) {
|
) {
|
||||||
const txClient: Client = {
|
const txClient: Client = {
|
||||||
getHierarchy: () => ops.client.getHierarchy(),
|
getHierarchy: () => ops.client.getHierarchy(),
|
||||||
@ -460,7 +461,7 @@ export class ApplyOperations extends TxOperations {
|
|||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super(txClient, ops.user)
|
super(txClient, ops.user, isDerived ?? false)
|
||||||
}
|
}
|
||||||
|
|
||||||
match<T extends Doc>(_class: Ref<Class<T>>, query: DocumentQuery<T>): ApplyOperations {
|
match<T extends Doc>(_class: Ref<Class<T>>, query: DocumentQuery<T>): ApplyOperations {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Copyright © 2023 Hardcore Engineering Inc.
|
// 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 {
|
import {
|
||||||
tryMigrate,
|
tryMigrate,
|
||||||
tryUpgrade,
|
tryUpgrade,
|
||||||
@ -326,6 +326,12 @@ export const githubOperationPreTime: MigrateOperation = {
|
|||||||
{
|
{
|
||||||
state: 'migrate-missing-states',
|
state: 'migrate-missing-states',
|
||||||
func: migrateMissingStates
|
func: migrateMissingStates
|
||||||
|
},
|
||||||
|
{
|
||||||
|
state: 'remove-doc-sync-info-txes',
|
||||||
|
func: async (client) => {
|
||||||
|
await client.deleteMany(DOMAIN_TX, { objectClass: github.class.DocSyncInfo })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user