Hi there again :-) I''m creating my mysql tables using migrations and I have noticed that the t.timestamps line creates two columns named ''created_at'' and ''updated_at'' as datetime type but they allow null values. How can I say to rails I want that these two columns are not null (:null=>default doesn''t work). Regards -- Miquel (a.k.a. KtalĂ a.k.a. Ton) Linux User #286784 GPG Key : 4D91EF7F Debian GNU/Linux (Linux wolverine 2.6.23.1) Welcome to the jungle, we got fun and games Guns n'' Roses --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You can specify that a column allows NULL or not like this: :null => true :null => false The docs for TaleDefinition#column should be useful. That''s the method that''s called when you use, e.g., add_column in a migration. http://www.railsbrain.com/api/edge/doc/index.html?a=M001499&name=TableDefinition#column Regards, Craig --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---