What version of MySQL are you using? I don't get this error on 5.0.
Thanks,
Bruno

On Thu, Sep 4, 2008 at 9:14 AM, simon <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> it would be nice to add ":default => nil" to the
> ChangeCommentToTextField migration. Otherwise MySQL throws
>
> Mysql::Error: #42000BLOB/TEXT column 'comment' can't have a default
> value: ALTER TABLE `comments` CHANGE `comment` `comment` text DEFAULT
> ''
>
> The complete migration would look like this:
> ================================================
> class ChangeCommentToTextField < ActiveRecord::Migration
>  def self.up
>    change_column "comments", "comment", :text, :default => nil
>  end
>
>  def self.down
>    change_column "comments", "comment", :string, :default => ""
>  end
> end
> ================================================
> cheers
>
> Simon
> >
>

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

Reply via email to