pub struct SchemaDiff {
pub destructive_policy: DestructivePolicy,
pub operations: Vec<SchemaOperation>,
pub warnings: Vec<DiffWarning>,
}Expand description
The result of comparing two schemas.
Fields§
§destructive_policy: DestructivePolicyPolicy used when generating this diff.
operations: Vec<SchemaOperation>Operations to transform current schema to expected schema.
warnings: Vec<DiffWarning>Warnings about potential issues.
Implementations§
Source§impl SchemaDiff
impl SchemaDiff
Sourcepub fn new(destructive_policy: DestructivePolicy) -> Self
pub fn new(destructive_policy: DestructivePolicy) -> Self
Create an empty diff with the provided destructive policy.
Sourcepub fn has_destructive(&self) -> bool
pub fn has_destructive(&self) -> bool
Check if there are any destructive operations.
Sourcepub fn destructive_operations(&self) -> Vec<&SchemaOperation>
pub fn destructive_operations(&self) -> Vec<&SchemaOperation>
Get only destructive operations.
Sourcepub fn requires_confirmation(&self) -> bool
pub fn requires_confirmation(&self) -> bool
Whether this diff requires explicit confirmation before applying.
Sourcepub fn order_operations(&mut self)
pub fn order_operations(&mut self)
Reorder operations for safe execution.
Trait Implementations§
Source§impl Debug for SchemaDiff
impl Debug for SchemaDiff
Auto Trait Implementations§
impl Freeze for SchemaDiff
impl RefUnwindSafe for SchemaDiff
impl Send for SchemaDiff
impl Sync for SchemaDiff
impl Unpin for SchemaDiff
impl UnsafeUnpin for SchemaDiff
impl UnwindSafe for SchemaDiff
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).