]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Drop default-related structures after the Table is dropped.
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Jul 2018 13:41:21 +0000 (09:41 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 11 Jul 2018 02:39:09 +0000 (22:39 -0400)
commit3d2a2fb84dc21d084ec2c4d1f7f2691311a41567
tree4f786cf3cb718ccff39289e062019b5e03ec8eb8
parent5a7667e5807deb19f5012ef1a07f6be95f7d580a
Drop default-related structures after the Table is dropped.

Fixed bug where a :class:`.Sequence` would be dropped explicitly before any
:class:`.Table` that refers to it, which breaks in the case when the
sequence is also involved in a server-side default for that table, when
using :meth:`.MetaData.drop_all`.   The step which processes sequences
to be dropped via non server-side column default functions is now invoked
after the table itself is dropped.

Change-Id: I185f2cc76d2011ad4dd3ba9bde5d8aef0ec335ae
Fixes: #4300
(cherry picked from commit 532566ba1f28ff8a6afa6eacc10c59eb918501f6)
doc/build/changelog/unreleased_12/4300.rst [new file with mode: 0644]
doc/build/core/defaults.rst
lib/sqlalchemy/sql/ddl.py
test/engine/test_execute.py
test/requirements.py
test/sql/test_defaults.py