class CreateAdyenNotifications

@private

Public Class Methods

down() click to toggle source
   # File lib/adyen/templates/notification_migration.rb
26 def self.down
27   drop_table :adyen_notifications
28 end
up() click to toggle source
   # File lib/adyen/templates/notification_migration.rb
 4 def self.up
 5   create_table :adyen_notifications do |t|
 6     t.boolean  :live,                  :null => false, :default => false
 7     t.string   :event_code,            :null => false, :limit => 40
 8     t.string   :psp_reference,         :null => false, :limit => 50
 9     t.string   :original_reference,    :null => true
10     t.string   :merchant_reference,    :null => false
11     t.string   :merchant_account_code, :null => false
12     t.datetime :event_date,            :null => false
13     t.boolean  :success,               :null => false, :default => false
14     t.string   :payment_method,        :null => true
15     t.string   :operations,            :null => true
16     t.text     :reason,                :null => true
17     t.string   :currency,              :null => true, :limit => 3
18     t.integer  :value,                 :null => true
19     t.boolean  :processed,             :null => false, :default => false
20     t.timestamps
21   end
22    
23   add_index :adyen_notifications, [:merchant_account_code, :psp_reference, :event_code, :success], :unique => true, :name => 'adyen_notification_uniqueness'
24 end