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_8_4~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f18f9b2f5f354421986d5e16793ca663d1fb14c;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 fa6db3453c..fb405bfebc 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