add migration
This commit is contained in:
parent
c90d4b2f8e
commit
d09f654b3e
|
@ -1,17 +1,11 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class CreatePaymentsTable < ActiveRecord::Migration[5.2]
|
class CreatePaymentsTable < ActiveRecord::Migration[5.2]
|
||||||
def change
|
|
||||||
def change
|
def change
|
||||||
create_table :payments do |t|
|
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
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index :payments, [:payment_intent_id], unique: true
|
add_index :payments, [:payment_intent_id], unique: true
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue