class CreateAccStripePayments < ActiveRecord::Migration[6.1]
  def change
    create_table :AccStripePayments, id: false do |t|
      t.primary_key :SPID, :bigint, unsigned: true
      t.bigint :SchoolID, null: false
      t.bigint :FamilyID, null: false
      t.bigint :AcctID, null: false
      t.text :PaymentType
      t.text :PaymentLast4
      t.text :TransactionID
      t.float :Amount
      t.float :MerchantFee
      t.float :SycamoreFee
      t.text :Status
      t.timestamp :CreatedAt, default: nil
      t.timestamp :UpdatedAt, default: nil

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