Slide 15
Slide 15 text
ओΩʔͷґଘΛআ 2
ΧϥϜΛՃͯ͠ɺϝιουΛফ͢ํ๏͋Δɻ
class AddTokyoToPrefecture < ActiveRecord::Migration[7.0]
def change
add_column :prefectures, :tokyo, :boolean
up_only do
execute 'UPDATE prefectures SET tokyo = 1 WHERE id == 13;'
end
change_column_null :prefectures, :tokyo, false
end
end
15