]> git.openstreetmap.org Git - rails.git/commitdiff
Don't try and add fingerprints for user images
authorTom Hughes <tom@compton.nu>
Wed, 17 Jul 2019 17:49:09 +0000 (18:49 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 17 Jul 2019 17:49:09 +0000 (18:49 +0100)
It won't actually work, and anybody migrating up to the current
schema is never going to use the fingerprints anyway.

db/migrate/20120219161649_add_user_image_fingerprint.rb

index c32d187b99875487fbef695141ccc45b11003f6e..3610281bc462f17e0f40cba8751db5b0fcd464f7 100644 (file)
@@ -1,16 +1,6 @@
 class AddUserImageFingerprint < ActiveRecord::Migration[4.2]
-  class User < ActiveRecord::Base
-  end
-
   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