diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-28 14:58:45 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-28 14:58:45 -0400 |
commit | 58c188755a7c6228cf77fa9b656c79d3e38cc576 (patch) | |
tree | d5f56ac25c1bf0c3b6a48ccbb66cc5fd35ffc6e6 | |
parent | efecc6c178d7b62f3d5ee35f2bf51ab79d310cdd (diff) | |
download | alembic-58c188755a7c6228cf77fa9b656c79d3e38cc576.tar.gz |
use correct __mro__ for new mssql _Exec classes, fix #192
-rw-r--r-- | alembic/ddl/mssql.py | 4 | ||||
-rw-r--r-- | tests/__init__.py | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/alembic/ddl/mssql.py b/alembic/ddl/mssql.py index 7bfe293..fece08b 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 cd721ae..9df2755 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( |