Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should "stamp heads" work? #267

Closed
sqlalchemy-bot opened this issue Jan 23, 2015 · 10 comments
Closed

Should "stamp heads" work? #267

sqlalchemy-bot opened this issue Jan 23, 2015 · 10 comments
Labels
bug Something isn't working

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by MichaelE (@miracle2k)

I want to stamp all heads. It currently tells me:

INFO  [alembic.migration] Context impl MySQLImpl.
INFO  [alembic.migration] Will assume non-transactional DDL.
ERROR [alembic.util] Multiple head revisions are present for given argument 'heads'; please specify a specific target revision, '<branchname>@heads' to narrow to a specific head, or 'heads' for all heads
  FAILED: Multiple head revisions are present for given argument 'heads'; please specify a specific target revision, '<branchname>@heads'
  to narrow to a specific head, or 'heads' for all heads
@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

56d56f5

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

so I sort of left this off at first because stamp was so difficult to get it working in the first place, I didn't feel like pushing it. But as you can see this was a simple change.

@sqlalchemy-bot
Copy link
Author

MichaelE (@miracle2k) wrote:

Just amazing, thanks.

@sqlalchemy-bot
Copy link
Author

MichaelE (@miracle2k) wrote:

I have run into a problem trying to use this, which is that

"stamp foo@heads"

is idempotent, but

stamp heads

fails when there a branch doesn't need to be stamped:

  File "<string>", line 7, in run_migrations
  File "/Users/michael/.virtualenvs/cms26/lib/python2.6/site-packages/alembic/environment.py", line 742, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/Users/michael/.virtualenvs/cms26/lib/python2.6/site-packages/alembic/migration.py", line 316, in run_migrations
    head_maintainer.update_to_step(step)
  File "/Users/michael/.virtualenvs/cms26/lib/python2.6/site-packages/alembic/migration.py", line 475, in update_to_step
    self._insert_version(vers)
  File "/Users/michael/.virtualenvs/cms26/lib/python2.6/site-packages/alembic/migration.py", line 424, in _insert_version
    assert version not in self.heads
AssertionError

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

stamp was really hard to write.... :) ok

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

fix one remaining aspect

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to reopened

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

e8a0c74

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot sqlalchemy-bot added the bug Something isn't working label Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant