mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 19:11:33 +03:00
Fix force move tool (#7110)
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
f5c0bed057
commit
d435a0db5a
@ -118,7 +118,9 @@ async function moveWorkspace (
|
||||
}
|
||||
if (toRemove.length > 0) {
|
||||
await retryTxn(pgClient, async (client) => {
|
||||
await client`DELETE FROM ${client(translateDomain(domain))} WHERE "workspaceId" = ${ws.workspace} AND _id IN (${client(toRemove)})`
|
||||
await client.unsafe(
|
||||
`DELETE FROM ${translateDomain(domain)} WHERE "workspaceId" = '${ws.workspace}' AND _id IN (${toRemove.map((c) => `'${c}'`).join(', ')})`
|
||||
)
|
||||
})
|
||||
}
|
||||
if (docs.length === 0) break
|
||||
|
@ -1687,7 +1687,7 @@ export function devTool (
|
||||
if (workspaceInfo === null) {
|
||||
throw new Error(`workspace ${workspace} not found`)
|
||||
}
|
||||
if (workspaceInfo.region === region) {
|
||||
if (workspaceInfo.region === region && !cmd.force) {
|
||||
throw new Error(`workspace ${workspace} is already migrated`)
|
||||
}
|
||||
await moveWorkspaceFromMongoToPG(
|
||||
|
Loading…
Reference in New Issue
Block a user