Struct schemamama::Migrator [] [src]

pub struct Migrator<T: Adapter> { /* fields omitted */ }

Maintains an ordered collection of migrations to utilize.

Methods

impl<T: Adapter> Migrator<T>
[src]

[src]

Create a migrator with a given adapter.

[src]

Get a reference to the adapter.

[src]

Register a migration. If a migration with the same version is already registered, a warning is logged and the registration fails.

[src]

Returns true is a migration with the provided version has been registered.

[src]

Returns the set of all registered migration versions.

[src]

Returns the lowest version of the registered migrations, or None if no migrations have been registered.

[src]

Returns the highest version of the registered migrations, or None if no migrations have been registered.

[src]

Returns the latest migration version, or None if no migrations have been recorded.

[src]

Returns a set of the versions of all of the currently applied migrations.

[src]

Rollback to the specified version (exclusive), or rollback to the state before any registered migrations were applied if None is specified.

[src]

Migrate to the specified version (inclusive).

Trait Implementations

Auto Trait Implementations

impl<T> Send for Migrator<T> where
    T: Send,
    <T as Adapter>::MigrationType: Send

impl<T> Sync for Migrator<T> where
    T: Sync,
    <T as Adapter>::MigrationType: Sync