demarches-normaliennes/db/migrate/20160609125949_add_procedure_status.rb
2018-03-06 17:18:44 +01:00

12 lines
298 B
Ruby

class AddProcedureStatus < ActiveRecord::Migration
class Procedure < ApplicationRecord
end
def change
add_column :procedures, :published, :boolean, default: false, null: false
Procedure.all.each do |procedure|
procedure.published = true
procedure.save!
end
end
end