namespace OpenWaf.Edge.Startup;
///
/// What the schema step did when this edge started, kept for the operator to ask
/// about afterwards (OPEN-55).
///
/// The schema step runs once, before the first request, and its output used to
/// be a log line nobody reads at 03:00. The question it answers — does the
/// database this edge is serving against actually have the tables this build
/// needs — is a live question, so the answer lives on the state surface next to
/// the pillars it explains.
///
internal sealed class SchemaUpgradeReport
{
public string Strategy { get; set; } = "not run";
/// Tables this start had to create because the database predated them.
public int TablesAdded { get; set; }
/// Migrations written into a history table the database did not have.
public int MigrationsBaselined { get; set; }
/// Migrations that then ran.
public int MigrationsApplied { get; set; }
/// What is still missing after all of it. Empty is the invariant; anything
/// else names a pillar this build can run with no storage behind it.
public IReadOnlyList MissingTables { get; set; } = [];
}