Use better foreign key names

This commit is contained in:
1ilit 2023-09-19 15:51:32 +03:00
parent f6ab590623
commit 796e302eeb

View File

@ -345,9 +345,9 @@ export default function Canvas(props) {
endFieldId: onRect.field, endFieldId: onRect.field,
endX: tables[onRect.tableId].x + 15, endX: tables[onRect.tableId].x + 15,
endY: tables[onRect.tableId].y + onRect.field * 36 + 69, endY: tables[onRect.tableId].y + onRect.field * 36 + 69,
name: `${tables[line.startTableId].name}_FK_${ name: `${tables[line.startTableId].name}_${
tables[line.startTableId].fields[line.startFieldId].name tables[line.startTableId].fields[line.startFieldId].name
}_to_${tables[onRect.tableId].fields[onRect.field].name}`, }_fk`,
id: relationships.length, id: relationships.length,
}); });
}; };