sqlalchemy-migrate/migrate/changeset/__init__.py
Mike Bayer a94dae7a01 Update tests and reqs for SQLA 1.0
Lift the requirements to support SQLAlchemy 1.0.  Two tests
were calling upon revised APIs and required adjustment.

Change-Id: Ic91a91bb3c915027b522eace302f2ed074233294
2015-07-01 20:01:52 +00:00

29 lines
772 B
Python

"""
This module extends SQLAlchemy and provides additional DDL [#]_
support.
.. [#] SQL Data Definition Language
"""
import re
import sqlalchemy
from sqlalchemy import __version__ as _sa_version
_sa_version = tuple(int(re.match("\d+", x).group(0)) for x in _sa_version.split("."))
SQLA_07 = _sa_version >= (0, 7)
SQLA_08 = _sa_version >= (0, 8)
SQLA_09 = _sa_version >= (0, 9)
SQLA_10 = _sa_version >= (1, 0)
del re
del _sa_version
from migrate.changeset.schema import *
from migrate.changeset.constraint import *
sqlalchemy.schema.Table.__bases__ += (ChangesetTable, )
sqlalchemy.schema.Column.__bases__ += (ChangesetColumn, )
sqlalchemy.schema.Index.__bases__ += (ChangesetIndex, )
sqlalchemy.schema.DefaultClause.__bases__ += (ChangesetDefaultClause, )