class CreateCourseAttendances < ActiveRecord::Migration[5.2]
  def change
    create_table :course_attendances do |t|
      t.references :course, index: true
      t.references :user, index: true
      t.string :name
      t.integer :mode, limit: 1, default: 0
      t.date :attendance_date
      t.time :start_time
      t.time :end_time
      t.string :attendance_code

      t.timestamps
    end
  end
end
