Trait sqlx_oldapi::migrate::Migrate

source ·
pub trait Migrate {
    // Required methods
    fn ensure_migrations_table(
        &mut self
    ) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_, Global>>;
    fn dirty_version(
        &mut self
    ) -> Pin<Box<dyn Future<Output = Result<Option<i64>, MigrateError>> + Send + '_, Global>>;
    fn version(
        &mut self
    ) -> Pin<Box<dyn Future<Output = Result<Option<(i64, bool)>, MigrateError>> + Send + '_, Global>>;
    fn validate<'e, 'm>(
        &'e mut self,
        migration: &'m Migration
    ) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + 'm, Global>>
       where 'e: 'm;
    fn list_applied_migrations(
        &mut self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration, Global>, MigrateError>> + Send + '_, Global>>;
    fn lock(
        &mut self
    ) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_, Global>>;
    fn unlock(
        &mut self
    ) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_, Global>>;
    fn apply<'e, 'm>(
        &'e mut self,
        migration: &'m Migration
    ) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + Send + 'm, Global>>
       where 'e: 'm;
    fn revert<'e, 'm>(
        &'e mut self,
        migration: &'m Migration
    ) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + Send + 'm, Global>>
       where 'e: 'm;
}

Required Methods§

source

fn ensure_migrations_table( &mut self ) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_, Global>>

source

fn dirty_version( &mut self ) -> Pin<Box<dyn Future<Output = Result<Option<i64>, MigrateError>> + Send + '_, Global>>

source

fn version( &mut self ) -> Pin<Box<dyn Future<Output = Result<Option<(i64, bool)>, MigrateError>> + Send + '_, Global>>

👎Deprecated
source

fn validate<'e, 'm>( &'e mut self, migration: &'m Migration ) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + 'm, Global>>where 'e: 'm,

👎Deprecated
source

fn list_applied_migrations( &mut self ) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration, Global>, MigrateError>> + Send + '_, Global>>

source

fn lock( &mut self ) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_, Global>>

source

fn unlock( &mut self ) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_, Global>>

source

fn apply<'e, 'm>( &'e mut self, migration: &'m Migration ) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + Send + 'm, Global>>where 'e: 'm,

source

fn revert<'e, 'm>( &'e mut self, migration: &'m Migration ) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + Send + 'm, Global>>where 'e: 'm,

Implementors§