Skip to main content

stamp_schema_version

Function stamp_schema_version 

Source
pub fn stamp_schema_version(
    conn: &Connection,
    store_key: &str,
    version: i32,
) -> Result<(), SchemaVersionError>
Expand description

Record this store’s schema revision in keyed metadata after migrations run.

The revision is keyed by store_key rather than written to the database-wide PRAGMA user_version, so co-located stores (the sidecar keeps the receipt and approval stores in one file) each track their own revision without a sibling’s bump making this store refuse to open the shared file.

The table and column names are compile-time constants; store_key and version are store-owned values bound as parameters, never caller input.