From: Mike Bayer Date: Wed, 11 Mar 2015 15:34:40 +0000 (-0400) Subject: - Fixed bug where the mssql DROP COLUMN directive failed to include X-Git-Tag: rel_0_7_5~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=623569886392e1d9b7fd77f8bad9ca4cc1fb9563;p=thirdparty%2Fsqlalchemy%2Falembic.git - Fixed bug where the mssql DROP COLUMN directive failed to include modifiers such as "schema" when emitting the DDL. fixes #284 --- diff --git a/alembic/ddl/mssql.py b/alembic/ddl/mssql.py index 26c8a256..f516e9bc 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 73a046f1..d7e239e4 100644 --- a/docs/build/changelog.rst +++ b/docs/build/changelog.rst @@ -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 diff --git a/tests/test_mssql.py b/tests/test_mssql.py index 04fc4d41..19453b22 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)