迁移文件调整

dev_course
cxt 6 years ago
parent 3dbc481437
commit be653f8a94

@ -1,6 +1,6 @@
class AddIsInvalidToStudentWorksScores < ActiveRecord::Migration[5.2] class AddIsInvalidToStudentWorksScores < ActiveRecord::Migration[5.2]
def change def change
# add_column :student_works_scores, :is_invalid, :boolean, default: false add_column :student_works_scores, :is_invalid, :boolean, default: false
StudentWorksScore.where("score is not null").order("id desc").find_each do |score| StudentWorksScore.where("score is not null").order("id desc").find_each do |score|
unless score.is_invalid unless score.is_invalid

Loading…
Cancel
Save