Re: Running migrations programmatically for automated tests

2015-02-09 Thread Diogo Baeder
Thanks, I didn't notice that I had to run it through alembic.command. After I worked a bit more on it, it worked. :-) Cheers, Diogo On Monday, February 9, 2015 at 7:28:40 PM UTC-2, Michael Bayer wrote: > > the latest recipe that shows this is: > > > http://alembic.readthedocs.org/en/latest/cook

Re: Running migrations programmatically for automated tests

2015-02-09 Thread Michael Bayer
the latest recipe that shows this is: http://alembic.readthedocs.org/en/latest/cookbook.html#sharing-a-connection-with-a-series-of-migration-commands-and-environments that includes sharing the connection and running command.upgrade. cursors getting stuck usually happens when tables are being dro

Running migrations programmatically for automated tests

2015-02-09 Thread Diogo Baeder
Hi guys, I'm trying to run database migrations programmatically, inside a setUpClass() method, sharing a preconfigured connection, but the migration execution gets stuck at the "alembic_version" table creation (somehow the cursor just gets stuck at this point, not sure why). It's important that