Class: CreatePayflowWebhookEvents

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/payflow/templates/migration_webhook_event.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



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

def change
  create_table :payflow_webhook_events do |t|
    t.string :provider, null: false
    t.json :payload, null: false, default: {}
    t.string :status, null: false, default: "pending"
    t.datetime :processed_at

    t.timestamps
  end

  add_index :payflow_webhook_events, :status
  add_index :payflow_webhook_events, :provider
end