]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
More PostgreSQL expression index compare fixes
authorFederico Caselli <cfederico87@gmail.com>
Sat, 21 Oct 2023 19:06:57 +0000 (21:06 +0200)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 21 Nov 2023 20:17:35 +0000 (15:17 -0500)
commit05c3b09bc4446080cb57ec932aca5835829a7ae5
tree11f53e1d8848db63892dfcf9957cb1a3a0f6d765
parent78159abed333a94f81e1a5e4a25bc31244e5fda6
More PostgreSQL expression index compare fixes

Additional fixes to PostgreSQL expression index compare feature.
The compare now correctly accommodates casts and differences in
spacing.
Added detection logic for operation clauses inside the expression,
skipping the compare of these expressions.
To accommodate these changes the logic for the comparison of the
indexes and unique constraints was moved to the dialect
implementation, allowing greater flexibility.

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Fixes: #1321
Fixes: #1327
Fixes: #1356
Change-Id: Icad15bc556a63bfa55b84779e7691c745d943c63
14 files changed:
.pre-commit-config.yaml
alembic/autogenerate/api.py
alembic/autogenerate/compare.py
alembic/ddl/_autogen.py [new file with mode: 0644]
alembic/ddl/impl.py
alembic/ddl/mysql.py
alembic/ddl/postgresql.py
alembic/operations/ops.py
alembic/testing/schemacompare.py
alembic/util/sqla_compat.py
docs/build/unreleased/more_index_fixes.rst [new file with mode: 0644]
setup.cfg
tests/test_autogen_indexes.py
tests/test_postgresql.py