Tracks the schema migration version applied to the database.
Exactly one row, pinned to id = 1 after migration 063. Every
_set_version call replaces the row in place; the PK + CHECK make
duplicate or stray-id rows impossible.
- Snapshot source:
data/pyvalue.dbon2026-07-28 - Row count:
1 - Table size:
4,096 bytes(4.0 KiB) - Approximate bytes per row:
4,096.0
| Column | Type | Null | Key | Notes |
|---|---|---|---|---|
id |
INTEGER |
no | PK | always 1; CHECK (id = 1) enforces the single-row invariant |
version |
INTEGER |
no | applied schema version |
- Primary key:
id - Physical foreign keys: none
- Physical references from other tables: none
- Unique constraints beyond the primary key: none
- Main logical refs: none
- None beyond the primary key and unique constraints.
- migration bootstrap
- migration runner
version: compared by the migration bootstrap to determine which schema upgrades still need to run.
- Snapshot source:
data/pyvalue.dbon2026-07-28 - Sample window: first
1rows returned by SQLite ordered byversion ASC
[
{
"id": 1,
"version": 91
}
]- Single-row semantics are now enforced by the schema (
id INTEGER PRIMARY KEY CHECK (id = 1))._set_versionusesDELETE FROM schema_migrations; INSERT INTO schema_migrations (version) VALUES (?)— SQLite auto-picksid = 1for the insert because the table is empty, so the CHECK passes.