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.
Migrated issue, originally created by bretonium (@bretonium)
Release 0.9.x broke our migrations, they now fail with traceback:
breton@breton-pc ~/src/mediagoblin (master*) $ ./bin/gmg dbupdate
WARNING: audiolab is not installed so wav2png will not work
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 52bf0ccbedc1, initial revision
Traceback (most recent call last):
File "./bin/gmg", line 11, in <module>
load_entry_point('mediagoblin', 'console_scripts', 'gmg')()
File "/home/breton/src/mediagoblin/mediagoblin/gmg_commands/__init__.py", line 148, in main_cli
args.func(args)
File "/home/breton/src/mediagoblin/mediagoblin/gmg_commands/dbupdate.py", line 234, in dbupdate
run_dbupdate(app_config, global_config)
File "/home/breton/src/mediagoblin/mediagoblin/gmg_commands/dbupdate.py", line 165, in run_dbupdate
run_alembic_migrations(db, app_config, global_config)
File "/home/breton/src/mediagoblin/mediagoblin/gmg_commands/dbupdate.py", line 136, in run_alembic_migrations
return command.upgrade(cfg, 'heads')
File "/home/breton/src/mediagoblin/local/lib/python2.7/site-packages/alembic/command.py", line 254, in upgrade
script.run_env()
File "/home/breton/src/mediagoblin/local/lib/python2.7/site-packages/alembic/script/base.py", line 416, in run_env
util.load_python_file(self.dir, 'env.py')
File "/home/breton/src/mediagoblin/local/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file
module = load_module_py(module_id, path)
File "/home/breton/src/mediagoblin/local/lib/python2.7/site-packages/alembic/util/compat.py", line 75, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "/home/breton/src/mediagoblin/mediagoblin/db/migrations/env.py", line 63, in <module>
run_migrations_online()
File "/home/breton/src/mediagoblin/mediagoblin/db/migrations/env.py", line 58, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/home/breton/src/mediagoblin/local/lib/python2.7/site-packages/alembic/runtime/environment.py", line 817, in run_migrations
self.get_context().run_migrations(**kw)
File "/home/breton/src/mediagoblin/local/lib/python2.7/site-packages/alembic/runtime/migration.py", line 330, in run_migrations
self.connection.in_transaction():
AttributeError: 'Engine' object has no attribute 'in_transaction'
otherwise if you're doing tranasctional DDL I think you're skipping outside of the transaction. It is a little bit of a bug that passing the Engine is otherwise "working".
Warn on non-Connection present and accommodate for Engine
A warning is emitted when an object that's not a
:class:~sqlalchemy.engine.Connection is passed to
:meth:.EnvironmentContext.configure. For the case of a
:class:~sqlalchemy.engine.Engine passed, the check for "in transaction"
introduced in version 0.9.0 has been relaxed to work in the case of an
attribute error, as some users appear to be passing an
:class:~sqlalchemy.engine.Engine and not a
:class:~sqlalchemy.engine.Connection.
Migrated issue, originally created by bretonium (@bretonium)
Release 0.9.x broke our migrations, they now fail with traceback:
http://git.savannah.gnu.org/cgit/mediagoblin.git/tree/mediagoblin/db/migrations/env.py#n44 -- code that fails.
The text was updated successfully, but these errors were encountered: