Rails migration for change column

Posted by b_ayan on Stack Overflow See other posts from Stack Overflow or by b_ayan
Published on 2010-05-10T00:44:53Z Indexed on 2010/05/10 0:48 UTC
Read the original article Hit count: 312

Filed under:
|

We have script/generate migration add_fieldname_to_tablename fieldname:datatype syntax for adding new columns to a model.

On the same line, do we have a script/generate for changing the datatype of a column? Or should I write sql directly into my vanilla migration?

I want to change a column from datetime to date.

Thanks

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about migrations