class CreateFinancialAidApplications < ActiveRecord::Migration[6.1]
  def change
    create_table :financial_aid_applications do |t|
      t.references :school_year, type: :integer, null: false,
        foreign_key: { to_table: :SchoolYears, primary_key: :SchoolYearID }
      t.references :family, type: :integer, null: false, index: false,
        foreign_key: { to_table: :Families, primary_key: :FamilyID }

      t.integer :status, null: false, default: false
      t.integer :credit_report_key
      t.integer :credit_report_key2
      t.decimal :score
      t.date :scored_at
      t.integer :credit_report_status
      t.date :submitted_at

      t.timestamps
    end
  end
end
