Re: Autogenerate generates duplicates

2015-02-09 Thread Diogo Baeder
, 2015 at 2:23:07 AM UTC-2, Michael Bayer wrote: > > > > Diogo Baeder > wrote: > > > Hi, > > > > In a project I'm working on, I'm using "alembic revision --autogenerate" > so that it generates my migration scripts based on the models

Autogenerate generates duplicates

2015-02-09 Thread Diogo Baeder
Hi, In a project I'm working on, I'm using "alembic revision --autogenerate" so that it generates my migration scripts based on the models I have; however, even if I've already generated a migration script which already has the operation for a certain model (let's call it "Foo"), when I run "al

Re: Running migrations programmatically for automated tests

2015-02-09 Thread Diogo Baeder
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 > wrote: > > > Hi

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