From a9e63b992352d4babe8ba5731d68993fba18efa8 Mon Sep 17 00:00:00 2001 From: Mutasem Date: Thu, 4 Aug 2022 16:28:47 +0200 Subject: [PATCH] fix mariadb issue --- .../migrations/mysqldb/1658932910559-AddNodeIds.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.ts b/packages/cli/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.ts index 6dbc16623ab6b..c8ee937d8c832 100644 --- a/packages/cli/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.ts +++ b/packages/cli/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.ts @@ -19,7 +19,11 @@ export class AddNodeIds1658932910559 implements MigrationInterface { // @ts-ignore await runChunked(queryRunner, workflowsQuery, (workflows) => { workflows.forEach(async (workflow) => { - const nodes = workflow.nodes; + let nodes = workflow.nodes; + if (typeof nodes === 'string') { // mariadb + nodes = JSON.parse(nodes); + } + // @ts-ignore nodes.forEach((node) => { if (!node.id) {