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/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 dropped, 
> because they are locked.  this is more unusual on the setup, but you’d need 
> to see if the cursor is attempting to execute a statement against a 
> resource that is locked by another connection (often a previous test that 
> didn’t tear down). 
>
>
>
> Diogo Baeder <diogo...@gmail.com <javascript:>> wrote: 
>
> > 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 I 
> can run the migrations at this point, since I do a rollback at 
> tearDownClass() to throw away any database changes. 
> > 
> > Is there any tutorial or recipe for how to use alembic programmatically 
> this way? 
> > 
> > Thanks, 
> > Diogo 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "sqlalchemy-alembic" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sqlalchemy-alembic+unsubscr...@googlegroups.com <javascript:>. 
>
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to