Mercurial > hg > soundsoftware-site
comparison db/migrate/068_create_enabled_modules.rb @ 1526:404aa68d4227
Merge from live branch
author | Chris Cannam |
---|---|
date | Thu, 11 Sep 2014 12:46:20 +0100 |
parents | 261b3d9a4903 |
children |
comparison
equal
deleted
inserted
replaced
1493:a5f2bdf3b486 | 1526:404aa68d4227 |
---|---|
5 t.column :name, :string, :null => false | 5 t.column :name, :string, :null => false |
6 end | 6 end |
7 add_index :enabled_modules, [:project_id], :name => :enabled_modules_project_id | 7 add_index :enabled_modules, [:project_id], :name => :enabled_modules_project_id |
8 | 8 |
9 # Enable all modules for existing projects | 9 # Enable all modules for existing projects |
10 Project.find(:all).each do |project| | 10 Project.all.each do |project| |
11 project.enabled_module_names = Redmine::AccessControl.available_project_modules | 11 project.enabled_module_names = Redmine::AccessControl.available_project_modules |
12 end | 12 end |
13 end | 13 end |
14 | 14 |
15 def self.down | 15 def self.down |