diff options
Diffstat (limited to 'db/migrate/20130813144307_add_events_to_participant.rb')
-rw-r--r-- | db/migrate/20130813144307_add_events_to_participant.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20130813144307_add_events_to_participant.rb b/db/migrate/20130813144307_add_events_to_participant.rb new file mode 100644 index 0000000..a1dd85f --- /dev/null +++ b/db/migrate/20130813144307_add_events_to_participant.rb @@ -0,0 +1,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 |