pub struct SchemaDomain {
pub name: &'static str,
pub migrations: &'static [Migration],
pub initialize_current: fn(&Transaction<'_>) -> Result<(), Error>,
pub allowed_existing_versions: &'static [i64],
pub released_predecessors: &'static [SchemaPredecessor],
pub owned_objects: &'static [SchemaObject],
pub retired_objects: &'static [SchemaObject],
}Expand description
A store’s schema domain: its ledger name plus the ordered migration list.
Fields§
§name: &'static strLedger key. Kebab-case, stable forever (it is persisted in files).
migrations: &'static [Migration]Ordered migrations, versions contiguous from 1.
initialize_current: fn(&Transaction<'_>) -> Result<(), Error>Initialize a genuinely fresh domain directly at the current schema.
This is intentionally separate from historical upgrades. A current base initializer may already contain objects that a released predecessor transition creates or rebuilds; replaying the transition on fresh state would either collide or weaken strict collision detection with idempotent DDL.
allowed_existing_versions: &'static [i64]Exact existing released versions that this binary may open. The current supported version is included for an explicit manifest even though it needs no migration.
released_predecessors: &'static [SchemaPredecessor]Exact catalog verifiers for every allowed version below current.
owned_objects: &'static [SchemaObject]Complete set of catalog objects owned by this domain across its current schema. Foreign co-tenant objects are deliberately absent.
retired_objects: &'static [SchemaObject]Names owned by supported predecessors but intentionally absent from the current schema. They remain reserved for fresh-domain detection and predecessor fingerprints.
Implementations§
Source§impl SchemaDomain
impl SchemaDomain
Sourcepub fn supported_version(&self) -> i64
pub fn supported_version(&self) -> i64
Highest version this binary knows for the domain.