Fixed the schema diff issue where tables have different column positions and a column has a default value. Fixes #7124

This commit is contained in:
Yogesh Mahajan 2022-02-11 10:21:43 +05:30 committed by Akshay Joshi
parent f62c20d0b9
commit 76a4dee451
3 changed files with 25 additions and 1 deletions

View File

@ -11,6 +11,7 @@ notes for it.
.. toctree::
:maxdepth: 1
release_notes_6_6
release_notes_6_5
release_notes_6_4
release_notes_6_3

View File

@ -0,0 +1,21 @@
************
Version 6.6
************
Release date: 2021-03-10
This release contains a number of bug fixes and new features since the release of pgAdmin4 6.5.
New features
************
Housekeeping
************
Bug fixes
*********
| `Issue #7124 <https://redmine.postgresql.org/issues/7124>`_ - Fixed the schema diff issue where tables have different column positions and a column has a default value.

View File

@ -24,7 +24,8 @@ class SchemaDiffTableCompare(SchemaDiffObjectCompare):
'rows_cnt', 'hastoasttable', 'relhassubclass',
'relacl_str', 'setting']
column_keys_to_ignore = ['atttypid', 'edit_types', 'elemoid', 'seqrelid']
column_keys_to_ignore = ['atttypid', 'edit_types', 'elemoid', 'seqrelid',
'indkey']
constraint_keys_to_ignore = ['relname', 'nspname', 'parent_tbl',
'attrelid', 'adrelid', 'fknsp', 'confrelid',
@ -167,6 +168,7 @@ class SchemaDiffTableCompare(SchemaDiffObjectCompare):
if item['name'] == source['name']:
tmp = copy.deepcopy(item)
source['attnum'] = tmp['attnum']
if tmp and source != tmp:
updated.append(source)