Enum sqlx_core::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§
source§impl MigrationType
impl MigrationType
pub fn from_filename(filename: &str) -> Self
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§
source§impl Clone for MigrationType
impl Clone for MigrationType
source§fn clone(&self) -> MigrationType
fn clone(&self) -> MigrationType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl 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§
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