You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the initialize_db script is used by an extended application, he did not correctly check the alembic version of the database.
(env)miniwark@lazaret:/home/miniwark/anuket/begotemp# initialize_anuket_db development.ini
2012-11-12 17:29:14,199 INFO [sqlalchemy.engine.base.Engine][MainThread] select version()
2012-11-12 17:29:14,199 INFO [sqlalchemy.engine.base.Engine][MainThread] {}
2012-11-12 17:29:14,201 INFO [sqlalchemy.engine.base.Engine][MainThread] select current_schema()
2012-11-12 17:29:14,201 INFO [sqlalchemy.engine.base.Engine][MainThread] {}
2012-11-12 17:29:14,205 INFO [sqlalchemy.engine.base.Engine][MainThread] BEGIN (implicit)
2012-11-12 17:29:14,206 INFO [sqlalchemy.engine.base.Engine][MainThread] select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where n.nspname=current_schema() and relname=%(name)s
2012-11-12 17:29:14,206 INFO [sqlalchemy.engine.base.Engine][MainThread] {'name': u'alembic_version'}
2012-11-12 17:29:14,209 INFO [sqlalchemy.engine.base.Engine][MainThread]
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL
)
2012-11-12 17:29:14,209 INFO [sqlalchemy.engine.base.Engine][MainThread] {}
2012-11-12 17:29:14,211 INFO [sqlalchemy.engine.base.Engine][MainThread] SELECT alembic_version.version_num
FROM alembic_version
2012-11-12 17:29:14,212 INFO [sqlalchemy.engine.base.Engine][MainThread] {}
2012-11-12 17:29:14,213 INFO [sqlalchemy.engine.base.Engine][MainThread] select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where n.nspname=current_schema() and relname=%(name)s
2012-11-12 17:29:14,213 INFO [sqlalchemy.engine.base.Engine][MainThread] {'name': u'alembic_version'}
2012-11-12 17:29:14,215 INFO [sqlalchemy.engine.base.Engine][MainThread] SELECT alembic_version.version_num
FROM alembic_version
2012-11-12 17:29:14,215 INFO [sqlalchemy.engine.base.Engine][MainThread] {}
2012-11-12 17:29:14,216 INFO [sqlalchemy.engine.base.Engine][MainThread] ROLLBACK
Traceback (most recent call last):
File "/home/miniwark/anuket/env/bin/initialize_anuket_db", line 9, in
load_entry_point('anuket==0.6a', 'console_scripts', 'initialize_anuket_db')()
File "/home/miniwark/anuket/anuket/anuket/scripts/initializedb.py", line 23, in main
return command.run()
File "/home/miniwark/anuket/anuket/anuket/scripts/initializedb.py", line 56, in run
return self.initialize_db()
File "/home/miniwark/anuket/anuket/anuket/scripts/initializedb.py", line 100, in initialize_db
stamp(alembic_cfg, 'head')
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/command.py", line 212, in stamp
script.run_env()
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/script.py", line 191, in run_env
util.load_python_file(self.dir, 'env.py')
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/util.py", line 185, in load_python_file
module = imp.load_source(module_id, path, open(path, 'rb'))
File "/home/miniwark/anuket/begotemp/begotemp/scripts/alembic/env.py", line 70, in
run_migrations_online()
File "/home/miniwark/anuket/begotemp/begotemp/scripts/alembic/env.py", line 63, in run_migrations_online
context.run_migrations()
File "", line 7, in run_migrations
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/environment.py", line 494, in run_migrations
self.get_context().run_migrations(**kw)
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/migration.py", line 200, in run_migrations
self):
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/command.py", line 199, in do_stamp
dest = script.get_revision(revision)
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/script.py", line 90, in get_revision
id_ = self.as_revision_number(id_)
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/script.py", line 116, in as_revision_number
id_ = self.get_current_head()
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/script.py", line 245, in get_current_head
current_heads = self.get_heads()
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/script.py", line 269, in get_heads
for script in self._revision_map.values():
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/util.py", line 219, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/script.py", line 200, in _revision_map
for file_ in os.listdir(self.versions):
OSError: [Errno 2] No such file or directory: '/home/miniwark/anuket/begotemp/begotemp/scripts/alembic/versions'
The text was updated successfully, but these errors were encountered:
If the initialize_db script is used by an extended application, he did not correctly check the alembic version of the database.
The text was updated successfully, but these errors were encountered: