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 / db / migrate / 019_add_issue_status_position.rb @ 912:5e80956cc792

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