blob: 59cd40049d45495519fc0e27c9e5fbfa177c3b7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
class EnableCalendarAndGanttModulesWhereAppropriate < ActiveRecord::Migration
def self.up
EnabledModule.where(:name => 'issue_tracking').all.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.delete_all("name = 'calendar' OR name = 'gantt'")
end
end
|