diff --git a/docs/en_US/release_notes_6_10.rst b/docs/en_US/release_notes_6_10.rst index 1e6d44106..dcf76b907 100644 --- a/docs/en_US/release_notes_6_10.rst +++ b/docs/en_US/release_notes_6_10.rst @@ -30,3 +30,4 @@ Bug fixes | `Issue #7388 `_ - Fixed an issue where an error message fills the entire window if the query is long. | `Issue #7393 `_ - Ensure that the editor position should not get changed once it is opened. | `Issue #7402 `_ - Ensure that Dashboard graphs should be refreshed on changing the node from the browser tree. + | `Issue #7403 `_ - Fixed an issue where comments on domain constraints were not visible when selecting a domain node. diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/create.sql index 554d081de..6b66a4294 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/create.sql @@ -17,6 +17,11 @@ ALTER DOMAIN {{ conn|qtIdent(data.basensp, data.name) }} OWNER TO {{ conn|qtIden ALTER DOMAIN {{ conn|qtIdent(data.basensp, data.name) }} ADD CONSTRAINT {{ conn|qtIdent(c.conname) }} CHECK ({{ c.consrc }}){% if not c.convalidated %} NOT VALID{% endif %}{% endif -%}; + +{% if c.description %} +COMMENT ON CONSTRAINT {{ conn|qtIdent(c.conname) }} ON DOMAIN {{ conn|qtIdent(data.basensp, data.name) }} + IS '{{ c.description }}'; +{% endif %} {% endfor -%} {% endif %} diff --git a/web/pgadmin/tools/schema_diff/compare.py b/web/pgadmin/tools/schema_diff/compare.py index 20174be45..aeeeea1e3 100644 --- a/web/pgadmin/tools/schema_diff/compare.py +++ b/web/pgadmin/tools/schema_diff/compare.py @@ -85,8 +85,9 @@ class SchemaDiffObjectCompare: target = self.fetch_objects_to_compare(**target_params) # If both the dict have no items then return None. - if not (source or target) or ( - len(source) <= 0 and len(target) <= 0): + if not (source or target) or not \ + (isinstance(source, dict) and isinstance(target, dict)) or \ + (len(source) <= 0 and len(target) <= 0): return None return compare_dictionaries(view_object=self,