class CreateDegreesSubjects < ActiveRecord::Migration
  def change
    create_table :degrees_subjects, id: false do |t|
      t.references :degree, null: false, index: true
      t.references :subject, null: false, index: true
    end

    add_foreign_key :degrees_subjects, :degrees
    add_foreign_key :degrees_subjects, :subjects
  end
end
