pub struct Migration {
pub version: i64,
pub description: &'static str,
pub up: fn(&Connection) -> KimetsuResult<()>,
}Expand description
One forward-only schema migration. version is the value the DB is
stamped with AFTER up succeeds (i.e. migrations()[i].version is the
post-migration version). up MUST be idempotent (it may be re-run after
a crash mid-batch).
Fields§
§version: i64§description: &'static str§up: fn(&Connection) -> KimetsuResult<()>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