]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
Support if_exists and if_not_exists on create/drop table commands
authorAaron Griffin <aaron@growtherapy.com>
Tue, 10 Sep 2024 14:36:13 +0000 (10:36 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 13 Sep 2024 17:15:21 +0000 (13:15 -0400)
commit8fae3e1d0813b35b1ffae22ef38f7bea7c93381f
treebf6ecbf638b6c43a392bb342d9355b94d557d0fb
parent9d6e212b77c8ce5ea1164b6d67f2ba491beba413
Support if_exists and if_not_exists on create/drop table commands

Added support for :paramref:`.Operations.create_table.if_not_exists` and
:paramref:`.Operations.drop_table.if_exists`, adding similar functionality
to render IF [NOT] EXISTS for table operations in a similar way as with
indexes. Pull request courtesy Aaron Griffin.

Fixes: #1520
Closes: #1521
Pull-request: https://github.com/sqlalchemy/alembic/pull/1521
Pull-request-sha: 469be01c6b5f9f42dc26017040a6fc54c4caef54

Change-Id: I5dcf44d9e906cdb84c32c4bfb6a1c63cde6324fd
alembic/ddl/impl.py
alembic/op.pyi
alembic/operations/base.py
alembic/operations/ops.py
alembic/operations/toimpl.py
docs/build/unreleased/1520.rst [new file with mode: 0644]
tests/test_op.py