mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
skip individual checking
This commit is contained in:
parent
2ef095b003
commit
e68b8f55c2
1 changed files with 4 additions and 3 deletions
|
@ -30,10 +30,11 @@ class ConvertExperimentsToActiveStorage < ActiveRecord::Migration[5.2]
|
|||
end.compact
|
||||
|
||||
next if attachments.blank?
|
||||
|
||||
model.find_each.each do |instance|
|
||||
|
||||
model.left_outer_joins(:workflowimg_attachment)
|
||||
.where('active_storage_attachments.id IS NULL')
|
||||
.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(
|
||||
|
|
Loading…
Reference in a new issue