Creates and drops Orkestra's internal projection tables.
This module follows the Oban-style library migration pattern: Orkestra
defines the DDL internally, and the consuming application generates a
thin wrapper migration that delegates to up/0 and down/0.
Usage
Generate a migration in your application:
mix ecto.gen.migration create_orkestra_projection_tablesIn the generated migration file, delegate to this module:
defmodule MyApp.Repo.Migrations.CreateOrkestraProjectionTables do
use Ecto.Migration
def up, do: Orkestra.Projection.Migration.up()
def down, do: Orkestra.Projection.Migration.down()
endThen run:
mix ecto.migrateTables
projection_checkpoints— one row per projector; trackslast_positionand halt status (halted,halted_at). Unique index onprojector_name.projection_dead_letters— one row per parked event; carries the six ERR-02 fields. Indexed onprojector_nameand(projector_name, position).