From 59a5d808ce81933395493478ff5d1355ca31ee86 Mon Sep 17 00:00:00 2001 From: Mutasem Date: Thu, 4 Aug 2022 16:26:44 +0200 Subject: [PATCH] Revert "add check for arr" 40a43f59577abc581aa60dedfd006a0a59e867f8 --- .../migrations/mysqldb/1658932910559-AddNodeIds.ts | 6 ------ .../migrations/postgresdb/1658932090381-AddNodeIds.ts | 8 -------- .../migrations/sqlite/1658930531669-AddNodeIds.ts | 8 -------- 3 files changed, 22 deletions(-) diff --git a/packages/cli/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.ts b/packages/cli/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.ts index 7aea6da484..6dbc16623a 100644 --- a/packages/cli/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.ts +++ b/packages/cli/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.ts @@ -20,9 +20,6 @@ export class AddNodeIds1658932910559 implements MigrationInterface { await runChunked(queryRunner, workflowsQuery, (workflows) => { workflows.forEach(async (workflow) => { const nodes = workflow.nodes; - if (!Array.isArray(nodes)) { - return; - } // @ts-ignore nodes.forEach((node) => { if (!node.id) { @@ -58,9 +55,6 @@ export class AddNodeIds1658932910559 implements MigrationInterface { await runChunked(queryRunner, workflowsQuery, (workflows) => { workflows.forEach(async (workflow) => { const nodes = workflow.nodes; - if (!Array.isArray(nodes)) { - return; - } // @ts-ignore nodes.forEach((node) => delete node.id ); diff --git a/packages/cli/src/databases/migrations/postgresdb/1658932090381-AddNodeIds.ts b/packages/cli/src/databases/migrations/postgresdb/1658932090381-AddNodeIds.ts index 93a7f2396c..3571693fa4 100644 --- a/packages/cli/src/databases/migrations/postgresdb/1658932090381-AddNodeIds.ts +++ b/packages/cli/src/databases/migrations/postgresdb/1658932090381-AddNodeIds.ts @@ -26,10 +26,6 @@ export class AddNodeIds1658932090381 implements MigrationInterface { await runChunked(queryRunner, workflowsQuery, (workflows) => { workflows.forEach(async (workflow) => { const nodes = workflow.nodes; - if (!Array.isArray(nodes)) { - return; - } - // @ts-ignore nodes.forEach((node) => { if (!node.id) { @@ -71,10 +67,6 @@ export class AddNodeIds1658932090381 implements MigrationInterface { await runChunked(queryRunner, workflowsQuery, (workflows) => { workflows.forEach(async (workflow) => { const nodes = workflow.nodes; - if (!Array.isArray(nodes)) { - return; - } - // @ts-ignore nodes.forEach((node) => delete node.id ); diff --git a/packages/cli/src/databases/migrations/sqlite/1658930531669-AddNodeIds.ts b/packages/cli/src/databases/migrations/sqlite/1658930531669-AddNodeIds.ts index 25504d5bf6..d772d5c47b 100644 --- a/packages/cli/src/databases/migrations/sqlite/1658930531669-AddNodeIds.ts +++ b/packages/cli/src/databases/migrations/sqlite/1658930531669-AddNodeIds.ts @@ -24,10 +24,6 @@ export class AddNodeIds1658930531669 implements MigrationInterface { await runChunked(queryRunner, workflowsQuery, (workflows) => { workflows.forEach(async (workflow) => { const nodes = JSON.parse(workflow.nodes); - if (!Array.isArray(nodes)) { - return; - } - nodes.forEach((node: INode) => { if (!node.id) { node.id = uuid(); @@ -65,10 +61,6 @@ export class AddNodeIds1658930531669 implements MigrationInterface { await runChunked(queryRunner, workflowsQuery, (workflows) => { workflows.forEach(async (workflow) => { const nodes = JSON.parse(workflow.nodes); - if (!Array.isArray(nodes)) { - return; - } - // @ts-ignore nodes.forEach((node) => delete node.id );