diff --git a/db/migrate/20191009146101_convert_experiments_to_active_storage.rb b/db/migrate/20191009146101_convert_experiments_to_active_storage.rb index 9c2fbc76f..cc03c4595 100644 --- a/db/migrate/20191009146101_convert_experiments_to_active_storage.rb +++ b/db/migrate/20191009146101_convert_experiments_to_active_storage.rb @@ -33,6 +33,7 @@ class ConvertExperimentsToActiveStorage < ActiveRecord::Migration[5.2] model.find_each.each do |instance| attachments.each do |attachment| + next if instance.workflowimg.attached? next if instance.__send__("#{attachment}_file_name").blank? res = ActiveRecord::Base.connection.raw_connection.exec_prepared(