pub trait Migrate {
    // Required methods
    fn ensure_migrations_table(
        &mut self
    ) -> BoxFuture<'_, Result<(), MigrateError>>;
    fn dirty_version(
        &mut self
    ) -> BoxFuture<'_, Result<Option<i64>, MigrateError>>;
    fn list_applied_migrations(
        &mut self
    ) -> BoxFuture<'_, Result<Vec<AppliedMigration>, MigrateError>>;
    fn lock(&mut self) -> BoxFuture<'_, Result<(), MigrateError>>;
    fn unlock(&mut self) -> BoxFuture<'_, Result<(), MigrateError>>;
    fn apply<'e: 'm, 'm>(
        &'e mut self,
        migration: &'m Migration
    ) -> BoxFuture<'m, Result<Duration, MigrateError>>;
    fn revert<'e: 'm, 'm>(
        &'e mut self,
        migration: &'m Migration
    ) -> BoxFuture<'m, Result<Duration, MigrateError>>;
}

Required Methods§

source

fn ensure_migrations_table(&mut self) -> BoxFuture<'_, Result<(), MigrateError>>

source

fn dirty_version(&mut self) -> BoxFuture<'_, Result<Option<i64>, MigrateError>>

source

fn list_applied_migrations( &mut self ) -> BoxFuture<'_, Result<Vec<AppliedMigration>, MigrateError>>

source

fn lock(&mut self) -> BoxFuture<'_, Result<(), MigrateError>>

source

fn unlock(&mut self) -> BoxFuture<'_, Result<(), MigrateError>>

source

fn apply<'e: 'm, 'm>( &'e mut self, migration: &'m Migration ) -> BoxFuture<'m, Result<Duration, MigrateError>>

source

fn revert<'e: 'm, 'm>( &'e mut self, migration: &'m Migration ) -> BoxFuture<'m, Result<Duration, MigrateError>>

Implementors§