diff .svn/pristine/52/52e141046a10068211408d55ec6484cccb3d452a.svn-base @ 1295:622f24f53b42 redmine-2.3

Update to Redmine SVN revision 11972 on 2.3-stable branch
author Chris Cannam
date Fri, 14 Jun 2013 09:02:21 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.svn/pristine/52/52e141046a10068211408d55ec6484cccb3d452a.svn-base	Fri Jun 14 09:02:21 2013 +0100
@@ -0,0 +1,18 @@
+class CreateEnabledModules < ActiveRecord::Migration
+  def self.up
+    create_table :enabled_modules do |t|
+      t.column :project_id, :integer
+      t.column :name, :string, :null => false
+    end
+    add_index :enabled_modules, [:project_id], :name => :enabled_modules_project_id
+
+    # Enable all modules for existing projects
+    Project.all.each do |project|
+      project.enabled_module_names = Redmine::AccessControl.available_project_modules
+    end
+  end
+
+  def self.down
+    drop_table :enabled_modules
+  end
+end