defmodule DaProductApp.Repo.Migrations.CreateReqChkTxns do use Ecto.Migration def change do create table(:req_chk_txns) do add :transaction_id, :bigint, null: false add :msg_id, :string, null: false add :org_id, :string, null: false add :original_txn_id, :string, null: false add :status, :string, null: false, default: "pending" add :validation_type, :string add :checked_at, :utc_datetime # store received and sent XML as hashes/blobs for audit and compact storage add :req_xml_hash, :binary add :resp_xml_hash, :binary add :partner_id, :binary, size: 16 add :merchant_id, :bigint timestamps(type: :utc_datetime) end create unique_index(:req_chk_txns, [:msg_id]) create index(:req_chk_txns, [:transaction_id]) create index(:req_chk_txns, [:org_id]) create index(:req_chk_txns, [:validation_type]) end end