diff options
author | Simon Bowly <simon.bowly@gmail.com> | 2021-02-02 22:11:15 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-04-26 15:21:11 -0400 |
commit | 58a170a6c6bfa5d0460c038d63b66d74a5a2c830 (patch) | |
tree | 2aa827e8d5cd52f9d3306eabb315992776159d47 /tests/test_script_production.py | |
parent | f94765f82d8770c234a2c1850116d33000fb5d75 (diff) | |
download | alembic-58a170a6c6bfa5d0460c038d63b66d74a5a2c830.tar.gz |
New downgrade algorithm to fix branch behaviour
The algorithm used for calculating downgrades/upgrades/iterating
revisions has been rewritten, to resolve ongoing issues of branches
not being handled consistently particularly within downgrade operations,
as well as for overall clarity and maintainability. This change includes
that a deprecation warning is emitted if an ambiguous command such
as "downgrade -1" when multiple heads are present is given.
In particular, the change implements a long-requested use case of allowing
downgrades of a single branch to a branchpoint.
Huge thanks to Simon Bowly for their impressive efforts in successfully
tackling this very difficult problem.
Topological algorithm written by Mike which retains the
behavior of walking along a single branch as long as
possible before switching to another branch due to
cross-dependencies.
Fixes: #765
Fixes: #464
Fixes: #603
Fixes: #660
Closes: #790
Pull-request: https://github.com/sqlalchemy/alembic/pull/790
Pull-request-sha: 60752399336b883d26f38d61a8337dd6fdd48087
Change-Id: I8ab81d241df52a6bf0a474ccee35b16aecd706ac
Diffstat (limited to 'tests/test_script_production.py')
-rw-r--r-- | tests/test_script_production.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_script_production.py b/tests/test_script_production.py index 6033512..15d9366 100644 --- a/tests/test_script_production.py +++ b/tests/test_script_production.py @@ -1188,9 +1188,9 @@ class DuplicateVersionLocationsTest(TestBase): ) script = ScriptDirectory.from_config(self.cfg) - self.model1 = util.rev_id() - self.model2 = util.rev_id() - self.model3 = util.rev_id() + self.model1 = "ccc" + util.rev_id() + self.model2 = "bbb" + util.rev_id() + self.model3 = "aaa" + util.rev_id() for model, name in [ (self.model1, "model1"), (self.model2, "model2"), |