summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-12-05 18:36:59 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-12-05 18:36:59 -0500
commit3621e4b8de9124ad4f27d77c3c6cb7470ba31e69 (patch)
treeb330008dadb3a48eeeeec42faa2aa3a2df1e8c57
parentf895e9be62da814abd21e4bac7f504e0de83cef4 (diff)
downloadsqlalchemy-3621e4b8de9124ad4f27d77c3c6cb7470ba31e69.tar.gz
- changelog + test for pullreq #7, MSSQL dialect for DROP INDEX
-rw-r--r--doc/build/changelog/changelog_08.rst11
-rw-r--r--test/dialect/mssql/test_compiler.py11
2 files changed, 22 insertions, 0 deletions
diff --git a/doc/build/changelog/changelog_08.rst b/doc/build/changelog/changelog_08.rst
index a6583bcc2..fcad47c6f 100644
--- a/doc/build/changelog/changelog_08.rst
+++ b/doc/build/changelog/changelog_08.rst
@@ -12,6 +12,17 @@
: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
:versions: 0.9.0b1
diff --git a/test/dialect/mssql/test_compiler.py b/test/dialect/mssql/test_compiler.py
index f218d9d0e..1742f024c 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,