Expand description
Who owns the database schema for this invocation.
Opening the database used to apply the migrations as a side effect, which
made every subcommand an upgrade step — acme-proxy audit list against a
newer binary silently rewrote the schema — and let two processes starting
together race MIGRATOR::run on SQLite, where sqlx takes no migration
lock. (PostgreSQL has one, an advisory lock, which serializes the race but
does nothing for the first problem.)
So the act is named now, and this is the decision: one owner per
invocation, everybody else checks and refuses. It lives here rather than in
src/main.rs for plan_logging’s reason —
that file is excluded from the coverage floor, and each rule below is a row
of a table test.
Enums§
- Schema
Plan - What an invocation is entitled to do about the database schema.
Functions§
- plan_
schema - Decides whether
commandmay migrate, or must find the schema already current.