From: Mike Bayer Date: Mon, 1 Dec 2014 00:20:38 +0000 (-0500) Subject: - naming convention limited to SQLA 0.9.4 or greater X-Git-Tag: rel_0_7_1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb90d00e80975fd9930701067066167aee666637;p=thirdparty%2Fsqlalchemy%2Falembic.git - naming convention limited to SQLA 0.9.4 or greater --- diff --git a/alembic/operations.py b/alembic/operations.py index 6a10f382..683d2bda 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 04a32c4b..307d2a18 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 b71e003f..70dad563 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(