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(self, dir: Direction) -> Self
[src]
Set direction
. Default is Up
.
Up
=> run up.sql
.
Down
=> run down.sql
.
fn force(self, force: bool) -> Self
[src]
Set force
to forcefully apply migrations regardless of errors
fn fake(self, fake: bool) -> Self
[src]
Set fake
to fake application of migrations.
Config
will be updated as if migrations were actually run.
fn all(self, all: bool) -> Self
[src]
Set all
to run all remaining available migrations in the given direction
fn apply(self) -> Result<()>
[src]
Apply migrations using current configuration