]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Implement checkfirst for Index.create(), Index.drop()
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 6 Aug 2019 20:10:09 +0000 (16:10 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 7 Aug 2019 03:11:54 +0000 (23:11 -0400)
commitd8da7f5ac544f3dd853a221faa5fab4ff788e25b
tree0ec2fa102695a107eb799ed12c4ade60e84a8790
parent6a622c636ca5bc55d96b92652fd43b914a77645c
Implement checkfirst for Index.create(), Index.drop()

The :meth:`.Index.create` and :meth:`.Index.drop` methods now have a
parameter :paramref:`.Index.create.checkfirst`, in the same way as that of
:class:`.Table` and :class:`.Sequence`, which when enabled will cause the
operation to detect if the index exists (or not) before performing a create
or drop operation.

Fixes: #527
Change-Id: Idf994bc016359d0ae86cc64ccb20378115cb66d6
doc/build/changelog/unreleased_14/527.rst [new file with mode: 0644]
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/engine/interfaces.py
lib/sqlalchemy/sql/ddl.py
lib/sqlalchemy/sql/schema.py
lib/sqlalchemy/testing/suite/test_reflection.py
test/sql/test_ddlemit.py