fix(core): Ensure DB repositories are initialized before the DB migrations are run (#6220)

also remove the need to re-open sqlite db connection
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-05-10 15:53:04 +00:00
committed by GitHub
parent ed3bc154b0
commit 500c0ebce3
2 changed files with 9 additions and 40 deletions

View File

@@ -28,7 +28,7 @@ import type { ActiveWorkflowRunner } from '@/ActiveWorkflowRunner';
import type { WorkflowExecute } from 'n8n-core';
import type PCancelable from 'p-cancelable';
import type { FindOperator } from 'typeorm';
import type { FindOperator, Repository } from 'typeorm';
import type { ChildProcess } from 'child_process';
@@ -83,7 +83,7 @@ export interface ICredentialsOverwrite {
}
/* eslint-disable @typescript-eslint/naming-convention */
export interface IDatabaseCollections {
export interface IDatabaseCollections extends Record<string, Repository<any>> {
AuthIdentity: AuthIdentityRepository;
AuthProviderSyncHistory: AuthProviderSyncHistoryRepository;
Credentials: CredentialsRepository;