mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Move backend config to a separate package (no-changelog) (#9325)
This commit is contained in:
committed by
GitHub
parent
1d5b9836ca
commit
c7d4b471c4
@@ -1,6 +1,7 @@
|
||||
import 'reflect-metadata';
|
||||
import { Container } from 'typedi';
|
||||
import { Command, Errors } from '@oclif/core';
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import { ApplicationError, ErrorReporterProxy as ErrorReporter, sleep } from 'n8n-workflow';
|
||||
import { BinaryDataService, InstanceSettings, ObjectStoreService } from 'n8n-core';
|
||||
import type { AbstractServer } from '@/AbstractServer';
|
||||
@@ -77,7 +78,8 @@ export abstract class BaseCommand extends Command {
|
||||
await this.exitWithCrash('There was an error running database migrations', error),
|
||||
);
|
||||
|
||||
const dbType = config.getEnv('database.type');
|
||||
const globalConfig = Container.get(GlobalConfig);
|
||||
const { type: dbType } = globalConfig.database;
|
||||
|
||||
if (['mysqldb', 'mariadb'].includes(dbType)) {
|
||||
this.logger.warn(
|
||||
|
||||
Reference in New Issue
Block a user