カラム(フィールド)の変更
1 2 3 |
$ rails g migration change_column_is_holiday_to_days invoke active_record create db/migrate/20160303132302_change_column_is_holiday_to_days.rb |
1 2 3 4 5 |
class ChangeColumnIsHolidayToDays < ActiveRecord::Migration def change rename_column :days, :is_holiday, :holiday end end |