diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20141029181824_remove_issue_statuses_is_default.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20141029181824_remove_issue_statuses_is_default.rb b/db/migrate/20141029181824_remove_issue_statuses_is_default.rb index 67a1696c0..62785d37a 100644 --- a/db/migrate/20141029181824_remove_issue_statuses_is_default.rb +++ b/db/migrate/20141029181824_remove_issue_statuses_is_default.rb @@ -6,7 +6,7 @@ class RemoveIssueStatusesIsDefault < ActiveRecord::Migration 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").first.pluck(:id) + default_status_id = IssueStatus.order("position").pluck(:id).first IssueStatus.where(:id => default_status_id).update_all(:is_default => true) end end |