0
ruby on rails (버전 3.1)에서 레이크를 사용하여 마이 그 레이션을 실행할 때 invalid byte sequence in UTF-8
오류가 발생합니다.마이 그 레이션을 실행할 때 UTF-8의 바이트 시퀀스가 올바르지 않음
마이 그 레이션을위한 코드는 아래에서 찾을 수 있습니다.
감사합니다.
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
여전히 유효합니까? 이주 문서에는 remove_column이 유효한 명령으로 언급되어 있습니다. 이전 마이그레이션과 함께 사용했습니다. 그러나 다른 이유로 위의 경우와 마찬가지로 동일한 오류가 발생합니다. –