comparison db/migrate/081_create_projects_trackers.rb @ 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 cbb26bc654de
children
comparison
equal deleted inserted replaced
1294:3e4c3460b6ca 1295:622f24f53b42
5 t.column :tracker_id, :integer, :default => 0, :null => false 5 t.column :tracker_id, :integer, :default => 0, :null => false
6 end 6 end
7 add_index :projects_trackers, :project_id, :name => :projects_trackers_project_id 7 add_index :projects_trackers, :project_id, :name => :projects_trackers_project_id
8 8
9 # Associates all trackers to all projects (as it was before) 9 # Associates all trackers to all projects (as it was before)
10 tracker_ids = Tracker.find(:all).collect(&:id) 10 tracker_ids = Tracker.all.collect(&:id)
11 Project.find(:all).each do |project| 11 Project.all.each do |project|
12 project.tracker_ids = tracker_ids 12 project.tracker_ids = tracker_ids
13 end 13 end
14 end 14 end
15 15
16 def self.down 16 def self.down