]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
Detect downgrades over dependencies distinctly from unmerge
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 10 Jul 2016 20:23:21 +0000 (16:23 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 12 Jul 2016 19:12:10 +0000 (15:12 -0400)
commit111b1c13ae5a4330ebf0ed6d21c4a6f6bcd9f40e
tree61722c2c0e5f8bc4d82188a9c27bb43bb3b81ebd
parent6d69285f3833b1bdb1d0005756ffcdcad97502f1
Detect downgrades over dependencies distinctly from unmerge

Previously, a downgrade to a version that is also a dependency
to another branch, where that branch is advanced beyond
the target, would fail to be downgraded, as this would
be detected as an "umerge" even though the target version
to be INSERTed would not be present.
The patch replaces the existing heuristic
that checks for "delete" with a new one that calculates
a potential "unmerge" fully, and returns False only if we in
fact could do an unmerge.

Also change the string display of a version so that we don't
display misleading target versions that might not actually
be getting invoked.

Fixes: #377
Change-Id: I7420dd7adbd9ccf9ca85b56d9a792a85c40f3454
alembic/runtime/migration.py
docs/build/changelog.rst
tests/test_version_traversal.py