class CreateStaff < ActiveRecord::Migration[6.0] def change create_table :staff do |t| t.references :account, null: false, foreign_key: true, index: { unique: true } t.references :laboratory, null: true, foreign_key: true t.string :type t.datetime :hired_at # physician.specialty, technician.skill, nurse.certification, volunteer.skill t.text :qualifications, array: true t.timestamps end add_index :staff, :type end end