]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Accommodate column-based naming conventions for pk constraint
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 4 Feb 2021 17:09:54 +0000 (12:09 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 4 Feb 2021 17:13:24 +0000 (12:13 -0500)
commitd997caa15ccf3d7a56d2c02710c6c3a53287282e
tree598fe4ac0d1f80ebcbdd3c208a90afd00aead7a5
parent1c16ef3620d413befe8a66c79bee9edb806094e0
Accommodate column-based naming conventions for pk constraint

Repaired / implemented support for primary key constraint naming
conventions that use column names/keys/etc as part of the convention. In
particular, this includes that the :class:`.PrimaryKeyConstraint` object
that's automatically associated with a :class:`.schema.Table` will update
its name as new primary key :class:`_schema.Column` objects are added to
the table and then to the constraint. Internal failure modes related to
this constraint construction process including no columns present, no name
present or blank name present are now accommodated.

Fixes: #5919
Change-Id: Ic2800b50f4a4cd5978bec48cefea0a2e198e0123
(cherry picked from commit 9660e94e35be438b0d51cd87e6ccb4047a332c15)
doc/build/changelog/unreleased_13/5919.rst [new file with mode: 0644]
lib/sqlalchemy/event/base.py
lib/sqlalchemy/events.py
lib/sqlalchemy/sql/naming.py
lib/sqlalchemy/sql/schema.py
test/sql/test_metadata.py