From 6495ffe069c78d5ebe90766f618863ac9920583d Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 4 May 2014 09:12:33 +0200 Subject: [PATCH] Removed double code. --- db/migrate/20140503000001_update_storage3.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/db/migrate/20140503000001_update_storage3.rb b/db/migrate/20140503000001_update_storage3.rb index 35461e874..4893a226b 100644 --- a/db/migrate/20140503000001_update_storage3.rb +++ b/db/migrate/20140503000001_update_storage3.rb @@ -7,11 +7,6 @@ class UpdateStorage3 < ActiveRecord::Migration add_column :store_provider_dbs, :sha, :string, :limit => 128, :null => true add_index :store_provider_dbs, [:sha], :unique => true - Store::File.all.each {|file| - next if file.sha - sha = Digest::SHA256.hexdigest( file.content ) - file.update_attribute( :sha, sha ) - } Store::File.all.each {|file| next if file.sha sha = Digest::SHA256.hexdigest( file.content )