You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20100819172912_enable_calendar_and_gantt_modules_where_appropriate.rb 426B

123456789101112
  1. class EnableCalendarAndGanttModulesWhereAppropriate < ActiveRecord::Migration[4.2]
  2. def self.up
  3. EnabledModule.where(:name => 'issue_tracking').each do |e|
  4. EnabledModule.create(:name => 'calendar', :project_id => e.project_id)
  5. EnabledModule.create(:name => 'gantt', :project_id => e.project_id)
  6. end
  7. end
  8. def self.down
  9. EnabledModule.where("name = 'calendar' OR name = 'gantt'").delete_all
  10. end
  11. end