dev_forum
cxt 5 years ago
parent a317f05f06
commit 9741a02503

@ -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