On Dec 21, 2007, at 11:57 AM, Christophe de VIENNE wrote:

>
> Hi all,
>
> In the HEAD version, the table creation does not set the default
> values on the columns (tested on mysql and mssql)
> It seems that the function SchemaGenerator.get_column_default_string
> (in compiler.py) always returns None, even if a default value is
> specified.
>
> 801     def get_column_default_string(self, column):
> 802         if isinstance(column.default, schema.PassiveDefault):
> 803             if isinstance(column.default.arg, basestring):
> 804                 return "'%s'" % column.default.arg
> 805             else:
> 806                 return unicode(self._compile(column.default.arg,  
> None))
> 807         else:
> 808             return None
>

ColumnDefaults are "in-python" default generators, they dont get  
rendered into DDL.  PassiveDefault is used to produce a DDL-rendered  
default:

http://www.sqlalchemy.org/docs/04/metadata.html#metadata_defaults_passive



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to