mirror of
https://github.com/redmine/redmine.git
synced 2024-07-22 21:19:50 +02:00
28b20270b4
git-svn-id: http://svn.redmine.org/redmine/trunk@16009 e93f8b46-1217-0410-a6f0-8f06a7374b81
13 lines
427 B
Ruby
13 lines
427 B
Ruby
class RemoveIssueStatusesIsDefault < ActiveRecord::Migration
|
|
def up
|
|
remove_column :issue_statuses, :is_default
|
|
end
|
|
|
|
def down
|
|
add_column :issue_statuses, :is_default, :boolean, :null => false, :default => false
|
|
# Restores the first status as default
|
|
default_status_id = IssueStatus.order(:position).pluck(:id).first
|
|
IssueStatus.where(:id => default_status_id).update_all(:is_default => true)
|
|
end
|
|
end
|