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

upgrade blank DB when there's no version files at all, regression in new system #258

Closed
sqlalchemy-bot opened this Issue Dec 30, 2014 · 2 comments

Comments

Projects
None yet
1 participant
@sqlalchemy-bot

sqlalchemy-bot commented Dec 30, 2014

Migrated issue, originally created by Michael Bayer (@zzzeek)

#!

$ python -m alembic.config upgrade head 
INFO  [alembic.migration] Context impl PostgresqlImpl.
INFO  [alembic.migration] Will assume transactional DDL.
Traceback (most recent call last):

...

  File "alembic/migration.py", line 296, in run_migrations
    for step in self._migrations_fn(heads, self):
  File "alembic/command.py", line 154, in upgrade
    return script._upgrade_revs(revision, rev)
  File "alembic/script.py", line 303, in _upgrade_revs
    revs = list(revs)
  File "alembic/revision.py", line 581, in _iterate_revisions
    upper_ancestors = set(self._get_ancestor_nodes(uppers, check=True))
  File "alembic/revision.py", line 551, in _iterate_related_revisions
    map_[rev_id] for rev_id in fn(rev))
  File "alembic/revision.py", line 531, in <lambda>
    fn = lambda rev: rev._all_down_revisions
AttributeError: 'NoneType' object has no attribute '_all_down_revisions'
classics-MacBook-Pro-2:alembic classic$ 

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Dec 30, 2014

Michael Bayer (@zzzeek) wrote:

  • Fixed regression in new versioning system where upgrade / history
    operation would fail on AttributeError if no version files were
    present at all.
    fixes #258

850cc34

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Dec 30, 2014

Changes by Michael Bayer (@zzzeek):

  • changed status to closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment