diff db/migrate/20091010093521_fix_users_custom_values.rb @ 1526:404aa68d4227

Merge from live branch
author Chris Cannam
date Thu, 11 Sep 2014 12:46:20 +0100
parents dffacf8a6908
children
line wrap: on
line diff
--- a/db/migrate/20091010093521_fix_users_custom_values.rb	Mon Mar 17 08:57:04 2014 +0000
+++ b/db/migrate/20091010093521_fix_users_custom_values.rb	Thu Sep 11 12:46:20 2014 +0100
@@ -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