]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
- Fixed bug where the mssql DROP COLUMN directive failed to include
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 11 Mar 2015 15:34:40 +0000 (11:34 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 11 Mar 2015 15:34:40 +0000 (11:34 -0400)
modifiers such as "schema" when emitting the DDL.
fixes #284

alembic/ddl/mssql.py
docs/build/changelog.rst
tests/test_mssql.py

index 26c8a2560e3f16a6b8bd7bf9685ef52285422af3..f516e9bc8fb30e2b69f6274e15b7911e334faf8b 100644 (file)
@@ -123,7 +123,7 @@ class MSSQLImpl(DefaultImpl):
             self._exec(
                 _ExecDropFKConstraint(table_name, column)
             )
-        super(MSSQLImpl, self).drop_column(table_name, column)
+        super(MSSQLImpl, self).drop_column(table_name, column, **kw)
 
 
 class _ExecDropConstraint(Executable, ClauseElement):
index 73a046f1f0709b43489837a4c6e2f14ed0e26490..d7e239e46a9d44a6abde4b1f4fc11b6773c6cc5d 100644 (file)
@@ -6,6 +6,13 @@ Changelog
 .. changelog::
     :version: 0.7.5
 
+    .. change::
+      :tags: bug, operations, mssql
+      :tickets: 284
+
+      Fixed bug where the mssql DROP COLUMN directive failed to include
+      modifiers such as "schema" when emitting the DDL.
+
     .. change::
       :tags: bug, autogenerate, postgresql
       :tickets: 282
index 04fc4d416ec5961d435e3ba770503985b7b64c0b..19453b22b73f969c1365f13bde36ddaf4fd5b228 100644 (file)
@@ -116,6 +116,11 @@ class OpTest(TestBase):
         op.alter_column("t", "c", server_default=False)
         context.assert_()
 
+    def test_drop_column_w_schema(self):
+        context = op_fixture('mssql')
+        op.drop_column('t1', 'c1', schema='xyz')
+        context.assert_contains("ALTER TABLE xyz.t1 DROP COLUMN c1")
+
     def test_drop_column_w_check(self):
         context = op_fixture('mssql')
         op.drop_column('t1', 'c1', mssql_drop_check=True)