summaryrefslogtreecommitdiffstats
path: root/db/migrate/20141029181824_remove_issue_statuses_is_default.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-04-03 01:34:45 +0000
committerGo MAEDA <maeda@farend.jp>2021-04-03 01:34:45 +0000
commit74a6ff023075edec4d92ea5ba229b321f33e72c5 (patch)
treed0fb7fcec004ff916f112eb55a7e8da8f5b4f1fb /db/migrate/20141029181824_remove_issue_statuses_is_default.rb
parent1eefff4d9c8a214f6abf07ad3bd3c4dcbf66931b (diff)
downloadredmine-74a6ff023075edec4d92ea5ba229b321f33e72c5.tar.gz
redmine-74a6ff023075edec4d92ea5ba229b321f33e72c5.zip
Replace pluck().first with pick() (#32909).
Patch by Pavel Rosický and Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20907 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/20141029181824_remove_issue_statuses_is_default.rb')
-rw-r--r--db/migrate/20141029181824_remove_issue_statuses_is_default.rb2
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 09808e31c..94b518ea3 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[4.2]
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
+ default_status_id = IssueStatus.order(:position).pick(:id)
IssueStatus.where(:id => default_status_id).update_all(:is_default => true)
end
end