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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more