diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-07 10:03:11 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-07 10:03:11 +0000 |
commit | 0bc3ef5014dd8611fb1771061b57529bf4920e8b (patch) | |
tree | 22195b5e912bb9e6d518e1117eac6b6a614a9ca2 /db/migrate/20091010093521_fix_users_custom_values.rb | |
parent | a5f028a2424e2e234081b6a84c496fb6c563ee9c (diff) | |
download | redmine-0bc3ef5014dd8611fb1771061b57529bf4920e8b.tar.gz redmine-0bc3ef5014dd8611fb1771061b57529bf4920e8b.zip |
Rails4: replace deprecated Relation#update_all at db migrations
git-svn-id: http://svn.redmine.org/redmine/trunk@12488 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/20091010093521_fix_users_custom_values.rb')
-rw-r--r-- | db/migrate/20091010093521_fix_users_custom_values.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/db/migrate/20091010093521_fix_users_custom_values.rb b/db/migrate/20091010093521_fix_users_custom_values.rb index 923c78fc0..93c5cfba2 100644 --- a/db/migrate/20091010093521_fix_users_custom_values.rb +++ b/db/migrate/20091010093521_fix_users_custom_values.rb @@ -1,9 +1,11 @@ class FixUsersCustomValues < ActiveRecord::Migration def self.up - CustomValue.update_all("customized_type = 'Principal'", "customized_type = 'User'") + CustomValue.where("customized_type = 'User'"). + update_all("customized_type = 'Principal'") end def self.down - CustomValue.update_all("customized_type = 'User'", "customized_type = 'Principal'") + CustomValue.where("customized_type = 'Principal'"). + update_all("customized_type = 'User'") end end |