Re: Updating multiple Postgres schema objects from single SQL Alchemy model

2014-11-18 Thread Nick Retallack
Ok, I'm trying that now. The result is that it tries to delete all of the tables out of prototype and create them all again with no specific schema set. Creating them without a specific schema is what I want, but this patch is useless if it just deletes and creates everything. I think I need

Re: Updating multiple Postgres schema objects from single SQL Alchemy model

2014-11-18 Thread Nick Retallack
Here is the finished product: https://gist.github.com/nickretallack/bb8ca0e37829b4722dd1 It still requires me to edit the schemas out of the migrations after the fact, but at least the interesting work is all handled by alembic. -- You received this message because you are subscribed to the

[sqlalchemy] Why sqlalchemy (version 0.9.7) can't be imported in python(version 2.7.2) command line

2014-11-18 Thread Xiaohua Zou
I have install python 2.7.2 and sqlalchemy 0.9.7, but I found that python can't import sqlalchemy. And I found that sqlalchemy folder is not copy to ...\python\Lib\site-packages\, I think that's why it can't be imported by python, is it right? A screenshot is attached, which show some error

Re: [sqlalchemy] Why sqlalchemy (version 0.9.7) can't be imported in python(version 2.7.2) command line

2014-11-18 Thread Simon King
On Tue, Nov 18, 2014 at 10:07 AM, Xiaohua Zou xiaohua@tieto.com wrote: I have install python 2.7.2 and sqlalchemy 0.9.7, but I found that python can't import sqlalchemy. And I found that sqlalchemy folder is not copy to ...\python\Lib\site-packages\, I think that's why it can't be

Re: [sqlalchemy] Compound unique constraint with a nullable column

2014-11-18 Thread Guido Winkelmann
On Monday 17 November 2014 14:44:02 Michael Bayer wrote: On Nov 17, 2014, at 1:55 PM, Guido Winkelmann gu...@ambient-entertainment.de wrote: Am Montag, 17. November 2014 16:25:54 UTC+1 schrieb Michael Bayer: On Nov 17, 2014, at 7:37 AM, Guido Winkelmann gu...@ambient-entertainment.de

[sqlalchemy] Re: Compound unique constraint with a nullable column

2014-11-18 Thread Jonathan Vanasco
These might be backend specific and not supported in other databases... but there are some popular postgres tricks to deal with this: * in the constraint, coalesce NULL into an empty string (or other value). * use multiple indexes both are actually discussed in the comments to this question: