Fixed API Test Case for ERD

This commit is contained in:
Aditya Toshniwal 2021-10-12 14:26:01 +05:30 committed by Akshay Joshi
parent f23b0702f2
commit d81960a6eb
2 changed files with 15 additions and 29 deletions

View File

@ -381,21 +381,6 @@ export default class ERDCore {
})],
});
// let tableData = {
// name: `${leftNode.getData().name}_${rightNode.getData().name}`,
// schema: leftNode.getData().schema,
// columns: [{
// ...leftNode.getColumnAt(manytomanyData.left_table_column_attnum),
// 'name': `${leftNode.getData().name}_${leftNode.getColumnAt(manytomanyData.left_table_column_attnum).name}`,
// 'is_primary_key': false,
// 'attnum': 0,
// },{
// ...rightNode.getColumnAt(manytomanyData.right_table_column_attnum),
// 'name': `${rightNode.getData().name}_${rightNode.getColumnAt(manytomanyData.right_table_column_attnum).name}`,
// 'is_primary_key': false,
// 'attnum': 1,
// }],
// };
let newNode = this.addNode(tableData);
this.clearSelection();
newNode.setSelected(true);

View File

@ -80,6 +80,21 @@
],
"include": []
}
],
"foreign_key": [
{
"schema": "public",
"table": "newtable2",
"remote_schema": "public",
"remote_table": "newtable1",
"columns": [
{
"local_column": "table1_id",
"referenced": "id",
"references": "1d9dc56e-e4f9-48b9-889b-6084ec6446bf"
}
]
}
]
},
"f001a770-d6fa-4572-b88b-11dd5e38d30c": {
@ -88,19 +103,5 @@
"schema": "public",
"primary_key": []
}
},
"links": {
"998de19a-caa0-431e-9cf7-97827f01022b": {
"schema": "public",
"table": "newtable2",
"remote_schema": "public",
"remote_table": "newtable1",
"columns": [
{
"local_column": "table1_id",
"referenced": "id"
}
]
}
}
}