Scriba.Migrations (Scriba v0.1.0)

Copy Markdown View Source

Ecto migration helpers users invoke from their own migration files.

Usage

defmodule MyApp.Repo.Migrations.AddScribaTables do
  use Ecto.Migration

  def up, do: Scriba.Migrations.up()
  def down, do: Scriba.Migrations.down()
end

Creates scriba_positions (per-stream cursors) and scriba_dead_letters (ยง9). Both tables are owned by the user's repo โ€” Scriba does not manage migrations on its own.

stream_id constraint

stream_id is varchar(255). Adapters whose native stream identifiers are richer (UUIDs, integers, composite keys) must convert to a string at the boundary. This is a deliberate v0.1 simplification โ€” it lets the position cursor schema and ETS keys share one type without per-adapter generics.

Summary

Functions

down()

up()