class CreateSchoolSnapshots < ActiveRecord::Migration[6.0]
  def change
    create_table :school_snapshots do |t|
      t.references :school, type: :integer, null: false,
        foreign_key: { to_table: :Schools, primary_key: :SchoolID }

      t.integer :academic_year, null: false
      t.integer :employee_count, null: false
      t.integer :student_count, null: false
      t.integer :family_count, null: false

      t.timestamps
    end
  end
end
