pub enum MigrationConflictStrategy {
Drop,
Raise,
BackupAndDrop,
}
Expand description
Sometimes Migrations can’t proceed without having to drop existing data. This allows you to configure, how these cases should be handled.
Variants
Drop
Just drop the data, we don’t care that we have to sync again
Raise
Raise a SledStoreError::MigrationConflict
error with the path to the
DB in question. The caller then has to take care about what they want
to do and try again after.
BackupAndDrop
Default: The entire database is backed up under
$path.$timestamp.backup
(this includes the crypto store if they
are linked), before the state tables are dropped.
Trait Implementations
sourceimpl Clone for MigrationConflictStrategy
impl Clone for MigrationConflictStrategy
sourcefn clone(&self) -> MigrationConflictStrategy
fn clone(&self) -> MigrationConflictStrategy
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for MigrationConflictStrategy
impl Debug for MigrationConflictStrategy
sourceimpl PartialEq<MigrationConflictStrategy> for MigrationConflictStrategy
impl PartialEq<MigrationConflictStrategy> for MigrationConflictStrategy
sourcefn eq(&self, other: &MigrationConflictStrategy) -> bool
fn eq(&self, other: &MigrationConflictStrategy) -> bool
impl Eq for MigrationConflictStrategy
impl StructuralEq for MigrationConflictStrategy
impl StructuralPartialEq for MigrationConflictStrategy
Auto Trait Implementations
impl RefUnwindSafe for MigrationConflictStrategy
impl Send for MigrationConflictStrategy
impl Sync for MigrationConflictStrategy
impl Unpin for MigrationConflictStrategy
impl UnwindSafe for MigrationConflictStrategy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.