On Wednesday, May 6, 2015 at 8:03:54 PM UTC-7, Michael Bayer wrote:
>
>  Well it's already weird that you're defining both "default" and 
> "server_default" at the same time on the Column.  I'm not actually sure 
> what effect that would have and am surprised it doesn't fail in some 
> way...or at least renders the "server_default" more or less unused.
>

I have server_default for alembic. Alembic does not pick defaults, but does 
pick up server_default where generates migration files for DB structure. 
This is useful if rows are inserted outside of ORM.
 

>
> If you're just defining defaults as constants I'd think you only need 
> "default.arg" and that's it.   
>
I may have either callables or scalars.

> if it might be callable, the Python builtin callable() will do that for 
> you, is_callable is just a shortcut to having to call that internally.    
> Those are all non-underscored attributes so they are public and safe to use.
>
Got it.

Thanks, 
Anton.

-- 
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...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to