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