]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/20120219161649_add_user_image_fingerprint.rb
Introduce geocode event callback for route endpoints
[rails.git] / db / migrate / 20120219161649_add_user_image_fingerprint.rb
index 5c9dd4083f81429d66f55ac44dbba652241786e0..3610281bc462f17e0f40cba8751db5b0fcd464f7 100644 (file)
@@ -1,13 +1,6 @@
-class AddUserImageFingerprint < ActiveRecord::Migration
+class AddUserImageFingerprint < ActiveRecord::Migration[4.2]
   def up
     add_column :users, :image_fingerprint, :string, :null => true
-
-    User.where("image_file_name IS NOT NULL").find_each do |user|
-      image = user.image
-
-      user.image_fingerprint = image.generate_fingerprint(image)
-      user.save!
-    end
   end
 
   def down