pub enum MigrationError {
NotContiguous {
position: usize,
found: u32,
expected: u32,
},
SchemaTooNew {
current: u32,
supported: u32,
},
Failed {
version: u32,
name: &'static str,
source: Box<DbError>,
},
Ledger(Box<DbError>),
}Expand description
Why running the synced-schema ladder failed. Carried as its own arm of
OpenError at the Database::open boundary — not
flattened into a DbError string — so the variants stay typed for the
engine’s own tests, the snapshot bootstrap gate, and hosts matching
MigrationError::SchemaTooNew to prompt an app update.
Variants§
NotContiguous
The registered set is not exactly 1..=N ascending with no gaps or
duplicates — a host wiring bug, surfaced at startup before any DDL runs.
SchemaTooNew
The on-disk schema version is newer than this binary’s top migration, so this binary cannot apply a changeset (or open a snapshot image) at that version. Covers opening a snapshot written by a newer device and an older binary reopening a db a newer binary already migrated.
Failed
A migration’s DDL or backfill failed. Its transaction rolled back, so
user_version did not advance over the half-applied step.
Ledger(Box<DbError>)
Reading or writing user_version, or the BEGIN/COMMIT around a step,
failed.
Trait Implementations§
Source§impl Debug for MigrationError
impl Debug for MigrationError
Source§impl Display for MigrationError
impl Display for MigrationError
Source§impl Error for MigrationError
impl Error for MigrationError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for MigrationError
impl !RefUnwindSafe for MigrationError
impl Send for MigrationError
impl Sync for MigrationError
impl Unpin for MigrationError
impl UnsafeUnpin for MigrationError
impl !UnwindSafe for MigrationError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more