From: donkopotamus Date: Thu, 5 Dec 2013 03:49:13 +0000 (+1300) Subject: Fix MSSQL dialects visit_drop_index to use the correct DDL X-Git-Tag: rel_0_9_0~54^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b18440c8326539582153f4dbb4a3b09f29535712;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fix MSSQL dialects visit_drop_index to use the correct DDL --- diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index 06570b032f..c8e0d7dda3 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