fix: option to allow cluster migrations without relying on self hosting env

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-10-23 10:49:45 +02:00
parent 411021ee04
commit bcfb4f25fb
3 changed files with 19 additions and 9 deletions

View File

@@ -6,7 +6,12 @@ import { fileURLToPath } from 'node:url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
import { db } from '../index';
import { getIsDry, getIsSelfHosting, printBoxMessage } from './helpers';
import {
getIsCluster,
getIsDry,
getIsSelfHosting,
printBoxMessage,
} from './helpers';
async function migrate() {
const args = process.argv.slice(2);
@@ -39,6 +44,11 @@ async function migrate() {
.map((migration) => `\t- ${migration}`),
]);
printBoxMessage('🤝 Config', [
`isClustered: ${getIsCluster()}`,
`isSelfHosting: ${getIsSelfHosting()}`,
]);
printBoxMessage('🌍 Environment', [
`POSTGRES: ${process.env.DATABASE_URL}`,
`CLICKHOUSE: ${process.env.CLICKHOUSE_URL}`,