defmodule DaProductApp.Repo.Migrations.CreateTransactionOperations do use Ecto.Migration def change do create table(:transaction_operations) do add :operation_request_id, :string add :transaction_id, :string add :operation_type, :string add :operation_status, :string add :operation_amount, :decimal, precision: 15, scale: 2 add :operation_currency, :string add :operation_date, :utc_datetime add :metadata, :map timestamps(type: :utc_datetime) end create index(:transaction_operations, [:operation_request_id]) create index(:transaction_operations, [:transaction_id]) create index(:transaction_operations, [:operation_type]) create index(:transaction_operations, [:operation_status]) end end