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 440B

123456789101112
  1. class EnableCalendarAndGanttModulesWhereAppropriate < ActiveRecord::Migration
  2. def self.up
  3. EnabledModule.find(:all, :conditions => ["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.delete_all("name = 'calendar' OR name = 'gantt'")
  10. end
  11. end