Skip to main content

Module schema

Module schema 

Source

Constants§

CREATE_STATEMENTS
All CREATE TABLE and CREATE INDEX statements in alphabetical order, used to compute the schema hash. This is the single source of truth — db.rs iterates this array directly instead of duplicating SQL.
FORGE_CURRENT_USER_VERSION
FORGE_MAX_USER_VERSION
FORGE_MIN_USER_VERSION
Range of valid user_version values for Forge databases.
FORGE_V2_USER_VERSION
The user_version value for schema v2.
FORGE_V3_USER_VERSION
The user_version value for schema v3.
FORGE_V4_USER_VERSION
The user_version value for schema v4.
FORGE_V5_USER_VERSION
The user_version value for schema v5.
MIGRATION_V2_STATEMENTS
Migration v2 statements — additive tables for experiments, evidence, and exports.
MIGRATION_V3_STATEMENTS
Migration v3 statements — additive raw tool receipt storage.
REQUIRED_TABLES
Required tables in a Forge database.

Functions§

compute_schema_hash
Compute the schema hash from the sorted CREATE TABLE statements.
forge_schema_hash
Compile-time schema hash (computed from CREATE_STATEMENTS).