Excerpts from Don Zickus's message of 2017-07-24 09:54 -04:00:
Thanks Dan! We did something like that last week, but we were using
'alembic upgrade/downgrade' instead of 'migration'. The upgrade kept
failing because of 'alembic no handlers found for logger alembic.migration'
or something. Thoughts there?
Sorry I actually meant to say "alembic revision". It is the command to
create a new migration script in the source tree based on the template.
I always get that command name wrong.
The "no handlers found" message is just pointless spew from the Python
logging subsystem, not an actual error. However the "alembic upgrade"
and "downgrade" commands won't work with Beaker, due to the hackery
needed to glue Alembic into all the existing database code which is
inherited from TurboGears.
The normal way to upgrade/downgrade the database schema on a Beaker
installation is using beaker-init (to upgrade) or
beaker-init --downgrade=<version> (to downgrade).
If you're running from a git checkout with a database configured in
dev.cfg, you can just do something like:
PYTHONPATH=../Common:. python bkr/server/tools/init.py --debug
Dan Callaghan <dcallagh(a)redhat.com>
Senior Software Engineer, Products & Technologies Operations