]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
use correct __mro__ for new mssql _Exec classes, fix #192
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Mar 2014 18:58:45 +0000 (14:58 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Mar 2014 18:58:45 +0000 (14:58 -0400)
alembic/ddl/mssql.py
tests/__init__.py

index 7bfe2932bc42280c0eba30f747de77be9cca07d6..fece08bd0d4dabfdca206a9519aab965af550130 100644 (file)
@@ -124,13 +124,13 @@ class MSSQLImpl(DefaultImpl):
             )
         super(MSSQLImpl, self).drop_column(table_name, column)
 
-class _ExecDropConstraint(ClauseElement, Executable):
+class _ExecDropConstraint(Executable, ClauseElement):
     def __init__(self, tname, colname, type_):
         self.tname = tname
         self.colname = colname
         self.type_ = type_
 
-class _ExecDropFKConstraint(ClauseElement, Executable):
+class _ExecDropFKConstraint(Executable, ClauseElement):
     def __init__(self, tname, colname):
         self.tname = tname
         self.colname = colname
index cd721ae4a4a0b289dc27c07e2871b35e6715f42e..9df275564fb1022cdf821940f7fc0419a82e4ed4 100644 (file)
@@ -182,6 +182,7 @@ def op_fixture(dialect='default', as_sql=False, naming_convention=None):
         def _exec(self, construct, *args, **kw):
             if isinstance(construct, string_types):
                 construct = text(construct)
+            assert construct.supports_execution
             sql = text_type(construct.compile(dialect=self.dialect))
             sql = re.sub(r'[\n\t]', '', sql)
             self.assertion.append(