Reputation: 2255
I get an invalid byte sequence in UTF-8
error when running a migration with rake in ruby on rails (version 3.1).
The code for my migration can be found below.
Thanks!
class ChangePhoneToString < ActiveRecord::Migration
def up
remove_column :restaurants, :phone
remove_column :restaurants, :price
add_column :restaurants, :phone, :string
add_column :restaurants, :price, :string
end
def down
remove_column :restaurants, :phone
remove_column :restaurants, :price
add_column :restaurants, :phone, :integer
add_column :restaurants, :price, :integer
end
end
Upvotes: 0
Views: 434
Reputation: 4388
There is slight change in the migration file in rails 3.1. Currently remove_column is not supported in rails 3.1 Please read the rail 3.1 migration documentation here
Upvotes: 2