From: Mike Bayer Date: Thu, 5 Dec 2013 23:36:59 +0000 (-0500) Subject: - changelog + test for pullreq #7, MSSQL dialect for DROP INDEX X-Git-Tag: rel_0_8_4~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=187db36b74c7a3c5dd3f6b1fe2380abfe88ac54c;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - changelog + test for pullreq #7, MSSQL dialect for DROP INDEX --- diff --git a/doc/build/changelog/changelog_08.rst b/doc/build/changelog/changelog_08.rst index a6583bcc2a..fcad47c6f0 100644 --- a/doc/build/changelog/changelog_08.rst +++ b/doc/build/changelog/changelog_08.rst @@ -11,6 +11,17 @@ .. changelog:: :version: 0.8.4 + .. change:: + :tags: bug, mssql + :versions: 0.9.0b2 + :pullreq: bitbucket:7 + + Fixed bug introduced in 0.8.0 where the ``DROP INDEX`` + statement for an index in MSSQL would render incorrectly if the + index were in an alternate schema; the schemaname/tablename + would be reversed. The format has been also been revised to + match current MSSQL documentation. Courtesy Derek Harland. + .. change:: :tags: feature, sql :tickets: 1443 diff --git a/test/dialect/mssql/test_compiler.py b/test/dialect/mssql/test_compiler.py index f218d9d0ed..1742f024c6 100644 --- a/test/dialect/mssql/test_compiler.py +++ b/test/dialect/mssql/test_compiler.py @@ -538,6 +538,17 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): "CREATE INDEX bar ON foo (x > 5)" ) + def test_drop_index_w_schema(self): + m = MetaData() + t1 = Table('foo', m, + Column('x', Integer), + schema='bar' + ) + self.assert_compile( + schema.DropIndex(Index("idx_foo", t1.c.x)), + "DROP INDEX idx_foo ON bar.foo" + ) + def test_index_extra_include_1(self): metadata = MetaData() tbl = Table('test', metadata,