socialforge/db/migrate/20160418074429_delete_other...

12 lines
241 B
Ruby

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