pub struct MigrationStatement<'a> { /* private fields */ }Expand description
Implementations§
Source§impl<'a> MigrationStatement<'a>
impl<'a> MigrationStatement<'a>
Sourcepub fn from_diff(
schema_diff: &'a SchemaDiff<'a>,
capability: &Capability,
) -> Vec<Self>
pub fn from_diff( schema_diff: &'a SchemaDiff<'a>, capability: &Capability, ) -> Vec<Self>
Generates migration statements from a SchemaDiff.
Walks the diff’s type, table, column, and index changes and produces
the corresponding DDL statements. Type changes (CREATE TYPE, ALTER
TYPE) are emitted before table changes. On databases that lack
ALTER COLUMN support (e.g. SQLite), column type changes trigger a
full table recreation sequence.
Auto Trait Implementations§
impl<'a> Freeze for MigrationStatement<'a>
impl<'a> RefUnwindSafe for MigrationStatement<'a>
impl<'a> Send for MigrationStatement<'a>
impl<'a> Sync for MigrationStatement<'a>
impl<'a> Unpin for MigrationStatement<'a>
impl<'a> UnsafeUnpin for MigrationStatement<'a>
impl<'a> UnwindSafe for MigrationStatement<'a>
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