From ae388291db7ee4b1b9ac70bdd5494def19a2261a Mon Sep 17 00:00:00 2001 From: 1ilit <1ilit@proton.me> Date: Thu, 5 Jun 2025 18:20:19 +0400 Subject: [PATCH] Fix importing foreign keys from sqlite (#478) --- src/utils/importSQL/sqlite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/importSQL/sqlite.js b/src/utils/importSQL/sqlite.js index a2511af..ecb07d9 100644 --- a/src/utils/importSQL/sqlite.js +++ b/src/utils/importSQL/sqlite.js @@ -53,7 +53,7 @@ export function fromSQLite(ast, diagramDb = DB.GENERIC) { const endTable = tables.find((t) => t.name === endTableName); if (!endTable) return; - const endField = endTable.fields.findIndex((f) => f.name === endFieldName); + const endField = endTable.fields.find((f) => f.name === endFieldName); if (!endField) return; const startField = startTable.fields.find((f) => f.name === startFieldName);