]> source.dussan.org Git - redmine.git/commitdiff
Fixed #down for migration 20141029181824_remove_issue_statuses_is_default (#18898).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 19 Jan 2015 21:00:42 +0000 (21:00 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 19 Jan 2015 21:00:42 +0000 (21:00 +0000)
Patch by Denis Savitskiy.

git-svn-id: http://svn.redmine.org/redmine/trunk@13920 e93f8b46-1217-0410-a6f0-8f06a7374b81

db/migrate/20141029181824_remove_issue_statuses_is_default.rb

index 67a1696c041434bfa035fe9011bd3e774b81e0d4..62785d37a06a46c8028f233ae80cd3662c77f388 100644 (file)
@@ -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