class AddYearToTemplateSettings < ActiveRecord::Migration[6.0]
  def change
    add_reference :billing_templates, :school_year, type: :integer, null: false,
      index: false, after: :school_id,
      foreign_key: { to_table: :SchoolYears, primary_key: :SchoolYearID }

    add_index :billing_templates, [:school_id, :school_year_id]
  end
end
