mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-26 11:34:58 +02:00
UBERF-8259: Do not store system model into DB (#6716)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -1503,7 +1503,7 @@ export function devTool (
|
||||
.option('-w, --workspace <workspace>', 'Selected workspace only', '')
|
||||
.option('-c, --concurrency <concurrency>', 'Number of documents being processed concurrently', '10')
|
||||
.action(async (cmd: { workspace: string, concurrency: string }) => {
|
||||
const { mongodbUri, dbUrl } = prepareTools()
|
||||
const { mongodbUri, dbUrl, txes } = prepareTools()
|
||||
await withDatabase(mongodbUri, async (db, client) => {
|
||||
await withStorage(mongodbUri, async (adapter) => {
|
||||
const workspaces = await listWorkspacesPure(db)
|
||||
@@ -1521,7 +1521,7 @@ export function devTool (
|
||||
workspaceUrl: workspace.workspaceUrl ?? ''
|
||||
}
|
||||
|
||||
const { pipeline } = await getServerPipeline(toolCtx, mongodbUri, dbUrl, wsUrl)
|
||||
const { pipeline } = await getServerPipeline(toolCtx, txes, mongodbUri, dbUrl, wsUrl)
|
||||
|
||||
await migrateMarkup(toolCtx, adapter, wsId, client, pipeline, parseInt(cmd.concurrency))
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import core, {
|
||||
} from '@hcengineering/core'
|
||||
import { getMongoClient, getWorkspaceDB } from '@hcengineering/mongo'
|
||||
import { type Pipeline, type StorageAdapter } from '@hcengineering/server-core'
|
||||
import { connect, fetchModel } from '@hcengineering/server-tool'
|
||||
import { connect } from '@hcengineering/server-tool'
|
||||
import { jsonToText, markupToYDoc } from '@hcengineering/text'
|
||||
import { type Db, type FindCursor, type MongoClient } from 'mongodb'
|
||||
|
||||
@@ -123,7 +123,7 @@ export async function migrateMarkup (
|
||||
pipeline: Pipeline,
|
||||
concurrency: number
|
||||
): Promise<void> {
|
||||
const { hierarchy } = await fetchModel(ctx, pipeline)
|
||||
const hierarchy = pipeline.context.hierarchy
|
||||
|
||||
const workspaceDb = client.db(workspaceId.name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user