Project

General

Profile

Patch #18898 ยป 0001-Migration-correction.patch

Denis Savitskiy, 2015-01-19 11:18

View differences:

db/migrate/20141029181824_remove_issue_statuses_is_default.rb
6 6
  def down
7 7
    add_column :issue_statuses, :is_default, :boolean, :null => false, :default => false
8 8
    # Restores the first status as default
9
    default_status_id = IssueStatus.order("position").first.pluck(:id)
9
    default_status_id = IssueStatus.order("position").pluck(:id).first
10 10
    IssueStatus.where(:id => default_status_id).update_all(:is_default => true)
11 11
  end
12 12
end
    (1-1/1)