public inbox for [email protected]  
help / color / mirror / Atom feed
From: Aditya Toshniwal <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin][RM6081] Advanced table fields in ERD
Date: Tue, 12 Oct 2021 11:35:43 +0530
Message-ID: <CAM9w-_k9zieD7OcbB=uO2m2Na+y-oy9q_QN6s3D+034U4+f2rA@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDdknyManzN8GgC7_o3vRb1YONoqyFq=FExaXxEDndrh-Q@mail.gmail.com>
References: <CAM9w-_=R=XXYv2tzBkqWQ8tP8eYJ+nERQwHts24TThf5fcMjgg@mail.gmail.com>
	<CANxoLDdknyManzN8GgC7_o3vRb1YONoqyFq=FExaXxEDndrh-Q@mail.gmail.com>

Hi,

Please review the attached patch to fix failing API test case.

On Mon, Oct 11, 2021 at 5:44 PM Akshay Joshi <[email protected]>
wrote:

> Thanks, the patch applied.
>
> On Mon, Oct 11, 2021 at 5:14 PM Aditya Toshniwal <
> [email protected]> wrote:
>
>> Hi Hackers,
>>
>> Attached patch will port Backbone based dialogs in ERD to React based
>> using the schema view UI framework. This allows us to use the existing
>> table UI, remove repeated code and enable advanced fields. I have hidden
>> fields from the existing table UI for ERD.
>> Please note, this also fixes #6529.
>>
>> Please review.
>>
>> --
>> Thanks,
>> Aditya Toshniwal
>> pgAdmin Hacker | Software Architect | *edbpostgres.com*
>> <http://edbpostgres.com;
>> "Don't Complain about Heat, Plant a TREE"
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres <http://edbpostgres.com>*
>
> *Mobile: +91 976-788-8246*
>


-- 
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | *edbpostgres.com*
<http://edbpostgres.com;
"Don't Complain about Heat, Plant a TREE"


Attachments:

  [application/octet-stream] RM6081.api.patch (2.3K, 3-RM6081.api.patch)
  download | inline diff:
diff --git a/web/pgadmin/tools/erd/static/js/erd_tool/ERDCore.js b/web/pgadmin/tools/erd/static/js/erd_tool/ERDCore.js
index b63b1786a..60dbf4e34 100644
--- a/web/pgadmin/tools/erd/static/js/erd_tool/ERDCore.js
+++ b/web/pgadmin/tools/erd/static/js/erd_tool/ERDCore.js
@@ -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);
diff --git a/web/pgadmin/tools/erd/tests/test_sql_input_data.json b/web/pgadmin/tools/erd/tests/test_sql_input_data.json
index 3c8182e68..bd149a237 100644
--- a/web/pgadmin/tools/erd/tests/test_sql_input_data.json
+++ b/web/pgadmin/tools/erd/tests/test_sql_input_data.json
@@ -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"
-        }
-      ]
-    }
   }
 }


view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [pgAdmin][RM6081] Advanced table fields in ERD
  In-Reply-To: <CAM9w-_k9zieD7OcbB=uO2m2Na+y-oy9q_QN6s3D+034U4+f2rA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox