Skip to content

Commit edce39a

Browse files
committed
fix: Fix migrations for postgres and mysql
1 parent d2b8207 commit edce39a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/cli/src/databases/utils/migrationHelpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const wrapMigration = (migration: Migration) => {
9696
Object.assign(migration.prototype, {
9797
async up(this: BaseMigration, queryRunner: QueryRunner) {
9898
logMigrationStart(migrationName);
99-
if (!this.transaction) {
99+
if (this.transaction === false) {
100100
await runDisablingForeignKeys(this, { queryRunner, ...context }, up);
101101
} else {
102102
await up.call(this, { queryRunner, ...context });
@@ -105,7 +105,7 @@ export const wrapMigration = (migration: Migration) => {
105105
},
106106
async down(this: BaseMigration, queryRunner: QueryRunner) {
107107
if (down) {
108-
if (!this.transaction) {
108+
if (this.transaction === false) {
109109
await runDisablingForeignKeys(this, { queryRunner, ...context }, up);
110110
} else {
111111
await down.call(this, { queryRunner, ...context });

0 commit comments

Comments
 (0)