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 version(
        &mut self
    ) -> BoxFuture<'_, Result<Option<(i64, bool)>, MigrateError>>;
    fn validate<'e: 'm, 'm>(
        &'e mut self,
        migration: &'m Migration
    ) -> BoxFuture<'m, Result<(), 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 version( &mut self ) -> BoxFuture<'_, Result<Option<(i64, bool)>, MigrateError>>

👎Deprecated
source

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

👎Deprecated
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§