class CreateEarnings < ActiveRecord::Migration[8.0] def change create_table :earnings do |t| t.integer :amount_cents t.integer :fee_cents t.integer :status t.string :stripe_payout_id t.integer :net_amount_cents t.references :event, null: false, foreign_key: false, index: true t.references :user, null: false, foreign_key: false, index: true t.references :order, null: false, foreign_key: false, index: true t.timestamps end end end