You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
I found same issues with Foreign key, Unique and Exclude constraint in Table dialog as well as in ERD tool table dialog. So fixed all the issues for all the constraints except Check constraint.
While testing this please consider looking into the other constraints also.
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:
![Screenshot 2024-05-15 at 13 48 23](https://private-user-images.githubusercontent.com/4040507/330791878-76f5b778-ef0e-4126-9608-4d41be6d29ea.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwMjY2NzcsIm5iZiI6MTcyNTAyNjM3NywicGF0aCI6Ii80MDQwNTA3LzMzMDc5MTg3OC03NmY1Yjc3OC1lZjBlLTQxMjYtOTYwOC00ZDQxYmU2ZDI5ZWEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MzBUMTM1OTM3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTlkMDZmZWE0ODA3OTYzYzMwMzY0ZDI4ZjUzYjg3OTE3OTVhN2VmZmFlM2MwZTJlNTY5ZGFhZDIyNzQzZjE2MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.KJlZhi2Z_ctR0_V5uytdvtWY8nYGyUahx-7hhdqG1fc)
However, the constraint is still there:
![Screenshot 2024-05-15 at 13 33 12](https://private-user-images.githubusercontent.com/4040507/330786506-f908b833-cb33-4bd5-8bf4-90f695dae982.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwMjY2NzcsIm5iZiI6MTcyNTAyNjM3NywicGF0aCI6Ii80MDQwNTA3LzMzMDc4NjUwNi1mOTA4YjgzMy1jYjMzLTRiZDUtOGJmNC05MGY2OTVkYWU5ODIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MzBUMTM1OTM3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTAyYmM4NzI1YmE1MjExN2Q4M2IzZTU0NjIwNmVmODdiNDI4MjJiNDI1Njg1YWMzYWUwZjE5OWIxZWFlOWY1ZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.d12enT1-WEtZ3jF5RKqMob_mZoy602p0jWDa6OjR42Y)
Error message if the generated DDL SQL is run
Software
NW.js Version: 0.77.0
The text was updated successfully, but these errors were encountered: