From fe22797d69273cc68b5d070416223e9c5f52f396 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 31 Jan 2007 19:53:24 +0000 Subject: 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 --- db/migrate/019_add_issue_status_position.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 db/migrate/019_add_issue_status_position.rb (limited to 'db') 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 -- cgit v1.2.3