Hard to use ops outside of alembic scripts
I already have a simple upgrade framework that I want to keep using, but the operations implemented by alembic are very useful (and look saner than sqlalchemy-migrate), so I'm interested in using just the underlying alembic ops. This appears to be hard to do: the operations require a global context, but there is no API to configure that. This seems to at get some things going:
from alembic import context from alembic.config import Config
config = Config(None) context._opts(config, None, fn=None) connection = meta.Session.connection() context.configure(connection=connection, target_metadata=meta.metadata) }}}
but it feels like API abuse to do it this way.