Repository navigation
Show a different Object Explorer icon for NOT NULL columns. #5827 - #10863
Conversation
…rg#5827 Columns with a NOT NULL constraint now use the column icon with a padlock marker, as proposed on the issue, so they can be picked out in the tree without opening the column's properties. The nodes, create and update endpoints all choose the icon from attnotnull, so the icon follows the column when NOT NULL is added or dropped. Closes pgadmin-org#5827
|
No actionable comments were generated in the recent review. WalkthroughColumn node responses now use a distinct icon for columns with a NOT NULL constraint. Creation and update responses select the icon from the current database state. Tests verify the icons returned for standard and NOT NULL columns. ChangesColumn icon selection
Estimated code review effort: 2 (Simple) | ~12 minutes Change: Feature · Severity of issue fixed: Low Merge Risk:
|
Summary
column-not-null.svgwith anicon-column-not-nullclass (registered the same way as the table inheritance icon variants).nodes,createandupdateendpoints all pick the icon fromattnotnull, so the icon changes when NOT NULL is added or dropped; create and update re-read the column, since identity columns and primary keys make a column NOT NULL implicitly.Icons are not theme-specific in pgAdmin, so the same SVG is used in the light, dark and high-contrast themes.
Test plan
nodes,createandupdate;columns(55) andforeign_table_columns(13) packages pass on PostgreSQL 18, and the new assertions fail if the icon logic is broken.pycodestyleclean.Closes #5827
Summary by CodeRabbit