class MigrateCompetitionScoreStageId < ActiveRecord::Migration[5.2]
  def change
    change_column_default :competition_scores, :competition_stage_id, 0

    CompetitionScore.where("competition_stage_id is null").update_all(competition_stage_id: 0)
  end
end
