summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-01-19 21:00:42 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-01-19 21:00:42 +0000
commit93ced61b2a08c657991f145a5997f65cbb90a611 (patch)
tree4978c3160194f2240fad1f756f81225ff721073e /db
parentdd79e8e31f780fa5e7c7ff10133a7cd1e8807653 (diff)
downloadredmine-93ced61b2a08c657991f145a5997f65cbb90a611.tar.gz
redmine-93ced61b2a08c657991f145a5997f65cbb90a611.zip
Fixed #down for migration 20141029181824_remove_issue_statuses_is_default (#18898).
Patch by Denis Savitskiy. git-svn-id: http://svn.redmine.org/redmine/trunk@13920 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db')
-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 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