-
Notifications
You must be signed in to change notification settings - Fork 796
Description
Changing a primary key constraints or even deleting attributes does not change the constraints in the "Constraints" tab
Removing an attribute does not change the constraints defined on that attribute.
To Reproduce
Steps to reproduce the behavior:
-
Define the primary key constraint on a table and save the whole project in the ERD Tool.
-
Double-click on the table in the diagram, and the form for editing table properties will open. The checkbox for the primary key can now be unchecked. However, saving your changes does not exclude the primary key constraints. The primary key constraint can still be found if you open the "Constraints" tab. Moreover, even if we completely remove the attribute on which the primary constraint is defined, the constraint still remains in the "Constraints" tab.
-
This can cause problems and is annoying if you click on the "Generate SQL" option which generates SQL DDL statements with unwanting constraints or constraints on unexisting attributes.
Expected behavior
It would be natural that the ERD Tools shows a dialogue form to confirm an automatic delete of the primary key constraint if this constraint is removed in the tab "Columns" that contains the list of attributes.
Screenshots
After we remove the attribute with the primary key:
However, the constraint is still there:
Error message if the generated DDL SQL is run
Software
- MacOS: [OSX Sonoma 14.5 - macOS-14.5-x86_64-i386-64bit]
- pgAdmin4 Version: 8.6
NW.js Version: 0.77.0 - Mode: Desktop
- Browser: Chromium 114.0.5735.91