From: Mike Bayer Date: Fri, 28 Mar 2014 18:58:45 +0000 (-0400) Subject: use correct __mro__ for new mssql _Exec classes, fix #192 X-Git-Tag: rel_0_6_4~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=58c188755a7c6228cf77fa9b656c79d3e38cc576;p=thirdparty%2Fsqlalchemy%2Falembic.git use correct __mro__ for new mssql _Exec classes, fix #192 --- diff --git a/alembic/ddl/mssql.py b/alembic/ddl/mssql.py index 7bfe2932..fece08bd 100644 --- a/alembic/ddl/mssql.py +++ b/alembic/ddl/mssql.py @@ -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 diff --git a/tests/__init__.py b/tests/__init__.py index cd721ae4..9df27556 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -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(