mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(core): Fix named parameter resolution in migrations (#7688)
Fixes #7628
This commit is contained in:
committed by
GitHub
parent
91c3ea87fe
commit
4441ed5116
@@ -18,11 +18,10 @@ export class AddNodeIds1658930531669 implements ReversibleMigration {
|
||||
}
|
||||
});
|
||||
|
||||
await runQuery(
|
||||
`UPDATE ${tableName} SET nodes = :nodes WHERE id = :id`,
|
||||
{ nodes: JSON.stringify(nodes) },
|
||||
{ id: workflow.id },
|
||||
);
|
||||
await runQuery(`UPDATE ${tableName} SET nodes = :nodes WHERE id = :id`, {
|
||||
nodes: JSON.stringify(nodes),
|
||||
id: workflow.id,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -33,11 +32,10 @@ export class AddNodeIds1658930531669 implements ReversibleMigration {
|
||||
await runInBatches<Workflow>(workflowsQuery, async (workflows) => {
|
||||
workflows.forEach(async (workflow) => {
|
||||
const nodes = parseJson(workflow.nodes).map(({ id, ...rest }) => rest);
|
||||
await runQuery(
|
||||
`UPDATE ${tableName} SET nodes = :nodes WHERE id = :id`,
|
||||
{ nodes: JSON.stringify(nodes) },
|
||||
{ id: workflow.id },
|
||||
);
|
||||
await runQuery(`UPDATE ${tableName} SET nodes = :nodes WHERE id = :id`, {
|
||||
nodes: JSON.stringify(nodes),
|
||||
id: workflow.id,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user