Removed double code.

This commit is contained in:
Martin Edenhofer 2014-05-04 09:12:33 +02:00
parent 0a726148c7
commit 6495ffe069

View file

@ -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 )