summaryrefslogtreecommitdiff
path: root/alembic/script/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-07-12 15:05:09 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2016-07-12 15:13:05 -0400
commitca849060eb85dff7d7c9081c180c9a09cf365058 (patch)
tree15b28dab8a818ac93cedd4854b96e848b26a32c4 /alembic/script/base.py
parent111b1c13ae5a4330ebf0ed6d21c4a6f6bcd9f40e (diff)
downloadalembic-ca849060eb85dff7d7c9081c180c9a09cf365058.tar.gz
Don't remove dependent version when downgrading to a version.
Adjusted the version traversal on downgrade such that we can downgrade to a version that is a dependency for a version in a different branch, *without* needing to remove that dependent version as well. Previously, the target version would be seen as a "merge point" for it's normal up-revision as well as the dependency. This integrates with the changes for :ticket:`377` and :ticket:`378` to improve treatment of branches with dependencies overall. Change-Id: Ica0732f6419f68ab85650170839ac8000ba3bbfb Fixes: #379
Diffstat (limited to 'alembic/script/base.py')
-rw-r--r--alembic/script/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alembic/script/base.py b/alembic/script/base.py
index 98c5311..a9b6e7d 100644
--- a/alembic/script/base.py
+++ b/alembic/script/base.py
@@ -329,7 +329,7 @@ class ScriptDirectory(object):
ancestor="Destination %(end)s is not a valid downgrade "
"target from current head(s)", end=destination):
revs = self.revision_map.iterate_revisions(
- current_rev, destination)
+ current_rev, destination, select_for_downgrade=True)
return [
migration.MigrationStep.downgrade_from_script(
self.revision_map, script)