class CreateAccTechnologyPayment < ActiveRecord::Migration[6.1]
  def change
    create_table :AccTechnologyPayment, id: false do |t|
      t.primary_key :TCHID, :bigint, unsigned: true

      t.bigint :SchoolID, null: false
      t.bigint :SchoolYearID, null: false
      t.bigint :FamilyID, null: false
      t.bigint :StudentID, null: false

      t.text :PaymentType
      t.text :PaymentLast4
      t.text :TransactionID
      t.decimal :Amount, precision: 10, scale: 2
      t.text :Status

      t.timestamp :CreatedAt, default: nil
      t.timestamp :UpdatedAt, default: nil

      t.index :SchoolID, name: "payments_schoolid_index"
    end
  end
end
