Sha256: 10a1f8b0919cf87b2d1d9f15169c8e68ae4f0427f45459d1dd14a2c34b643be8

Contents?: true

Size: 1.06 KB

Versions: 13

Compression:

Stored size: 1.06 KB

Contents

class CreateSixSaferpayPayments < ActiveRecord::Migration[5.1]
  def change
    create_table :spree_six_saferpay_payments do |t|
      t.references :order
      t.references :payment_method

      t.string :token
      t.datetime :expiration
      t.string :redirect_url
      t.string :transaction_id
      t.string :transaction_status
      t.datetime :transaction_date
      t.string :six_transaction_reference
      t.string :display_text
      t.string :masked_number
      t.string :expiration_year
      t.string :expiration_month
      t.text :response_hash

      t.timestamps
    end

    add_index :spree_six_saferpay_payments, :token, unique: true
    add_index :spree_six_saferpay_payments, :transaction_id, unique: true
    add_index :spree_six_saferpay_payments, :six_transaction_reference, unique: true

    # hack around foreign_key restriction by manually defining them
    add_foreign_key :spree_six_saferpay_payments, :spree_orders, column: :order_id
    add_foreign_key :spree_six_saferpay_payments, :spree_payment_methods, column: :payment_method_id
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
solidus_six_saferpay-0.5.0 db/migrate/20190523075638_create_six_saferpay_payments.rb
solidus_six_saferpay-0.4.0 db/migrate/20190523075638_create_six_saferpay_payments.rb
solidus_six_saferpay-0.3.0 db/migrate/20190523075638_create_six_saferpay_payments.rb
solidus_six_saferpay-0.1.8.1 db/migrate/20190523075638_create_six_saferpay_payments.rb
solidus_six_saferpay-0.2.0 db/migrate/20190523075638_create_six_saferpay_payments.rb
solidus_six_saferpay-0.1.8 db/migrate/20190523075638_create_six_saferpay_payments.rb
solidus_six_saferpay-0.1.7 db/migrate/20190523075638_create_six_saferpay_payments.rb
solidus_six_saferpay-0.1.5 db/migrate/20190523075638_create_six_saferpay_payments.rb
solidus_six_saferpay-0.1.4 db/migrate/20190523075638_create_six_saferpay_payments.rb
solidus_six_saferpay-0.1.3 db/migrate/20190523075638_create_six_saferpay_payments.rb
solidus_six_saferpay-0.1.2 db/migrate/20190523075638_create_six_saferpay_payments.rb
solidus_six_saferpay-0.1.1 db/migrate/20190523075638_create_six_saferpay_payments.rb
solidus_six_saferpay-0.1.0 db/migrate/20190523075638_create_six_saferpay_payments.rb