1 class AddTablesForCaptureRefundVoidAndAuthorizations < ActiveRecord::Migration
4 create_table :authorizations do |t|
5 integer :credit_card_id
6 integer :transaction_id, :null => false
7 string :last_four_digits, :null => false
8 decimal :amount, :null => false
12 create_table :captures do |t|
13 foreign_key :authorization, :ref => true
14 integer :transaction_id, :null => false
15 decimal :amount, :null => false
19 create_table :refunds do |t|
20 foreign_key :authorization, :ref => true
21 integer :transaction_id, :null => false
22 decimal :amount, :null => false
26 create_table :voids do |t|
27 integer :voidee_id, :null => false
28 string :voidee_type, :null => false
29 integer :transaction_id, :null => false
39 drop_table :authorizations