Error Message "Requested revision overlaps with other requested revisions" with branching #1646
Unanswered
NiklasMM
asked this question in
Usage Questions
Replies: 1 comment
-
it's not the problem here, but "base" is a reserved revision name so I'd advise not using that as a name. the stamp for "A" and "Z" is not how the alembic version table represents this because Z implies A. so you'd just want to "stamp" with Z. it would be nice if "stamp" were smart enough to tell you this but apparently it's not. $ alembic revision -m "rev a" --rev-id a --branch-label "somebase"
Generating /home/classic/dev/alembic/foo/versions/a_rev_a.py ... done
$ alembic revision -m "rev b" --rev-id b
Generating /home/classic/dev/alembic/foo/versions/b_rev_b.py ... done
$ alembic revision -m "rev z" --rev-id z --branch-label "alt" --head base --depends-on a
Generating /home/classic/dev/alembic/foo/versions/z_rev_z.py ... done
$ alembic upgrade z
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> a, rev a
INFO [alembic.runtime.migration] Running upgrade -> z, rev z
$ alembic current
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
a
z (head)
$ psql -U scott test -c "select * from alembic_version;"
version_num
-------------
z
(1 row) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've got a setup with intentional branching (several modules of the core software keep their own line of migrations) and have run into a weird issue, where when upgrading I get the error
Requested revision overlaps with other requested revisions
.A minimal example / reproduction path would be this:
depends_on=["A"]
alembic upgrade heads
(the heads are Z for branchalt
and B for branchbase
)I get the error
FAILED: Requested revision Z overlaps with other requested revisions A
I expected it to upgrade A -> B and don't see what is meant by "overlaps" in this case.
Any help would be appreciated!
(I'm running alembic 1.15.2)
Beta Was this translation helpful? Give feedback.
All reactions