pub struct Migration {
pub from_version: SchemaVersion,
pub to_version: SchemaVersion,
pub changes: Vec<SchemaChange>,
}Expand description
Migration between two schema versions
Fields§
§from_version: SchemaVersion§to_version: SchemaVersion§changes: Vec<SchemaChange>Implementations§
Source§impl Migration
impl Migration
pub fn new(from: SchemaVersion, to: SchemaVersion) -> Self
pub fn add_column( self, name: impl Into<String>, column_type: SochType, default: SochValue, ) -> Self
pub fn add_column_at( self, name: impl Into<String>, column_type: SochType, default: SochValue, position: usize, ) -> Self
pub fn drop_column(self, name: impl Into<String>) -> Self
pub fn rename_column( self, old_name: impl Into<String>, new_name: impl Into<String>, ) -> Self
pub fn change_type( self, name: impl Into<String>, new_type: SochType, converter: TypeConverter, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Migration
impl RefUnwindSafe for Migration
impl Send for Migration
impl Sync for Migration
impl Unpin for Migration
impl UnsafeUnpin for Migration
impl UnwindSafe for Migration
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