pub enum SchemaMigrationStep {
AddPredicate {
name: String,
arity: usize,
},
RemovePredicate {
name: String,
},
RenamePredicate {
old_name: String,
new_name: String,
},
AddArityColumn {
predicate: String,
position: usize,
default_value: String,
},
RemoveArityColumn {
predicate: String,
position: usize,
},
AddDomain {
name: String,
},
RemoveDomain {
name: String,
},
AddRule {
name: String,
},
RemoveRule {
name: String,
},
}Expand description
A concrete migration step to transform the old schema into the new schema.
Variants§
AddPredicate
Create a new predicate slot.
RemovePredicate
Drop an existing predicate slot.
RenamePredicate
Rename a predicate (non-destructive when reverse is possible).
AddArityColumn
Extend a predicate by inserting a new positional argument.
RemoveArityColumn
Shrink a predicate by removing a positional argument.
AddDomain
Register a new domain.
RemoveDomain
Unregister an existing domain.
AddRule
Bind a new variable/rule entry.
RemoveRule
Remove an existing variable/rule entry.
Implementations§
Source§impl SchemaMigrationStep
impl SchemaMigrationStep
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Human-readable description of the step.
Sourcepub fn is_destructive(&self) -> bool
pub fn is_destructive(&self) -> bool
Returns true when this step is destructive (data may be lost).
Trait Implementations§
Source§impl Clone for SchemaMigrationStep
impl Clone for SchemaMigrationStep
Source§fn clone(&self) -> SchemaMigrationStep
fn clone(&self) -> SchemaMigrationStep
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SchemaMigrationStep
impl RefUnwindSafe for SchemaMigrationStep
impl Send for SchemaMigrationStep
impl Sync for SchemaMigrationStep
impl Unpin for SchemaMigrationStep
impl UnsafeUnpin for SchemaMigrationStep
impl UnwindSafe for SchemaMigrationStep
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
Mutably borrows from an owned value. Read more