Class: CreateRubyNativePurchaseIntents

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/ruby_native/templates/create_ruby_native_purchase_intents.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



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

def change
  create_table :ruby_native_purchase_intents do |t|
    t.string :uuid, null: false
    t.string :customer_id, null: false
    t.string :product_id
    t.string :success_path
    t.string :status, null: false, default: "pending"
    t.string :environment

    t.timestamps
  end

  add_index :ruby_native_purchase_intents, :uuid, unique: true
  add_index :ruby_native_purchase_intents, :customer_id
end