summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-03-11 11:34:40 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-03-11 11:34:40 -0400
commit623569886392e1d9b7fd77f8bad9ca4cc1fb9563 (patch)
treeedcf2255861aeeb496a25b0402d5a4ff8c9d1b03
parent77a6c827bf5556cfbc84b624ac2439f72a358e74 (diff)
downloadalembic-623569886392e1d9b7fd77f8bad9ca4cc1fb9563.tar.gz
- Fixed bug where the mssql DROP COLUMN directive failed to include
modifiers such as "schema" when emitting the DDL. fixes #284
-rw-r--r--alembic/ddl/mssql.py2
-rw-r--r--docs/build/changelog.rst7
-rw-r--r--tests/test_mssql.py5
3 files changed, 13 insertions, 1 deletions
diff --git a/alembic/ddl/mssql.py b/alembic/ddl/mssql.py
index 26c8a25..f516e9b 100644
--- a/alembic/ddl/mssql.py
+++ b/alembic/ddl/mssql.py
@@ -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):
diff --git a/docs/build/changelog.rst b/docs/build/changelog.rst
index 73a046f..d7e239e 100644
--- a/docs/build/changelog.rst
+++ b/docs/build/changelog.rst
@@ -7,6 +7,13 @@ 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
diff --git a/tests/test_mssql.py b/tests/test_mssql.py
index 04fc4d4..19453b2 100644
--- a/tests/test_mssql.py
+++ b/tests/test_mssql.py
@@ -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)