>From the API-Reference:
> If you want to set the default value to NULL, you are out of luck. You need
to DatabaseStatements#execute the apppropriate SQL statement yourself.
The SQL statement would then look like the following
ALTER TABLE ''valuations'' ALTER
''too_many_adults'' DROP DEFAULT;
Christoph
Gareth Adams wrote:> Hi guys,
>
> I''m having problems removing the default from a boolean field.
I''m using the
> following statement:
>
> change_column :valuations, :too_many_adults, :integer, :null => true
>
> but it''s adding DEFAULT ''0'' to the SQL
statement. I''m having no luck using
> change_column_default either. Is this possible?
>
> Gareth
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---