On Mon, Jul 24, 2017 at 11:59 PM, Dan Callaghan <dcall...@redhat.com> wrote:
>
> 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:
>
>     cd Server
>     PYTHONPATH=../Common:. python bkr/server/tools/init.py --debug
>
Thanks for the description

something flukey here for me.
I have auto generated 3dd091c46d50 as head using alembic revision, but
db version stays at f18df089261. Using methods described above,
including beaker-init (--downgrade)have no affect on the db version.
I can interact with the db with the alembic stamp command but only to
maniuplate the version_number. Other db changes do not seem to be
affected.

Thoughts?

alembic history
Rev: 3dd091c46d50 (head)
Parent: f18df089261
Path: bkr/server/alembic/versions/3dd091c46d50_.py

    empty message

    Revision ID: 3dd091c46d50
    Revises: f18df089261
    Create Date: 2017-07-25 18:03:04.320470

Rev: f18df089261
Parent: 4f7a4316565f
Path: 
bkr/server/alembic/versions/f18df089261_associate_a_floating_ip_to_each_openstack_instance.py

    associate a floating ip to each OpenStack instance

    Revision ID: f18df089261
    Revises: 4f7a4316565f
    Create Date: 2016-12-05 05:59:28.858413


root@beaker-server-lc Server]# PYTHONPATH=../Common:. python
bkr/server/tools/init.py --debug
2017-07-25 18:06:40,981 __main__ INFO Upgrading schema to head revision
2017-07-25 18:06:40,981 alembic.migration INFO Context impl MySQLImpl.
2017-07-25 18:06:40,981 alembic.migration INFO Will assume
non-transactional DDL.
2017-07-25 18:06:40,987 __main__ INFO Upgrade completed
2017-07-25 18:06:40,987 __main__ INFO Populating tables with
pre-defined values if necessary
2017-07-25 18:06:41,225 __main__ INFO Pre-defined values populated
2017-07-25 18:06:41,226 __main__ INFO Exiting



SELECT * FROM alembic_version;
+-------------+
| version_num |
+-------------+
| f18df089261 |
+-------------+




> --
> Dan Callaghan <dcall...@redhat.com>
> Senior Software Engineer, Products & Technologies Operations
> Red Hat




-- 

Shawn Doherty

Software Engineer, Kernel-HW

Red Hat

314 Littleton Rd

Westford, MA 01886

sdohe...@redhat.com    T: 19785891080 INTERNAL:-8131080     IM: sdoherty
_______________________________________________
Beaker-devel mailing list -- beaker-devel@lists.fedorahosted.org
To unsubscribe send an email to beaker-devel-le...@lists.fedorahosted.org

Reply via email to