Struct migrant_lib::Migrator
[−]
[src]
pub struct Migrator { /* fields omitted */ }
Migration applicator
Methods
impl Migrator
[src]
fn with_config(config: &Config) -> Self
[src]
Initialize a new Migrator
with a given config
fn direction(&mut self, dir: Direction) -> &mut Self
[src]
Set direction
. Default is Up
.
Up
=> run up.sql
.
Down
=> run down.sql
.
fn force(&mut self, force: bool) -> &mut Self
[src]
Set force
to forcefully apply migrations regardless of errors
fn fake(&mut self, fake: bool) -> &mut Self
[src]
Set fake
to fake application of migrations.
Applied migrations table will be updated as if migrations were actually run.
fn all(&mut self, all: bool) -> &mut Self
[src]
Set all
to run all remaining available migrations in the given direction
fn apply(&self) -> Result<()>
[src]
Apply migrations using current configuration