Struct migrant::Migrator
[−]
[src]
pub struct Migrator { /* fields omitted */ }Migration applicator
Methods
impl Migrator[src]
fn with_config(config: &Config) -> Self
Initialize a new Migrator with a given config
fn project_dir(self, proj_dir: &PathBuf) -> Self
Set project_dir
fn direction(self, dir: Direction) -> Self
Set direction. Default is Up.
Up => run up.sql.
Down => run down.sql.
fn force(self, force: bool) -> Self
Set force to forcefully apply migrations regardless of errors
fn fake(self, fake: bool) -> Self
Set fake to fake application of migrations.
Config will be updated as if migrations were actually run.
fn all(self, all: bool) -> Self
Set all to run all remaining available migrations in the given direction
fn apply(self) -> Result<(), Error>
Apply migrations using current configuration
Trait Implementations
impl Debug for Migrator[src]
impl Clone for Migrator[src]
fn clone(&self) -> Migrator
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more