From 9e489d602b817f2c8dfe3ea176466b7146e2a19f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?liao=E6=96=87=E7=A6=A7?= <1219585136@qq.com> Date: Wed, 8 May 2024 11:46:50 +0800 Subject: [PATCH] Auto swap for foreign key name (#79) --- .../EditorSidePanel/RelationshipsTab/RelationshipInfo.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/EditorSidePanel/RelationshipsTab/RelationshipInfo.jsx b/src/components/EditorSidePanel/RelationshipsTab/RelationshipInfo.jsx index e273d8a..f270c2d 100644 --- a/src/components/EditorSidePanel/RelationshipsTab/RelationshipInfo.jsx +++ b/src/components/EditorSidePanel/RelationshipsTab/RelationshipInfo.jsx @@ -63,6 +63,9 @@ export default function RelationshipInfo({ data }) { idx === data.id ? { ...e, + name: `${tables[e.startTableId].name}_${ + tables[e.startTableId].fields[e.startFieldId].name + }_fk`, startTableId: e.endTableId, startFieldId: e.endFieldId, endTableId: e.startTableId,