__init__.py
31 lines
| 886 B
| text/x-python
|
PythonLexer
r1 | """ | |||
This module extends SQLAlchemy and provides additional DDL [#]_ | ||||
support. | ||||
.. [#] SQL Data Definition Language | ||||
""" | ||||
import re | ||||
import warnings | ||||
import sqlalchemy | ||||
from sqlalchemy import __version__ as _sa_version | ||||
r5162 | warnings.simplefilter("always", DeprecationWarning) | |||
r1 | ||||
r5162 | _sa_version = tuple(int(re.match(r"\d+", x).group(0)) for x in _sa_version.split(".")) | |||
r1 | SQLA_07 = _sa_version >= (0, 7) | |||
SQLA_08 = _sa_version >= (0, 8) | ||||
r4343 | SQLA_09 = _sa_version >= (0, 9) | |||
SQLA_10 = _sa_version >= (1, 0) | ||||
r1 | ||||
del re | ||||
del _sa_version | ||||
from rhodecode.lib.dbmigrate.migrate.changeset.schema import * | ||||
from rhodecode.lib.dbmigrate.migrate.changeset.constraint import * | ||||
r5162 | sqlalchemy.schema.Table.__bases__ += (ChangesetTable,) | |||
sqlalchemy.schema.Column.__bases__ += (ChangesetColumn,) | ||||
sqlalchemy.schema.Index.__bases__ += (ChangesetIndex,) | ||||
r1 | ||||
r5162 | sqlalchemy.schema.DefaultClause.__bases__ += (ChangesetDefaultClause,) | |||