Skip to content

Commit fd83ffb

Browse files
Preloop AgentBnjoroge1
authored andcommitted
docs(control): name the pre-ledger versions the guard meets
The current in-place schema moves are SQLite v4 / Postgres v5 (#365), but the ledger refusal and the `--adopt-baseline` help text still said v3/v4 — an operator reading the refusal would look for the wrong build. The foreign-store refusal also named a `preloop store import` command that does not exist; the command is `preloop store import-legacy`, as docs/control-migrations.md and the legacy-store refusal already say.
1 parent 731057e commit fd83ffb

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

‎crates/preloop-cli/src/store.rs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ struct MigrateArgs {
3333
store: Option<String>,
3434

3535
/// Adopt a pre-ledger control database after verifying its shape
36-
/// (unreleased v3/v4 builds), then apply pending migrations. Refused
37-
/// unless the database's structure is exactly a known migration point.
36+
/// (an unreleased build: SQLite v4 / Postgres v5), then apply pending
37+
/// migrations. Refused unless the database's structure is exactly a
38+
/// known migration point.
3839
#[arg(long)]
3940
adopt_baseline: bool,
4041

‎crates/preloop-runner-server/src/control/migrations.rs‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,13 @@ pub(crate) fn refusal(ledger: Ledger) -> String {
5353
.to_owned(),
5454
Ledger::Foreign => "control database holds tables but no control schema; refusing to \
5555
initialize over existing state. Point the server at a dedicated control database, \
56-
or import (`preloop store import`, docs/control-migrations.md)."
56+
or import a legacy store (`preloop store import-legacy`, docs/control-migrations.md)."
5757
.to_owned(),
5858
Ledger::Unledgered => "control database has a control schema but no \
59-
`refinery_schema_history` ledger: it predates tracked migrations (unreleased v3/v4 \
60-
builds). Adopt it explicitly with `preloop store migrate --adopt-baseline`, which \
61-
verifies the schema first, or recreate/import; the server never adopts it silently."
59+
`refinery_schema_history` ledger: it predates tracked migrations (an unreleased \
60+
pre-ledger build: SQLite v4 / Postgres v5). Adopt it explicitly with \
61+
`preloop store migrate --adopt-baseline`, which verifies the schema first, or \
62+
recreate/import; the server never adopts it silently."
6263
.to_owned(),
6364
Ledger::MissingMeta => "control database has a migration ledger but no `schema_meta` \
6465
table: the schema is incomplete (a partial create or manual surgery). Restore the \

‎crates/preloop-runner-server/src/store_admin.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ impl StoreTarget {
6666
#[derive(Debug, Clone)]
6767
pub struct MigrateOptions {
6868
/// Adopt a pre-ledger control database after verifying its shape
69-
/// (unreleased v3/v4 builds), then apply the pending migrations.
69+
/// (an unreleased build: SQLite v4 / Postgres v5), then apply the
70+
/// pending migrations.
7071
pub adopt_baseline: bool,
7172
/// Take the pre-migration SQLite backup (default on; set false to skip).
7273
pub backup: bool,

0 commit comments

Comments
 (0)