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.
educoder/db/migrate/20200302100750_create_cours...

18 lines
582 B

class CreateCourseMemberAttendances < ActiveRecord::Migration[5.2]
def change
create_table :course_member_attendances do |t|
t.references :course_member, index: true
t.references :user
t.references :course, index: true
t.references :course_attendance
t.references :course_group, index: true
t.integer :attendance_mode, default: 0
t.integer :attendance_status, default: 0
t.timestamps
end
add_index :course_member_attendances, [:course_attendance_id, :user_id], unique: true, name: "index_on_user_attendance"
end
end