Repository navigation
Conversation
Makes the mapping-addition branch an else-if so table-column events cannot enter it. Adds regression coverage for preserving mappings and header state, handling removed foreign keys, and retaining reference capture and header locking when adding mappings. Adds table-editor tests for adding a column before opening the foreign key editor, with and without an existing foreign key. Fixes pgadmin-org#10700
|
No actionable comments were generated in the recent review. WalkthroughThe foreign-key dependency handler now treats table-column synchronization and row addition as mutually exclusive. Regression tests cover foreign-key mappings, header state, and the table editor after adding a column. ChangesForeign-key column addition
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk:
|
|
Thanks! Squashed and merged as 2753415. |
Motivation
Adding a column in the table editor can crash the dialog before the foreign key editor has been opened.
The foreign key dependency callback handled a table-column ADD_ROW event and then fell through into the separate mapping-addition branch. That branch accessed the foreign key header's references value even when the header state had not been initialized.
Summary
Makes the mapping-addition branch an else-if so table-column events cannot enter it. Adds regression coverage for preserving mappings and header state, handling removed foreign keys, and retaining reference capture and header locking when adding mappings. Adds table-editor tests for adding a column before opening the foreign key editor, with and without an existing foreign key.
How it was tested
Closes #10700
AI was used for assistance.