repo.or.cz
/
gitredmine.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
initial commit
[gitredmine.git]
/
db
/
migrate
/
.svn
/
text-base
/
021_add_tracker_position.rb.svn-base
blob
ef9775620e675ac8a809072a30aca816fe66e0d0
1
class AddTrackerPosition < ActiveRecord::Migration
2
def self.up
3
add_column :trackers, :position, :integer, :default => 1
4
Tracker.find(:all).each_with_index {|tracker, i| tracker.update_attribute(:position, i+1)}
5
end
6
7
def self.down
8
remove_column :trackers, :position
9
end
10
end