Files @ b2575bdb847c
Branch filter:

Location: kallithea/rhodecode/lib/dbmigrate/migrate/changeset/__init__.py

Mads Kiilerich
diffs: drop diffs.differ

This function did not really add any value, it was yet another layer that was
hiding the bug that we use ref[1] without ref[0], and it had this strange
undefined behaviour for diffing across repos.

Inlining the call to .get_diff do not make the code more complex but makes it
more obvious what is going on so it can be cleaned up later.
"""
   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)

_sa_version = tuple(int(re.match("\d+", x).group(0))
                    for x in _sa_version.split("."))
SQLA_06 = _sa_version >= (0, 6)
SQLA_07 = _sa_version >= (0, 7)

del re
del _sa_version

from rhodecode.lib.dbmigrate.migrate.changeset.schema import *
from rhodecode.lib.dbmigrate.migrate.changeset.constraint import *

sqlalchemy.schema.Table.__bases__ += (ChangesetTable,)
sqlalchemy.schema.Column.__bases__ += (ChangesetColumn,)
sqlalchemy.schema.Index.__bases__ += (ChangesetIndex,)

sqlalchemy.schema.DefaultClause.__bases__ += (ChangesetDefaultClause,)