Don't update flickr photos in migration

This commit is contained in:
Brenda Wallace committed 2018-02-10 18:41:11 +13:00
1 parent 9cdf2e899f
commit 83bba916a4
1 file changed
+1 -16
@@ -1,20 +1,5 @@
class AddDatetakenToPhotos < ActiveRecord::Migration
def up
def change
add_column :photos, :date_taken, :datetime
update_flickr_metadata
end
def down
add_column :photos, :date_taken
end
private
def update_flickr_metadata
# Fetch from flickr, the photos updated the longest ago will be fetched first
Photo.all.order(:updated_at).each do |photo|
say "Fetch flickr data for #{photo}"
photo.set_flickr_metadata!
end
end
end