educoder/db/migrate/20190410081736_migrate_home...

6 lines
173 B

class MigrateHomeworkAttachments < ActiveRecord::Migration[5.2]
def change
Attachment.where(container_type: "HomeworkCommon").update_all(attachtype: 1)
end
end