Mercurial > hg > soundsoftware-site
comparison .svn/pristine/52/52e141046a10068211408d55ec6484cccb3d452a.svn-base @ 1298:4f746d8966dd redmine_2.3_integration
Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author | Chris Cannam |
---|---|
date | Fri, 14 Jun 2013 09:28:30 +0100 |
parents | 622f24f53b42 |
children |
comparison
equal
deleted
inserted
replaced
1297:0a574315af3e | 1298:4f746d8966dd |
---|---|
1 class CreateEnabledModules < ActiveRecord::Migration | |
2 def self.up | |
3 create_table :enabled_modules do |t| | |
4 t.column :project_id, :integer | |
5 t.column :name, :string, :null => false | |
6 end | |
7 add_index :enabled_modules, [:project_id], :name => :enabled_modules_project_id | |
8 | |
9 # Enable all modules for existing projects | |
10 Project.all.each do |project| | |
11 project.enabled_module_names = Redmine::AccessControl.available_project_modules | |
12 end | |
13 end | |
14 | |
15 def self.down | |
16 drop_table :enabled_modules | |
17 end | |
18 end |