You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
430 B
14 lines
430 B
5 years ago
|
class CreateCourseAttendanceGroups < ActiveRecord::Migration[5.2]
|
||
|
def change
|
||
|
create_table :course_attendance_groups do |t|
|
||
|
t.references :course, index: true
|
||
|
t.references :course_attendance
|
||
|
t.references :course_group, index: true
|
||
|
|
||
|
t.timestamps
|
||
|
|
||
|
add_index :course_attendances, [:course_attendance_id, :course_group_id, :course_id], name: "course_group_attendance", unique: true
|
||
|
end
|
||
|
end
|
||
|
end
|