X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6ebb21b66020ba845abd9fda408bb204d326e0de..22dc13d6edb17cbdd4b73aabad340dcc8ef41999:/db/migrate/20120219161649_add_user_image_fingerprint.rb diff --git a/db/migrate/20120219161649_add_user_image_fingerprint.rb b/db/migrate/20120219161649_add_user_image_fingerprint.rb index c32d187b9..3610281bc 100644 --- a/db/migrate/20120219161649_add_user_image_fingerprint.rb +++ b/db/migrate/20120219161649_add_user_image_fingerprint.rb @@ -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