Skip to content

Commit

Permalink
fix param
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr Smyslov committed Dec 12, 2024
1 parent 63628bb commit fb66672
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def compare(self, **kwargs):
ignore_owner=ignore_owner,
ignore_whitespaces=ignore_whitespaces,
ignore_tablespace=ignore_tablespace,
ignore_grants=ignore_grants
ignore_grants=ignore_grants,
ignore_partitions=ignore_partitions)

def ddl_compare(self, **kwargs):
Expand Down
27 changes: 20 additions & 7 deletions web/pgadmin/tools/schema_diff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ def compare_database(params):
ignore_whitespaces = bool(params['ignore_whitespaces'])
ignore_tablespace = bool(params['ignore_tablespace'])
ignore_grants = bool(params['ignore_grants'])
ignore_partitions = bool(params['ignore_partitions'])


# Fetch all the schemas of source and target database
# Compare them and get the status.
Expand Down Expand Up @@ -514,7 +516,8 @@ def compare_database(params):
node_percent=node_percent, ignore_owner=ignore_owner,
ignore_whitespaces=ignore_whitespaces,
ignore_tablespace=ignore_tablespace,
ignore_grants=ignore_grants)
ignore_grants=ignore_grants,
ignore_partitions=ignore_partitions)
comparison_result = \
comparison_result + comparison_schema_result

Expand All @@ -538,7 +541,8 @@ def compare_database(params):
ignore_owner=ignore_owner,
ignore_whitespaces=ignore_whitespaces,
ignore_tablespace=ignore_tablespace,
ignore_grants=ignore_grants)
ignore_grants=ignore_grants,
ignore_partitions=ignore_partitions)

comparison_result = \
comparison_result + comparison_schema_result
Expand All @@ -561,7 +565,8 @@ def compare_database(params):
ignore_owner=ignore_owner,
ignore_whitespaces=ignore_whitespaces,
ignore_tablespace=ignore_tablespace,
ignore_grants=ignore_grants)
ignore_grants=ignore_grants,
ignore_partitions=ignore_partitions)

comparison_result = \
comparison_result + comparison_schema_result
Expand All @@ -586,7 +591,8 @@ def compare_database(params):
ignore_owner=ignore_owner,
ignore_whitespaces=ignore_whitespaces,
ignore_tablespace=ignore_tablespace,
ignore_grants=ignore_grants)
ignore_grants=ignore_grants,
ignore_partitions=ignore_partitions)

comparison_result = \
comparison_result + comparison_schema_result
Expand Down Expand Up @@ -631,6 +637,8 @@ def compare_schema(params):
ignore_whitespaces = bool(params['ignore_whitespaces'])
ignore_tablespace = bool(params['ignore_tablespace'])
ignore_grants = bool(params['ignore_grants'])
ignore_partitions = bool(params['ignore_partitions'])

all_registered_nodes = SchemaDiffRegistry.get_registered_nodes()
node_percent = round(100 / len(all_registered_nodes), 2)
total_percent = 0
Expand All @@ -651,7 +659,8 @@ def compare_schema(params):
ignore_owner=ignore_owner,
ignore_whitespaces=ignore_whitespaces,
ignore_tablespace=ignore_tablespace,
ignore_grants=ignore_grants)
ignore_grants=ignore_grants,
ignore_partitions=ignore_partitions)

comparison_result = \
comparison_result + comparison_schema_result
Expand Down Expand Up @@ -787,6 +796,7 @@ def compare_database_objects(**kwargs):
ignore_whitespaces = kwargs.get('ignore_whitespaces')
ignore_tablespace = kwargs.get('ignore_tablespace')
ignore_grants = kwargs.get('ignore_grants')
ignore_partitions = kwargs.get('ignore_partitions')
comparison_result = []

all_registered_nodes = SchemaDiffRegistry.get_registered_nodes(None,
Expand All @@ -812,7 +822,8 @@ def compare_database_objects(**kwargs):
ignore_owner=ignore_owner,
ignore_whitespaces=ignore_whitespaces,
ignore_tablespace=ignore_tablespace,
ignore_grants=ignore_grants)
ignore_grants=ignore_grants,
ignore_partitions=ignore_partitions)

if res is not None:
comparison_result = comparison_result + res
Expand Down Expand Up @@ -845,6 +856,7 @@ def compare_schema_objects(**kwargs):
ignore_whitespaces = kwargs.get('ignore_whitespaces')
ignore_tablespace = kwargs.get('ignore_tablespace')
ignore_grants = kwargs.get('ignore_grants')
ignore_partitions = kwargs.get('ignore_partitions')

source_schema_name = None
if is_schema_source_only:
Expand Down Expand Up @@ -883,7 +895,8 @@ def compare_schema_objects(**kwargs):
ignore_owner=ignore_owner,
ignore_whitespaces=ignore_whitespaces,
ignore_tablespace=ignore_tablespace,
ignore_grants=ignore_grants)
ignore_grants=ignore_grants,
ignore_partitions=ignore_partitions)

if res is not None:
comparison_result = comparison_result + res
Expand Down
2 changes: 1 addition & 1 deletion web/pgadmin/tools/schema_diff/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def compare(self, **kwargs):
ignore_owner=ignore_owner,
ignore_whitespaces=ignore_whitespaces,
ignore_tablespace=ignore_tablespace,
ignore_grants=ignore_grants
ignore_grants=ignore_grants,
ignore_partitions=ignore_partitions)

def ddl_compare(self, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion web/pgadmin/tools/schema_diff/directory_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def compare_dictionaries(**kwargs):
"group_name": group_name,
"target_schema": target_schema,
"ignore_whitespaces": ignore_whitespaces,
"ignore_grants": ignore_grants
"ignore_grants": ignore_grants,
"ignore_partitions": ignore_partitions
}

Expand Down

0 comments on commit fb66672

Please sign in to comment.