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§
source§impl 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§
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
source§impl PartialEq<MigrationType> for MigrationType
impl PartialEq<MigrationType> for MigrationType
source§fn eq(&self, other: &MigrationType) -> bool
fn eq(&self, other: &MigrationType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.