]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
uniquify cols for FK table object
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 7 Apr 2023 15:05:20 +0000 (11:05 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 7 Apr 2023 15:05:20 +0000 (11:05 -0400)
commit1ae44556907f14f92874f05d05242cb57bb0f855
tree5e744b2c671fdf74be1b613cd5bc145f081fd213
parent3d9b1128cd6bf03ecb45003587c0eedfb9552b07
uniquify cols for FK table object

Fixed issue where using a directive such as ``op.create_foreign_key()`` to
create a self-referential constraint on a single table where the same
column were present on both sides (e.g. within a composite foreign key)
would produce an error under SQLAlchemy 2.0 and a warning under SQLAlchemy
1.4 indicating that a duplicate column were being added to a table.

Change-Id: I2a8f5d8def2714792bffcdfb8bf88a5080ec8ce7
Fixes: #1215
alembic/operations/schemaobj.py
docs/build/unreleased/1215.rst [new file with mode: 0644]
tests/test_op.py