public inbox for [email protected]
help / color / mirror / Atom feedFrom: Aditya Toshniwal <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin][RM6891] Composite foreign keys in ERD
Date: Fri, 15 Oct 2021 16:19:24 +0530
Message-ID: <CAM9w-_kbDps=z_92df1Ccjzw86Dro5LBCr6oNDrRZXCiDn-LhA@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDcAwAE1GuO2ScXV_K4WejXxdRfF3kisBiLTKOkEwb_ZMw@mail.gmail.com>
References: <CAM9w-_kRp5AirByDkR29H6Z5Prvf2n_VskPxigv-0SSwy-JjbA@mail.gmail.com>
<CANxoLDfFFt1XcKWA62cYEExkHZHQzu5ymuDUwZhJQtZrVGV5Sg@mail.gmail.com>
<CAM9w-_mdmX4PHva+-4rhVH6Km4UUw5G6n4shGBKhX7xV1cweOQ@mail.gmail.com>
<CANxoLDcAwAE1GuO2ScXV_K4WejXxdRfF3kisBiLTKOkEwb_ZMw@mail.gmail.com>
Hi,
The patch fixes the issue where all FKs are removed if one of the multiple
FKs on the same column is removed.
Please review.
On Wed, Oct 13, 2021 at 2:30 PM Akshay Joshi <[email protected]>
wrote:
> Thanks, the patch applied.
>
> On Wed, Oct 13, 2021 at 1:53 PM Aditya Toshniwal <
> [email protected]> wrote:
>
>> Hi,
>>
>> Attached is the updated patch.
>>
>> On Wed, Oct 13, 2021 at 12:53 PM Akshay Joshi <
>> [email protected]> wrote:
>>
>>> Hi Aditya
>>>
>>> Jasmine test cases are failing after applying the patch. Can you please
>>> fix and resend it.
>>>
>>> On Wed, Oct 13, 2021 at 12:35 PM Aditya Toshniwal <
>>> [email protected]> wrote:
>>>
>>>> Hi Hackers,
>>>>
>>>> Please review the attached patch which adds support for composite
>>>> foreign keys in ERD.
>>>>
>>>> --
>>>> 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"
>>
>
>
> --
> *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] RM6891.dropfk.patch (853B, 3-RM6891.dropfk.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 60dbf4e34..39a60fa46 100644
--- a/web/pgadmin/tools/erd/static/js/erd_tool/ERDCore.js
+++ b/web/pgadmin/tools/erd/static/js/erd_tool/ERDCore.js
@@ -341,8 +341,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);
}
});
view thread (6+ 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][RM6891] Composite foreign keys in ERD
In-Reply-To: <CAM9w-_kbDps=z_92df1Ccjzw86Dro5LBCr6oNDrRZXCiDn-LhA@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