class CreateTeacherGroupRecords < ActiveRecord::Migration[5.2]
  def change
    create_table :teacher_group_records do |t|
      t.references :user
      t.references :course
      t.integer :group_id

      t.timestamps
    end

    add_index :teacher_group_records, [:user_id, :course_id], unique: true
  end
end
