class AddPlacementsToLeagueRosters < ActiveRecord::Migration[5.2]
  def change
    add_column :league_rosters, :placement, :integer

    reversible do |dir|
      dir.up do
        League.find_each do |league|
          league.divisions.each do |division|
            Leagues::Rosters::ScoreUpdatingService.call(league, division)
          end
        end
      end
    end
  end
end

class AddPlacementsToLeagueRosters < ActiveRecord::Migration[5.2]
  def change
    add_column :league_rosters, :placement, :integer

    reversible do |dir|
      dir.up do
        League::Roster.find_each do |roster|
          roster.update_match_counters!
        end
      end
    end
  end
end

Revert "Fix old migration not working with scoring refactor "
Revert "Fix old migration not working with scoring refactor [ci skip]"

This reverts commit 1abba3b638d87f6ebf848ed0b3c94a7f3230975d.
