[sqlalchemy] Writing code that works both before and after a migration

2016-07-05 Thread Jon Davidson
In my current employer's setup, we use SQLAlchemy core and ORM, but we use a homegrown migration system instead of alembic. When possible, we want to write code so that it can work equally well with the old DB schema and the new DB schema. In this case, I am adding a column, and if the column does

Re: [sqlalchemy] Update clause with alias name

2016-07-05 Thread T Johnson
Thanks, the blog post was very helpful. ClauseAdapter provided exactly what was needed. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@goo

Re: [sqlalchemy] empty IN clauses

2016-07-05 Thread Shivaram Lingamneni
Thanks very much for your help! We'll plan to use a workaround now and revisit the issue when 1.2 comes out. There are a couple subtleties that may be of interest. Compiling to 0 or 1 has the effect of removing all syntactic references to the original expression from the query. This is anomalou

Re: [sqlalchemy] TypeDecorator and autoincrement

2016-07-05 Thread Adriano Di Luzio
Thanks guys, for my use case I can live with SERIAL. Then, when fixed upstream, I'll update. Regards, Adriano > On 04 Jul 2016, at 22:40, mike bayer wrote: > > > > On 07/04/2016 03:34 PM, Mike Bayer wrote: >> the type itself must have integer affinity in order to be picked up as >> compatibl