class CreateCovidEmployeeScreenings < ActiveRecord::Migration[6.0]
  def change
    create_table :covid_employee_screenings do |t|
      t.references :employee, type: :integer, null: false,
        foreign_key: { to_table: :Users, primary_key: :UserID }

      t.date :date, null: false
      t.timestamps

      t.index [:employee_id, :date], unique: true
    end
  end
end
