Class: CreateWepayCheckoutRecords

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/wepay_rails/install/templates/create_wepay_checkout_records.rb

Class Method Summary collapse

Class Method Details

.downObject



36
37
38
# File 'lib/generators/wepay_rails/install/templates/create_wepay_checkout_records.rb', line 36

def self.down
    drop_table :wepay_checkout_records
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/generators/wepay_rails/install/templates/create_wepay_checkout_records.rb', line 2

def self.up

    create_table :wepay_checkout_records do |t|
        t.integer :checkout_id
        t.integer :account_id
        t.string :state
        t.string :short_description
        t.text :long_description
        t.string :currency
        t.decimal :amount
        t.decimal :app_fee
        t.string :fee_payer
        t.decimal :gross
        t.decimal :fee
        t.string :reference_id
        t.text :redirect_uri
        t.text :callback_uri
        t.text :checkout_uri
        t.string :payer_email
        t.string :payer_name
        t.text :cancel_reason
        t.text :refund_reason
        t.boolean :auto_capture
        t.boolean :require_shipping
        t.text :shipping_address
        t.decimal :tax
        t.string :security_token

        t.timestamps
    end

    add_index :wepay_checkout_records, :checkout_id
end