]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- changelog + test for pullreq #7, MSSQL dialect for DROP INDEX
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 5 Dec 2013 23:36:59 +0000 (18:36 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 5 Dec 2013 23:37:58 +0000 (18:37 -0500)
doc/build/changelog/changelog_08.rst
test/dialect/mssql/test_compiler.py

index a6583bcc2a36b128f59021926c933eaa472d8afe..fcad47c6f0ac631dc9c11275185bb531a8f4d881 100644 (file)
 .. 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
index f218d9d0ed940994fc1bb791ce8d4e8e22290b8b..1742f024c6bfec6b16a9365d6730feb6fc1f3aa9 100644 (file)
@@ -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,