added the ability to set the sort order for trackers

git-svn-id: http://redmine.rubyforge.org/svn/trunk@209 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-01-31 21:18:43 +00:00
parent 671a0fa101
commit fa688d48e6
10 changed files with 45 additions and 12 deletions

View File

@@ -0,0 +1,10 @@
class AddTrackerPosition < ActiveRecord::Migration
def self.up
add_column :trackers, :position, :integer, :default => 1, :null => false
Tracker.find(:all).each_with_index {|tracker, i| tracker.update_attribute(:position, i+1)}
end
def self.down
remove_column :trackers, :position
end
end