mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08:00
fix: Fix migrations for postgres and mysql (no-changelog) (#6600)
fix: Fix migrations for postgres and mysql
This commit is contained in:
parent
31cba87d30
commit
282e6aedb3
|
@ -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 });
|
||||
|
|
Loading…
Reference in a new issue