迁移报错

dev_forum
daiao 5 years ago
parent 7185af610a
commit 5e13fb19c7

@ -29,7 +29,7 @@ class ModifyMdAttachmentUrlForMdCotents < ActiveRecord::Migration[5.2]
plats = PlatformSample.where(samples_type: ['introduction', 'knowledge'])
plats.find_each do |p|
p.update_column(:contents, p.contents.gsub("![](/attachments/download", "![](/api/attachments")) if p.introduction.present?
p.update_column(:contents, p.contents.gsub("![](/attachments/download", "![](/api/attachments")) if p.contents.present?
end
end
end

Loading…
Cancel
Save