mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-14 14:28:14 -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, {
|
Object.assign(migration.prototype, {
|
||||||
async up(this: BaseMigration, queryRunner: QueryRunner) {
|
async up(this: BaseMigration, queryRunner: QueryRunner) {
|
||||||
logMigrationStart(migrationName);
|
logMigrationStart(migrationName);
|
||||||
if (!this.transaction) {
|
if (this.transaction === false) {
|
||||||
await runDisablingForeignKeys(this, { queryRunner, ...context }, up);
|
await runDisablingForeignKeys(this, { queryRunner, ...context }, up);
|
||||||
} else {
|
} else {
|
||||||
await up.call(this, { queryRunner, ...context });
|
await up.call(this, { queryRunner, ...context });
|
||||||
|
@ -105,7 +105,7 @@ export const wrapMigration = (migration: Migration) => {
|
||||||
},
|
},
|
||||||
async down(this: BaseMigration, queryRunner: QueryRunner) {
|
async down(this: BaseMigration, queryRunner: QueryRunner) {
|
||||||
if (down) {
|
if (down) {
|
||||||
if (!this.transaction) {
|
if (this.transaction === false) {
|
||||||
await runDisablingForeignKeys(this, { queryRunner, ...context }, up);
|
await runDisablingForeignKeys(this, { queryRunner, ...context }, up);
|
||||||
} else {
|
} else {
|
||||||
await down.call(this, { queryRunner, ...context });
|
await down.call(this, { queryRunner, ...context });
|
||||||
|
|
Loading…
Reference in a new issue