Removed double code.
This commit is contained in:
parent
0a726148c7
commit
6495ffe069
1 changed files with 0 additions and 5 deletions
|
@ -7,11 +7,6 @@ class UpdateStorage3 < ActiveRecord::Migration
|
||||||
add_column :store_provider_dbs, :sha, :string, :limit => 128, :null => true
|
add_column :store_provider_dbs, :sha, :string, :limit => 128, :null => true
|
||||||
add_index :store_provider_dbs, [:sha], :unique => 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|
|
Store::File.all.each {|file|
|
||||||
next if file.sha
|
next if file.sha
|
||||||
sha = Digest::SHA256.hexdigest( file.content )
|
sha = Digest::SHA256.hexdigest( file.content )
|
||||||
|
|
Loading…
Reference in a new issue