Constant SCHEMA_VERSION
pub const SCHEMA_VERSION: u32 = 2;event-store and (crate features event-store or projection-store) only.Expand description
The event log’s schema version.
Two: MIGRATION_1 and MIGRATION_3. It was one through first
publish, while the slice that wired ADR-0024’s mechanism could still add
its column to MIGRATION_1 in place, because no deployed table existed to
alter. That licence ended at this crate’s first publish, so write groups,
the first change to the log after it, are a migration of their own and a
version of their own.
Nothing stores this number in the database: a schema carries no marker, and
apply is idempotent, so bringing a schema up to this version is running
apply against it.
migrations/0002_projection_checkpoint.sql is not part of it. It adds
no object to the event log and belongs to the other role’s lineage, which
carries its own PROJECTION_SCHEMA_VERSION — named in code rather than
linked, because that constant is behind the projection-store feature and
this one is not. The number in that filename is the directory’s sequence, so
that a DBA applying the files in order gets a working database for whichever
roles they use.