]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
support create/drop events for all CREATE/DROP
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 16 Aug 2022 14:44:48 +0000 (10:44 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 20 Aug 2022 15:10:33 +0000 (11:10 -0400)
commitc5a316053d6201981240c7f8fb73934a0b241b7c
tree08f6f57449aaf33aaf26bd9690a00db63cd6ef38
parenta134ec1760df6295d537ff63df7aee83d957bf6a
support create/drop events for all CREATE/DROP

Implemented the DDL event hooks :meth:`.DDLEvents.before_create`,
:meth:`.DDLEvents.after_create`, :meth:`.DDLEvents.before_drop`,
:meth:`.DDLEvents.after_drop` for all :class:`.SchemaItem` objects that
include a distinct CREATE or DROP step, when that step is invoked as a
distinct SQL statement, including for :class:`.ForeignKeyConstraint`,
:class:`.Sequence`, :class:`.Index`, and PostgreSQL's
:class:`_postgresql.ENUM`.

Fixes: #8394
Change-Id: Iee6274984e794f50103451a04d089641d6ac443a
doc/build/changelog/unreleased_20/8394.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/named_types.py
lib/sqlalchemy/sql/ddl.py
lib/sqlalchemy/sql/events.py
lib/sqlalchemy/sql/sqltypes.py
test/dialect/postgresql/test_types.py
test/engine/test_ddlevents.py