Migrate milestones images and documents

This commit is contained in:
Javi Martín
2018-11-16 11:57:25 +01:00
parent 4a7f479d21
commit 87b073cbca
2 changed files with 32 additions and 0 deletions

View File

@@ -79,6 +79,11 @@ namespace :milestones do
'title' => 'title',
'description' => 'description'}
Image.where(imageable_type: "Budget::Investment::Milestone").
update_all(imageable_type: "Milestone")
Document.where(documentable_type: "Budget::Investment::Milestone").
update_all(documentable_type: "Milestone")
puts "Verifying that all rows were copied..."
{