I need to change t.integer :mark_up to a float How can I do this? I have tried in my terminal rails g migration change_column(:stakes, :mark_up, :float) by keep getting a syntax error near unexpected token ('
In your terminal:
rails generate migration ChangeMarkUpToFloat
and in the file that is created: db/migrate/2015xxxxxxxxxx/change_mark_up_to_float.rb
edit it to:
class ChangeMarkUpToFloat < ActiveRecord::Migration
  def change
    change_column :stakes, :mark_up, :float
  end
end
and then back in your terminal:
rake db:migrate
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With