Generates the Ecto migration backing
AttestoMCP.Server.SessionStore.Ecto.
The generated migration creates one PostgreSQL table,
attesto_mcp_sessions. Rows are keyed by the pair {namespace, session_id} so several independently named MCP servers can safely share a
repository. The complete versioned session record is stored as JSONB in
record; created_at_ms, last_seen_ms, absolute_timeout_ms, and
idle_timeout_ms mirror the record for validation, while expires_at_ms
is a denormalized value used for bounded SQL-side expiry filtering and
cleanup. The record remains the source of truth; these query values are
refreshed whenever the record is saved or touched.
This task only writes a migration file. It never invokes Ecto.Migrator or
changes the database. Apply the file from the host application's normal
migration workflow.
Usage
mix attesto_mcp_server.gen.migration --repo MyApp.RepoOptions
--repo- the Ecto repo the migration is generated for. It may be supplied more than once when several repos intentionally share the same application package. When omitted, configured Ecto repos are discovered usingMix.Ecto, and none or an ambiguous set is rejected.--schema-prefix- an optional validated PostgreSQL schema used as Ecto'sprefix:for every table and index. The schema is created withCREATE SCHEMA IF NOT EXISTSby the migration and is left in place on rollback. The table name is fixed because the runtime schema queriesattesto_mcp_sessions.--migrations-path- directory in which the migration is written. It defaults to the repo'spriv/<repo>/migrationsdirectory. An explicit path may only be used with one repo so generation cannot partially write two competing migrations into the same directory.
A second invocation refuses to create a duplicate migration for the same path. This makes the table layout discoverable and prevents two generated migrations from competing over the same runtime schema.