pub const FORMAT_VERSION: u16 = 4;Expand description
On-disk format revision. Bump when the page layout changes incompatibly.
History:
- Version 1 (Phases 2 / 3a / 3b): schema catalog and table data were opaque bincode blobs chained across typed payload pages.
- Version 2 (Phases 3c / 3d): tables are stored as cell-based B-Trees;
the schema catalog is itself a table called
sqlrite_masterwith four columns(name, sql, rootpage, last_rowid). - Version 3 (Phase 3e):
sqlrite_mastergains atypecolumn (first), distinguishing'table'and'index'rows; secondary indexes persist as their own cell-based B-Trees whose cells use the newKIND_INDEXformat. - Version 4 (Phase 7): cell encoding gains the
KIND_VECTORvalue tag (length-prefixed dense f32 array) for the newVECTOR(N)column type. Per the Phase 7 plan (docs/phase-7-plan.mdQ8), later Phase 7 sub-phases (JSON, HNSW indexes) will add their own value/cell tags inside this same v4 envelope — no v5 mid-Phase-7.