annotate .svn/pristine/49/49aafa941ba2df3722536a8d3f8580c133f8b9fb.svn-base @ 1327:287f201c2802 redmine-2.2-integration

Add italic
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Wed, 19 Jun 2013 20:56:22 +0100
parents cbb26bc654de
children
rev   line source
Chris@909 1 class CreateEnabledModules < ActiveRecord::Migration
Chris@909 2 def self.up
Chris@909 3 create_table :enabled_modules do |t|
Chris@909 4 t.column :project_id, :integer
Chris@909 5 t.column :name, :string, :null => false
Chris@909 6 end
Chris@909 7 add_index :enabled_modules, [:project_id], :name => :enabled_modules_project_id
Chris@909 8
Chris@909 9 # Enable all modules for existing projects
Chris@909 10 Project.find(:all).each do |project|
Chris@909 11 project.enabled_module_names = Redmine::AccessControl.available_project_modules
Chris@909 12 end
Chris@909 13 end
Chris@909 14
Chris@909 15 def self.down
Chris@909 16 drop_table :enabled_modules
Chris@909 17 end
Chris@909 18 end