mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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
@@ -2,8 +2,8 @@ import { statSync } from 'fs';
|
||||
import path from 'path';
|
||||
import { Container } from 'typedi';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import type { MigrationContext, IrreversibleMigration } from '@db/types';
|
||||
import config from '@/config';
|
||||
|
||||
export class MigrateIntegerKeysToString1690000000002 implements IrreversibleMigration {
|
||||
transaction = false as const;
|
||||
@@ -193,7 +193,7 @@ const migrationsPruningEnabled = process.env.MIGRATIONS_PRUNING_ENABLED === 'tru
|
||||
function getSqliteDbFileSize(): number {
|
||||
const filename = path.resolve(
|
||||
Container.get(InstanceSettings).n8nFolder,
|
||||
config.getEnv('database.sqlite.database'),
|
||||
Container.get(GlobalConfig).database.sqlite.database,
|
||||
);
|
||||
const { size } = statSync(filename);
|
||||
return size;
|
||||
|
||||
Reference in New Issue
Block a user