]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
add create_type to Enum
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 21 Sep 2025 16:13:21 +0000 (12:13 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 21 Sep 2025 16:15:49 +0000 (12:15 -0400)
commitfbb623d9ceac8f5499d0d40f8db6f5606b26b068
tree44634e8b48f2a03f3c145321e4005a51d0b123b8
parentfb3243475e208673d98c6a543cf16169f7f5f42d
add create_type to Enum

Added new parameter :paramref:`.Enum.create_type` to the Core
:class:`.Enum` class. This parameter is automatically passed to the
corresponding :class:`_postgresql.ENUM` native type during DDL operations,
allowing control over whether the PostgreSQL ENUM type is implicitly
created or dropped within DDL operations that are otherwise targeting
tables only. This provides control over the
:paramref:`_postgresql.ENUM.create_type` behavior without requiring
explicit creation of a :class:`_postgresql.ENUM` object.

Fixes: #10604
Change-Id: I450003ec2a2a65c119fe7ca8ff201392ce6b91e1
doc/build/changelog/unreleased_21/10604.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/named_types.py
lib/sqlalchemy/sql/sqltypes.py
test/dialect/postgresql/test_types.py