Struct schemer::Migrator

source ·
pub struct Migrator<T: Adapter> { /* private fields */ }
Expand description

Primary schemer type for defining and applying migrations.

Implementations

Create a Migrator using the given Adapter.

Register a migration into the dependency graph.

Register multiple migrations into the dependency graph. The Vec does not need to be order by dependency structure.

Apply migrations as necessary to so that the specified migration is applied (inclusive).

If to is None, apply all registered migrations.

Revert migrations as necessary so that no migrations dependent on the specified migration are applied. If the specified migration was already applied, it will still be applied.

If to is None, revert all applied migrations.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.