mirror of
https://github.com/redmine/redmine.git
synced 2025-10-26 00:36:14 +02:00
Patch by Pavel Rosický and Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20907 e93f8b46-1217-0410-a6f0-8f06a7374b81
13 lines
425 B
Ruby
13 lines
425 B
Ruby
class RemoveIssueStatusesIsDefault < ActiveRecord::Migration[4.2]
|
|
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).pick(:id)
|
|
IssueStatus.where(:id => default_status_id).update_all(:is_default => true)
|
|
end
|
|
end
|