From bb90d00e80975fd9930701067066167aee666637 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 30 Nov 2014 19:20:38 -0500 Subject: - naming convention limited to SQLA 0.9.4 or greater --- alembic/operations.py | 2 +- docs/build/batch.rst | 3 +++ tests/test_batch.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/alembic/operations.py b/alembic/operations.py index 6a10f38..683d2bd 100644 --- a/alembic/operations.py +++ b/alembic/operations.py @@ -296,7 +296,7 @@ class Operations(object): to the :class:`~sqlalchemy.schema.MetaData` during the reflection process. This is typically required if one wants to drop SQLite constraints, as these constraints will not have names when - reflected on this backend. + reflected on this backend. Requires SQLAlchemy **0.9.4** or greater. .. seealso:: diff --git a/docs/build/batch.rst b/docs/build/batch.rst index 04a32c4..307d2a1 100644 --- a/docs/build/batch.rst +++ b/docs/build/batch.rst @@ -163,6 +163,9 @@ as described in :ref:`autogen_naming_conventions`. Usage is as follows:: batch_op.drop_constraint( "fk_bar_foo_id_foo", type_="foreignkey") +Note that the naming convention feature requires at least +**SQLAlchemy 0.9.4** for support. + .. versionadded:: 0.7.1 added :paramref:`~.Operations.batch_alter_table.naming_convention` to :meth:`.Operations.batch_alter_table`. diff --git a/tests/test_batch.py b/tests/test_batch.py index b71e003..70dad56 100644 --- a/tests/test_batch.py +++ b/tests/test_batch.py @@ -675,6 +675,7 @@ class BatchRoundTripTest(TestBase): {"id": 5, "x": 9} ]) + @config.requirements.sqlalchemy_094 @config.requirements.unnamed_constraints def test_drop_foreign_key(self): bar = Table( -- cgit v1.2.1