From a9426a4ec4f14aa12c17f22505771a484c87c304 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 16 Mar 2014 18:59:26 -0400 Subject: [PATCH] - add test for drop default --- tests/test_mssql.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_mssql.py b/tests/test_mssql.py index 382c99ce..d87f62a8 100644 --- a/tests/test_mssql.py +++ b/tests/test_mssql.py @@ -96,6 +96,16 @@ class OpTest(TestCase): context.assert_contains("ALTER TABLE t1 DROP COLUMN c1") + def test_alter_column_drop_default(self): + context = op_fixture('mssql') + op.alter_column("t", "c", server_default=None) + context.assert_contains("exec('alter table t drop constraint ' + @const_name)") + + def test_alter_column_dont_drop_default(self): + context = op_fixture('mssql') + op.alter_column("t", "c", server_default=False) + context.assert_() + def test_drop_column_w_check(self): context = op_fixture('mssql') op.drop_column('t1', 'c1', mssql_drop_check=True) -- 2.47.2