class DeleteOtherWorks < ActiveRecord::Migration def up works = StudentWork.where("homework_common_id = 3253 and user_id = 10740 and final_score = 0") unless works.empty? works.destroy_all end end def down end end