blob: c68fb486442918c2d23bd314ceaba1f75ffdd38e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# frozen_string_literal: false
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
|