__init__.py
30 lines
| 841 B
| text/x-python
|
PythonLexer
r833 | """ | |||
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 | ||||
warnings.simplefilter('always', DeprecationWarning) | ||||
r1818 | _sa_version = tuple(int(re.match("\d+", x).group(0)) | |||
r1210 | for x in _sa_version.split(".")) | |||
r833 | SQLA_06 = _sa_version >= (0, 6) | |||
r1442 | SQLA_07 = _sa_version >= (0, 7) | |||
r833 | ||||
del re | ||||
del _sa_version | ||||
r835 | from rhodecode.lib.dbmigrate.migrate.changeset.schema import * | |||
from rhodecode.lib.dbmigrate.migrate.changeset.constraint import * | ||||
r833 | ||||
r1210 | sqlalchemy.schema.Table.__bases__ += (ChangesetTable,) | |||
sqlalchemy.schema.Column.__bases__ += (ChangesetColumn,) | ||||
sqlalchemy.schema.Index.__bases__ += (ChangesetIndex,) | ||||
r833 | ||||
r1210 | sqlalchemy.schema.DefaultClause.__bases__ += (ChangesetDefaultClause,) | |||