[jifty-devel] MySQL and defaults in text fields

Jesse Vincent jesse at bestpractical.com
Wed Mar 7 12:50:36 EST 2007

On Mar 5, 2007, at 2:24 PM, David Brunton wrote:

> Hi all,
> MySQL does not allow a TEXT or BLOB field to have a default value.   
> I don't know whether other databases allow this.
> If I assign a default value to a text field in the schema, this  
> gets passed along to MySQL via Jifty::DBI::SchemaGenerator which  
> passes along to DBIx::DBSchema::Column with a default value.   
> Should I take this up with DBIx::DBSchema::Column, or should we  
> work around it in Jifty?

Ideally, let's get DBIx::DBSchema fixed.

> I imagine the right behavior is to have the default value silently  
> ignored when creating a text column in a mysql table (possibly with  
> a warning) but still populate the UI with the default value.  It  
> appears from my limited poking around that this should "just work"  
> since default values are not populated from the database itself.   
> Thoughts on that?

That makes sense

> Also, any opinion on whether I should add my failing test to one of  
> the existing files, or start another?  I /think/ I'm grokking the  
> way others have looped through tests with all the available drivers.

If there's a file it fits naturally in, do it there. Otherwise build  
up a new one.


> Best,
> David.
> ______________________________________________________________________ 
> ______________
> Now that's room service!  Choose from over 150,000 hotels
> in 45,000 destinations on Yahoo! Travel to find your fit.
> http://farechase.yahoo.com/promo-generic-14795097
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20070307/234f3158/PGP.pgp

More information about the jifty-devel mailing list