diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-11-18 18:13:02 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-11-18 18:13:02 -0500 |
commit | a056d6f8237d9197278f4b5ce0d66014767d31cb (patch) | |
tree | 974766e8f6488daa716f844b4b89688932eb41b7 | |
parent | 20cc68dedc4e67daac63461c0ee0e1b5940f3bd7 (diff) | |
download | alembic-a056d6f8237d9197278f4b5ce0d66014767d31cb.tar.gz |
everythings passing, again.
-rw-r--r-- | alembic/migration.py | 3 | ||||
-rw-r--r-- | tests/test_version_table.py | 9 |
2 files changed, 5 insertions, 7 deletions
diff --git a/alembic/migration.py b/alembic/migration.py index d8077b7..4f5f342 100644 --- a/alembic/migration.py +++ b/alembic/migration.py @@ -692,7 +692,6 @@ class StampStep(MigrationStep): def __init__(self, from_, to_, is_upgrade, branch_move): self.from_ = util.to_tuple(from_, default=()) self.to_ = util.to_tuple(to_, default=()) - assert len(self.to_) <= 1 self.is_upgrade = is_upgrade self.branch_move = branch_move self.migration_fn = self.stamp_revision @@ -743,4 +742,4 @@ class StampStep(MigrationStep): return len(self.from_) > 1 def should_unmerge_branches(self, heads): - return False + return len(self.to_) > 1 diff --git a/tests/test_version_table.py b/tests/test_version_table.py index 5e333aa..2271180 100644 --- a/tests/test_version_table.py +++ b/tests/test_version_table.py @@ -7,21 +7,20 @@ from sqlalchemy.engine.reflection import Inspector from alembic import migration from alembic.util import CommandError -from alembic import util version_table = Table('version_table', MetaData(), Column('version_num', String(32), nullable=False)) def _up(from_, to_, branch_presence_changed=False): - return migration.MigrationStep( - None, util.to_tuple(from_), to_, "", True, branch_presence_changed + return migration.StampStep( + from_, to_, True, branch_presence_changed ) def _down(from_, to_, branch_presence_changed=False): - return migration.MigrationStep( - None, from_, util.to_tuple(to_), "", False, branch_presence_changed + return migration.StampStep( + from_, to_, False, branch_presence_changed ) |