Enum sqlx::migrate::MigrationType
source · [−]pub enum MigrationType {
Simple,
ReversibleUp,
ReversibleDown,
}
Expand description
Migration Type represents the type of migration
Variants
Simple
Simple migration are single file migrations with no up / down queries
ReversibleUp
ReversibleUp migrations represents the add or update part of a reversible migrations It is expected the every migration of this type will have a corresponding down file
ReversibleDown
ReversibleDown migrations represents the delete or downgrade part of a reversible migrations It is expected the every migration of this type will have a corresponding up file
Implementations
sourceimpl MigrationType
impl MigrationType
pub fn from_filename(filename: &str) -> MigrationType
pub fn is_reversible(&self) -> bool
pub fn is_down_migration(&self) -> bool
pub fn label(&self) -> &'static str
pub fn suffix(&self) -> &'static str
pub fn file_content(&self) -> &'static str
Trait Implementations
sourceimpl Clone for MigrationType
impl Clone for MigrationType
sourcefn clone(&self) -> MigrationType
fn clone(&self) -> MigrationType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MigrationType
impl Debug for MigrationType
impl Copy for MigrationType
Auto Trait Implementations
impl RefUnwindSafe for MigrationType
impl Send for MigrationType
impl Sync for MigrationType
impl Unpin for MigrationType
impl UnwindSafe for MigrationType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more