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
18
# 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, null: false
    t.string  :last_4_digits, null: false
    t.string  :exp_month, null: false
    t.string  :exp_year, null: false
    t.string  :brand, null: false
    t.boolean :is_default
    t.integer :customer_id, null: false
    t.string  :customer_type, null: false
    t.index   [:customer_id, :customer_id]
    t.string  :name

    t.timestamp :last_validated_at, null: false
    t.timestamps null: false
  end
end