UBERF-12325: Add mongo warning for v7 (#9543)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev
2025-07-15 16:52:37 +07:00
committed by GitHub
parent 05b6da54b3
commit eb11d3515e
13 changed files with 67 additions and 36 deletions
+23
View File
@@ -49,6 +49,29 @@ export function serveAccount (measureCtx: MeasureContext, brandings: BrandingMap
process.exit(1)
}
if (dbUrl.startsWith('mongodb://')) {
if (process.env.PROCEED_V7_MONGO !== 'true') {
console.error(`
⚠️ IMPORTANT: MongoDB Deprecation Notice
MongoDB support is deprecated in v7 and will be removed in future versions. Important details:
1. New features may not be available with MongoDB
2. Testing coverage for MongoDB will be limited
3. Upgrading to v7 with MongoDB will PERMANENTLY LOCK your deployment to MongoDB-specific types
4. Migration to CockroachDB will NOT be possible after upgrading
➡️ Recommended Action:
Migrate to CockroachDB before upgrading to v7. See migration instructions at:
https://github.com/hcengineering/huly-selfhost
To proceed with MongoDB (despite these limitations):
Set environment variable PROCEED_V7_MONGO=true.
`)
process.exit(1)
}
}
const oldAccsUrl = process.env.OLD_ACCOUNTS_URL ?? (dbUrl.startsWith('mongodb://') ? dbUrl : undefined)
const oldAccsNs = process.env.OLD_ACCOUNTS_NS
@@ -74,7 +74,6 @@ export interface Workspace {
endpoint: string
region?: string // Transactor group name
targetRegion?: string // Transactor region to move to
backupInfo?: BackupStatus
@@ -32,7 +32,8 @@ export function getMigrations (ns: string): [string, string][] {
getV11Migration(ns),
getV12Migration(ns),
getV13Migration(ns),
getV14Migration(ns)
getV14Migration(ns),
getV15Migration(ns)
]
}
@@ -425,3 +426,13 @@ function getV14Migration (ns: string): [string, string] {
`
]
}
function getV15Migration (ns: string): [string, string] {
return [
'account_db_v15_add_target_region_to_workspace_status',
`
ALTER TABLE ${ns}.workspace_status
ADD COLUMN IF NOT EXISTS target_region STRING;
`
]
}