Fix workspace upgrade (#426)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2021-11-29 22:19:03 +07:00 committed by GitHub
parent b3c0db92c3
commit 0800f97f3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,7 @@ export async function upgradeWorkspace (mongoUrl: string, dbName: string, client
const result = await db.collection(DOMAIN_TX).deleteMany({
objectSpace: core.space.Model,
modifiedBy: core.account.System,
_class: { $ne: contact.class.EmployeeAccount }
objectClass: { $ne: contact.class.EmployeeAccount }
})
console.log(`${result.deletedCount} transactions deleted.`)
@ -115,7 +115,7 @@ export async function dumpWorkspace (mongoUrl: string, dbName: string, fileName:
resolve(null)
})
})
const minioDbLocation = dbName + '.minio'
const minioDbLocation = fileName + '.minio'
if (!existsSync(minioDbLocation)) {
await mkdir(minioDbLocation)
}