diff --git a/src/database/check.ts b/src/database/check.ts index 707e8815..42e108c3 100644 --- a/src/database/check.ts +++ b/src/database/check.ts @@ -61,19 +61,19 @@ export async function checkDatabase(context?: DatabaseCheckContext) : Promise 0 ) { - const migrationExecutor = new MigrationExecutor(dataSource); + const migrationExecutor = new MigrationExecutor(dataSource, queryRunner); result.migrationsPending = await migrationExecutor.getPendingMigrations(); if (result.migrationsPending.length === 0) { result.schema = true; } } else { - const queryRunner = dataSource.createQueryRunner(); - let schema : string | undefined; if (hasStringProperty(dataSource.driver.options, 'schema')) { schema = dataSource.driver.options.schema; @@ -93,10 +93,10 @@ export async function checkDatabase(context?: DatabaseCheckContext) : Promise