To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / .svn / pristine / 31 / 318f04133e3e32c333e98ac7f8065761353f5042.svn-base @ 1297:0a574315af3e

History | View | Annotate | Download (311 Bytes)

1
class AddIssueStatusPosition < ActiveRecord::Migration
2
  def self.up
3
    add_column :issue_statuses, :position, :integer, :default => 1
4
    IssueStatus.find(:all).each_with_index {|status, i| status.update_attribute(:position, i+1)}
5
  end
6

    
7
  def self.down
8
    remove_column :issue_statuses, :position
9
  end
10
end