demarches-normaliennes/db/migrate/20160609125949_add_procedure_status.rb
2016-06-09 17:49:48 +02:00

12 lines
299 B
Ruby

class AddProcedureStatus < ActiveRecord::Migration
class Procedure < ActiveRecord::Base
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