pub struct Migration {
pub id: &'static str,
pub up_sql: &'static str,
pub down_sql: Option<&'static str>,
pub is_already_applied: Option<fn(&Connection) -> bool>,
}Expand description
A single legacy migration step within a ServiceSchemaPlan.
Fields§
§id: &'static strUnique identifier for this migration.
up_sql: &'static strSQL to apply (forward direction).
down_sql: Option<&'static str>SQL to revert (optional).
is_already_applied: Option<fn(&Connection) -> bool>Optional predicate: returns true if migration was already applied through a mechanism other than the migration tracker.
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