Ok. This works for me, and I probably hallucinated the bug with the populated 
versions. Thanks for the quick response!


—
Rotem

On Tue, Dec 30, 2014 at 7:54 PM, Rotem Yaari <[email protected]> wrote:

> Thanks! Will try again. I am not 100% sure but I think a similar issue 
> happened even when versions were present. Will report back with findings. 
> —
> Rotem
> On Tue, Dec 30, 2014 at 7:19 PM, Michael Bayer <[email protected]>
> wrote:
>> that’s fixed in 
>> https://bitbucket.org/zzzeek/alembic/issue/258/upgrade-blank-db-when-theres-no-version
>>  and I’ve released 0.7.3.
>> Michael Bayer <[email protected]> wrote:
>>> oh.    You have *no* versions, that does it.   Right!   OK that’s a bug on 
>>> my end.   will fix.
>>> 
>>> 
>>> 
>>> Michael Bayer <[email protected] <mailto:[email protected]>> 
>>> wrote:
>>> 
>>>> looks a bit like an alembic issue.
>>>> 
>>>> do you have a lot of migration files, and if the number is few, what does 
>>>> an “alembic history” look like here?   something about your revision tree 
>>>> is weird.  Or in conjunction with what’s being passed, can you tell what 
>>>> “revision” is at the start of the stack ?
>>>> 
>>>> 
>>>> vmalloc <[email protected] <mailto:[email protected]>> wrote:
>>>> 
>>>>> I am using a basic scenario in which I run upgrade on an empty db using 
>>>>> Flask-Migrate and alembic. This used to work under Alembic 0.6.7, but now 
>>>>> I'm getting this:
>>>>> 
>>>>>   File 
>>>>> "/usr/local/lib/python2.7/site-packages/flask_migrate/__init__.py", line 
>>>>> 98, in upgrade
>>>>>     command.upgrade(config, revision, sql = sql, tag = tag)
>>>>>   File "/usr/local/lib/python2.7/site-packages/alembic/command.py", line 
>>>>> 165, in upgrade
>>>>>     script.run_env()
>>>>>   File "/usr/local/lib/python2.7/site-packages/alembic/script.py", line 
>>>>> 382, in run_env
>>>>>     util.load_python_file(self.dir, 'env.py')
>>>>>   File "/usr/local/lib/python2.7/site-packages/alembic/util.py", line 
>>>>> 241, in load_python_file
>>>>>     module = load_module_py(module_id, path)
>>>>>   File "/usr/local/lib/python2.7/site-packages/alembic/compat.py", line 
>>>>> 79, in load_module_py
>>>>>     mod = imp.load_source(module_id, path, fp)
>>>>>   File "migrations/env.py", line 72, in <module>
>>>>>     run_migrations_online()
>>>>>   File "migrations/env.py", line 65, in run_migrations_online
>>>>>     context.run_migrations()
>>>>>   File "<string>", line 7, in run_migrations
>>>>>   File "/usr/local/lib/python2.7/site-packages/alembic/environment.py", 
>>>>> line 742, in run_migrations
>>>>>     self.get_context().run_migrations(**kw)
>>>>>   File "/usr/local/lib/python2.7/site-packages/alembic/migration.py", 
>>>>> line 296, in run_migrations
>>>>>     for step in self._migrations_fn(heads, self):
>>>>>   File "/usr/local/lib/python2.7/site-packages/alembic/command.py", line 
>>>>> 154, in upgrade
>>>>>     return script._upgrade_revs(revision, rev)
>>>>>   File "/usr/local/lib/python2.7/site-packages/alembic/script.py", line 
>>>>> 303, in _upgrade_revs
>>>>>     revs = list(revs)
>>>>>   File "/usr/local/lib/python2.7/site-packages/alembic/revision.py", line 
>>>>> 581, in _iterate_revisions
>>>>>     upper_ancestors = set(self._get_ancestor_nodes(uppers, check=True))
>>>>>   File "/usr/local/lib/python2.7/site-packages/alembic/revision.py", line 
>>>>> 551, in _iterate_related_revisions
>>>>>     map_[rev_id] for rev_id in fn(rev))
>>>>>   File "/usr/local/lib/python2.7/site-packages/alembic/revision.py", line 
>>>>> 531, in <lambda>
>>>>>     fn = lambda rev: rev._all_down_revisions
>>>>> AttributeError: 'NoneType' object has no attribute '_all_down_revisions'
>>>>> 
>>>>> I'm not sure this is an Alembic issue, but not sure where to start 
>>>>> investigating either... Any clues anyone?
>>>>> 
>>>>> Thanks
>>>>> 
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google Groups 
>>>>> "sqlalchemy-alembic" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>>> email to [email protected] 
>>>>> <mailto:[email protected]>.
>>>>> For more options, visit https://groups.google.com/d/optout 
>>>>> <https://groups.google.com/d/optout>.
>>>> 
>>>> 
>>>> -- 
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "sqlalchemy-alembic" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>> email to [email protected] 
>>>> <mailto:[email protected]>.
>>>> For more options, visit https://groups.google.com/d/optout 
>>>> <https://groups.google.com/d/optout>.
>>> 
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "sqlalchemy-alembic" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to [email protected] 
>>> <mailto:[email protected]>.
>>> For more options, visit https://groups.google.com/d/optout 
>>> <https://groups.google.com/d/optout>.
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "sqlalchemy-alembic" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/sqlalchemy-alembic/kAtXurF-SYU/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected].
>> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to