class CreateHipayHistories < ActiveRecord::Migration
  def change
    create_table :hipay_histories do |t|
      t.references :order, index: true
      
      
      t.string :operation
      t.string :status
      t.datetime :transaction_date
      t.decimal :origamount, :precision => 15, :scale => 10
      t.string :origcurrency
      t.integer :idformerchant
      t.string :emailclient
      t.string :idclient
      t.string :merchantdatas
      t.string :cardcountry
      t.string :ipcountry
      t.string :transid
      t.string :is3ds
      t.string :paymentmethod
      t.string :customercountry
      t.string :returncode
      t.string :returndescriptionshort
      t.string :returndescriptionlong
      
      

      t.timestamps null: false
    end
    add_foreign_key :hipay_histories, :orders
  end
end
