Class: MagnetikCreateCreditCards

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/active_record/templates/migration_credit_cards.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/generators/active_record/templates/migration_credit_cards.rb', line 2

def change
  create_table :magnetik_credit_cards do |t|
    t.string  :stripe_card_id
    t.string  :last_4_digits
    t.string  :exp_month
    t.string  :exp_year
    t.string  :brand
    t.boolean :is_default
    t.integer :customer_id
    t.string  :customer_type
    t.index   [:customer_id, :customer_id]
    t.string  :name

    t.timestamps null: false
  end
end