ruby on rails

create a foreign key for

belongs_to and has_many relationship

class AddForeignKeyToCssMath < ActiveRecord::Migration
  def change
    add_reference :ccss_maths, :cosmic_lesson, foreign_key: true
  end
end