defmodule Poex.Repo.Migrations.CreateOperations do use Ecto.Migration def change do create table(:operations, primary_key: false) do add :id, :uuid, primary_key: true, null: false add :type, :string add :value, :map add :attributes, :map add :document_id, references(:pad_documents, type: :uuid) timestamps() end create index(:operations, [:document_id]) end end