summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordonkopotamus <derek.harland@finq.co.nz>2013-12-05 16:49:13 +1300
committerdonkopotamus <derek.harland@finq.co.nz>2013-12-05 16:49:13 +1300
commitb18440c8326539582153f4dbb4a3b09f29535712 (patch)
tree5cfe41c3b3eeb460d640316d34692ad9f135fc83
parentbddf55fef6d62b180042f367eb0ad73166d5bf00 (diff)
downloadsqlalchemy-b18440c8326539582153f4dbb4a3b09f29535712.tar.gz
Fix MSSQL dialects visit_drop_index to use the correct DDL
-rw-r--r--lib/sqlalchemy/dialects/mssql/base.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py
index 06570b032..c8e0d7dda 100644
--- a/lib/sqlalchemy/dialects/mssql/base.py
+++ b/lib/sqlalchemy/dialects/mssql/base.py
@@ -1018,13 +1018,11 @@ class MSDDLCompiler(compiler.DDLCompiler):
return text
def visit_drop_index(self, drop):
- return "\nDROP INDEX %s.%s" % (
- self.preparer.quote_identifier(drop.element.table.name),
- self._prepared_index_name(drop.element,
- include_schema=True)
+ return "\nDROP INDEX %s ON %s" % (
+ self._prepared_index_name(drop.element, include_schema=False),
+ self.preparer.format_table(drop.element.table)
)
-
class MSIdentifierPreparer(compiler.IdentifierPreparer):
reserved_words = RESERVED_WORDS