add migration

This commit is contained in:
Rimian Perkins 2019-09-13 14:35:13 +10:00
parent c90d4b2f8e
commit d09f654b3e
1 changed files with 4 additions and 10 deletions

View File

@ -2,16 +2,10 @@
class CreatePaymentsTable < ActiveRecord::Migration[5.2]
def change
def change
create_table :payments do |t|
t.integer :payment_intent_id, null: false
t.string :receipt_email, null: false
t.string :url, null: false
t.integer :amount, null: false
t.timestamps
end
add_index :payments, [:payment_intent_id], unique: true
create_table :payments do |t|
t.timestamps
end
add_index :payments, [:payment_intent_id], unique: true
end
end