Ensure that while comparing domains check function dependencies should be considered in schema diff. Fixes #6327
parent
e5d97e72e4
commit
c84df9cc0f
|
@ -20,5 +20,6 @@ Bug fixes
|
|||
|
||||
| `Issue #5519 <https://redmine.postgresql.org/issues/5519>`_ - Ensure that the query tool tab should be closed after server disconnection when auto-commit/auto-rollback is set to false.
|
||||
| `Issue #6293 <https://redmine.postgresql.org/issues/6293>`_ - Fixed an issue where the procedure creation is failed when providing the Volatility option.
|
||||
| `Issue #6327 <https://redmine.postgresql.org/issues/6327>`_ - Ensure that while comparing domains check function dependencies should be considered in schema diff.
|
||||
| `Issue #6344 <https://redmine.postgresql.org/issues/6344>`_ - Fixed cannot unpack non-iterable response object error when selecting any partition.
|
||||
| `Issue #6356 <https://redmine.postgresql.org/issues/6356>`_ - Mark the Apache HTTPD config file as such in the web DEB and RPM packages.
|
||||
|
|
|
@ -982,6 +982,37 @@ AND relkind != 'c'))"""
|
|||
json_resp=False)
|
||||
return sql
|
||||
|
||||
def get_dependencies(self, conn, object_id, where=None,
|
||||
show_system_objects=None, is_schema_diff=False):
|
||||
"""
|
||||
This function is used to get dependencies of domain and it's
|
||||
domain constraints.
|
||||
"""
|
||||
domain_dependencies = []
|
||||
domain_deps = super().get_dependencies(
|
||||
conn, object_id, where=None, show_system_objects=None,
|
||||
is_schema_diff=True)
|
||||
if len(domain_deps) > 0:
|
||||
domain_dependencies.extend(domain_deps)
|
||||
|
||||
# Get Domain Constraints
|
||||
SQL = render_template("/".join([self.template_path,
|
||||
self._GET_CONSTRAINTS_SQL]),
|
||||
doid=object_id)
|
||||
status, res = self.conn.execute_dict(SQL)
|
||||
if not status:
|
||||
return False, internal_server_error(errormsg=res)
|
||||
|
||||
# Get the domain constraints dependencies.
|
||||
for row in res['rows']:
|
||||
constraint_deps = super().get_dependencies(
|
||||
conn, row['conoid'], where=None, show_system_objects=None,
|
||||
is_schema_diff=True)
|
||||
if len(constraint_deps) > 0:
|
||||
domain_dependencies.extend(constraint_deps)
|
||||
|
||||
return domain_dependencies
|
||||
|
||||
|
||||
SchemaDiffRegistry(blueprint.node_type, DomainView)
|
||||
DomainView.register_node_view(blueprint)
|
||||
|
|
Loading…
Reference in New Issue