fix: Fix migrations for postgres and mysql (no-changelog) (#6600)

fix: Fix migrations for postgres and mysql
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-07-05 14:40:35 +02:00 committed by GitHub
parent 31cba87d30
commit 282e6aedb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,7 +96,7 @@ export const wrapMigration = (migration: Migration) => {
Object.assign(migration.prototype, {
async up(this: BaseMigration, queryRunner: QueryRunner) {
logMigrationStart(migrationName);
if (!this.transaction) {
if (this.transaction === false) {
await runDisablingForeignKeys(this, { queryRunner, ...context }, up);
} else {
await up.call(this, { queryRunner, ...context });
@ -105,7 +105,7 @@ export const wrapMigration = (migration: Migration) => {
},
async down(this: BaseMigration, queryRunner: QueryRunner) {
if (down) {
if (!this.transaction) {
if (this.transaction === false) {
await runDisablingForeignKeys(this, { queryRunner, ...context }, up);
} else {
await down.call(this, { queryRunner, ...context });