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 read-only predicate: returns true if migration was already applied through a mechanism other than the migration tracker. It runs while this connection holds the SQLite write lock.
Auto Trait Implementations§
impl Forget for Migration
impl Freeze for Migration
impl Move for Migration
impl RefUnwindSafe for Migration
impl Send for Migration
impl Sync for Migration
impl Unpin for Migration
impl UnsafeUnpin for Migrationwhere
&'static str: UnsafeUnpin,
impl UnwindSafe for Migrationwhere
&'static str: UnwindSafe,
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