diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-01-31 19:53:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-01-31 19:53:24 +0000 |
commit | fe22797d69273cc68b5d070416223e9c5f52f396 (patch) | |
tree | ae81cb18985a8693dbee64800756921212b037e2 /db | |
parent | d29ba0b80fac3600b3bde5adc20b4df5c2a9bb37 (diff) | |
download | redmine-fe22797d69273cc68b5d070416223e9c5f52f396.tar.gz redmine-fe22797d69273cc68b5d070416223e9c5f52f396.zip |
added the ability to set the sort order for issue statuses
git-svn-id: http://redmine.rubyforge.org/svn/trunk@205 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/019_add_issue_status_position.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/019_add_issue_status_position.rb b/db/migrate/019_add_issue_status_position.rb new file mode 100644 index 000000000..1c65e52e3 --- /dev/null +++ b/db/migrate/019_add_issue_status_position.rb @@ -0,0 +1,10 @@ +class AddIssueStatusPosition < ActiveRecord::Migration + def self.up + add_column :issue_statuses, :position, :integer, :default => 1, :null => false + IssueStatus.find(:all).each_with_index {|status, i| status.update_attribute(:position, i+1)} + end + + def self.down + remove_column :issue_statuses, :position + end +end |