]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated Relation#update_all at CreateCustomFieldsRoles db migration
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 7 Jan 2014 07:50:59 +0000 (07:50 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 7 Jan 2014 07:50:59 +0000 (07:50 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12485 e93f8b46-1217-0410-a6f0-8f06a7374b81

db/migrate/20130713104233_create_custom_fields_roles.rb

index 458bfb50b2d8b0c4a6ed8e28693a175eae210c5d..e9eeccc17149877f5705ecde3a738f5cecd96e1c 100644 (file)
@@ -5,7 +5,7 @@ class CreateCustomFieldsRoles < ActiveRecord::Migration
       t.column :role_id, :integer, :null => false
     end
     add_index :custom_fields_roles, [:custom_field_id, :role_id], :unique => true, :name => :custom_fields_roles_ids
-    CustomField.update_all({:visible => true}, {:type => 'IssueCustomField'})
+    CustomField.where({:type => 'IssueCustomField'}).update_all({:visible => true})
   end
 
   def self.down