Trait sqlx::migrate::Migrate

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

Required Methods§

source

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

source

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

source

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

source

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

source

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

source

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

source

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

Implementors§