diff --git a/db/migrate/20170120164058_create_task_for_each_job_and_transfer_attributes.rb b/db/migrate/20170120164058_create_task_for_each_job_and_transfer_attributes.rb index e0b97c758..a48c0f5d7 100644 --- a/db/migrate/20170120164058_create_task_for_each_job_and_transfer_attributes.rb +++ b/db/migrate/20170120164058_create_task_for_each_job_and_transfer_attributes.rb @@ -26,7 +26,7 @@ def up def down say_with_time("Deleting all tasks which have job") do - MiqTask.destroy_all("id in (select miq_task_id from jobs)") + MiqTask.where("id in (select miq_task_id from jobs)").delete_all Job.update_all(:miq_task_id => nil) end end