summaryrefslogtreecommitdiff
path: root/db/migrate/20130813144307_add_events_to_participant.rb
blob: a1dd85ffaf8a645ad23de29731476b217325f722 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class AddEventsToParticipant < ActiveRecord::Migration
  def self.up
    add_column :participants, :events_, :boolean, :default => true
    Participant.all.each do |p|
      p.events_= ECS_CONFIG["participants"]["allow_events"]
      p.save!
    end
  end

  def self.down
    remove_column :participants, :events_
  end
end