StatifierPersistence.Ecto.Migrations.V01 (StatifierPersistence v0.1.0)

Copy Markdown View Source

V01 of the package DDL: the charts, positions, and runs tables per ADR-0002 (as amended) and the storage contract's field set (ADR-0003 decision 3).

Table names, the surrogate primary key's column type, and the Postgres schema all come from the resolved StatifierPersistence.Ecto.Config - the same struct the generated schemas are built from. The engine identity columns (content_hash, session_id, run_id) are text with their unique indexes regardless of the configured key scheme: the identity guard never touches a surrogate key.

Summary

Functions

Drops the V01 tables in reverse creation order.

Creates the V01 tables and their unique indexes per config.

Functions

down(config)

@spec down(StatifierPersistence.Ecto.Config.t()) :: :ok

Drops the V01 tables in reverse creation order.

up(config)

Creates the V01 tables and their unique indexes per config.