Tuesday 15 September 2015

Change integer to float column table Rails -


Let me convert t.integer: mark_up to a float How can I do this? I used my terminal Railg Migration change_column (: stakes,: mark_up,: float) Unexpected token (

  RailMigration produces ChangeMarkUpToFloat  

and the file that has been created: db / migrate / 2015xxxxxxxxxx / Change_mark_up_to_float.rb

Edit it:

  class ChangeMarkUpToFloat & lt; ActiveRecord :: change migration change df change_column: bet, mark_up,: float end End  

and then back to your terminal:

  rake db: migrate  

No comments:

Post a Comment