fix(core): Disable transactions on sqlite migrations that use PRAGMA foreign_keys (#5392)

`PRAGMA foreign_keys` is [a no-op within a sqlite transaction](https://www.sqlite.org/pragma.html#pragma_foreign_keys).
This causes cascade deletes to happen when we create a new user table, and drop the old user table.
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-02-07 15:14:59 +01:00
committed by GitHub
parent dd652c0b0d
commit 3a435f7057
3 changed files with 8 additions and 0 deletions

View File

@@ -3,6 +3,9 @@ import { getTablePrefix, logMigrationEnd, logMigrationStart } from '@db/utils/mi
export class DeleteExecutionsWithWorkflows1673268682475 implements MigrationInterface {
name = 'DeleteExecutionsWithWorkflows1673268682475';
transaction = false;
public async up(queryRunner: QueryRunner): Promise<void> {
logMigrationStart(this.name);
const tablePrefix = getTablePrefix();