Skip to main content

Crate sim_relation_migrate

Crate sim_relation_migrate 

Source
Expand description

Checked relational schema evolution.

Migration programs are admitted before a provider sees them. Admission proves a single revision chain, exact schema transitions, typed backfills, and the declared final target.

use sim_relation_migrate::{derive_lossless, OperationKind};
use sim_relation_schema::{fixtures, AcceptAllValues};
let schema = fixtures::document(&AcceptAllValues).unwrap();
assert!(derive_lossless(&schema, &schema).unwrap().is_empty());
let _: Option<OperationKind> = None;

Structs§

AdoptionManifest
Exact adoption declaration for an existing store.
CapabilityError
Missing provider migration capability.
CheckedProgram
Opaque proof that a migration program passed simulation.
MigrationCapabilities
Provider features needed for safely applying an admitted program.
MigrationProgram
An authored upgrade path.
Operation
One exact state transition. The complete output snapshot makes omission impossible: the declared operation cannot claim a target it does not produce.
Revision
An authored revision in a strictly linear history.
SchemaAttestation
Signed or otherwise provider-authenticated evidence of observed state.

Enums§

AdoptionError
Adoption verification failure.
MigrationError
Failure to prove a migration program.
OperationKind
A precisely described schema edit.

Functions§

admit
Simulates and admits the whole migration program.
derive_lossless
Derives only lossless table creation and nullable column addition operations. Every other difference fails closed and requires authored intent.