pub fn stamp_version(conn: &Connection, current: i64) -> Result<(), StoreError>Expand description
Stamp the database’s user_version PRAGMA to current. Called
AFTER run_*_schema succeeds, paired with a prior
check_schema_compat that gated the migrations on the
caller-binary speaking a compatible (or newer) schema version.
Splitting the read from the write makes the safety-lock order explicit at every call site:
ⓘ
check_schema_compat(&conn, OBJECT_SCHEMA_VERSION, "objects.db")?;
run_object_schema(&conn)?;
stamp_version(&conn, OBJECT_SCHEMA_VERSION)?;