]> 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:11:41 +0000 (12:11 -0500)
commit9660e94e35be438b0d51cd87e6ccb4047a332c15
tree0a888b4fb18430618bca045b3c2456dff893f6cb
parente91d918fc24d678a413feb3744e70014f54172c7
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
doc/build/changelog/unreleased_13/5919.rst [new file with mode: 0644]
lib/sqlalchemy/event/base.py
lib/sqlalchemy/sql/events.py
lib/sqlalchemy/sql/naming.py
lib/sqlalchemy/sql/schema.py
test/sql/test_metadata.py