diff --git a/packages/cli/src/databases/utils/migrationHelpers.ts b/packages/cli/src/databases/utils/migrationHelpers.ts index 0221e7345d..a1f8bf223f 100644 --- a/packages/cli/src/databases/utils/migrationHelpers.ts +++ b/packages/cli/src/databases/utils/migrationHelpers.ts @@ -5,7 +5,7 @@ import type { QueryRunner } from 'typeorm/query-runner/QueryRunner'; import config from '@/config'; import { getLogger } from '@/Logger'; import { inTest } from '@/constants'; -import type { Migration } from '@db/types'; +import type { Migration, MigrationContext } from '@db/types'; const logger = getLogger(); @@ -68,7 +68,13 @@ export const wrapMigration = (migration: Migration) => { const dbName = config.getEnv(`database.${dbType === 'mariadb' ? 'mysqldb' : dbType}.database`); const tablePrefix = config.getEnv('database.tablePrefix'); const migrationName = migration.name; - const context = { tablePrefix, dbType, dbName, migrationName }; + const context: Omit = { + tablePrefix, + dbType, + dbName, + migrationName, + logger, + }; const { up, down } = migration.prototype; Object.assign(migration.prototype, {