comparison .svn/pristine/ff/ffca1425f1aa4e1091d7e6036ce643ffe45832ab.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 CreateProjectsTrackers < ActiveRecord::Migration
2 def self.up
3 create_table :projects_trackers, :id => false do |t|
4 t.column :project_id, :integer, :default => 0, :null => false
5 t.column :tracker_id, :integer, :default => 0, :null => false
6 end
7 add_index :projects_trackers, :project_id, :name => :projects_trackers_project_id
8
9 # Associates all trackers to all projects (as it was before)
10 tracker_ids = Tracker.all.collect(&:id)
11 Project.all.each do |project|
12 project.tracker_ids = tracker_ids
13 end
14 end
15
16 def self.down
17 drop_table :projects_trackers
18 end
19 end