Fixed the issue where all FKs are removed if one of the multiple FKs on the same column is removed.
refs #6891pull/62/head
parent
a908ef7c61
commit
c13b1b60e3
|
@ -342,8 +342,8 @@ export default class ERDCore {
|
|||
tableData.foreign_key?.forEach((theFkRow)=>{
|
||||
let theFk = theFkRow.columns[0];
|
||||
let attnum = _.find(tableNode.getColumns(), (col)=>col.name==theFk.local_column).attnum;
|
||||
/* Skip all those whose attnum matches to the link */
|
||||
if(linkData.local_column_attnum != attnum) {
|
||||
/* Skip all those whose attnum and table matches to the link */
|
||||
if(linkData.local_column_attnum != attnum || linkData.referenced_table_uid != theFk.references) {
|
||||
newForeingKeys.push(theFkRow);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue