From 9f8500fc7e36e6a819ecb9029f263d80eac88279 Mon Sep 17 00:00:00 2001 From: Guy Ben-Aharon Date: Wed, 13 Nov 2024 18:58:50 +0200 Subject: [PATCH] fix(templates): fix cloned indexes from a template (#398) --- src/lib/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 39cc64c84..4788e8f0e 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -141,6 +141,7 @@ export const cloneDiagram = ( newTable.indexes = table.indexes.map( (index): DBIndex => ({ ...index, + fieldIds: index.fieldIds.map((id) => getNewId(id)), id: getNewId(index.id), }) );