pub trait MigrationManager<DB: Database>: Send + Sync {
// Required methods
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn up<'life0, 'life1, 'async_trait>(
&'life0 self,
migrations: &'life1 [Box<dyn Migration<DB>>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn down<'life0, 'life1, 'async_trait>(
&'life0 self,
migrations: &'life1 [Box<dyn Migration<DB>>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_applied_migrations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MigrationRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn is_applied<'life0, 'async_trait>(
&'life0 self,
version: i64,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn get_migration_table_name(&self) -> &str { ... }
}Required Methods§
Sourcefn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize migration tracking table
Sourcefn up<'life0, 'life1, 'async_trait>(
&'life0 self,
migrations: &'life1 [Box<dyn Migration<DB>>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn up<'life0, 'life1, 'async_trait>(
&'life0 self,
migrations: &'life1 [Box<dyn Migration<DB>>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Apply pending migrations
Sourcefn down<'life0, 'life1, 'async_trait>(
&'life0 self,
migrations: &'life1 [Box<dyn Migration<DB>>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn down<'life0, 'life1, 'async_trait>(
&'life0 self,
migrations: &'life1 [Box<dyn Migration<DB>>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Rollback migrations
Sourcefn get_applied_migrations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MigrationRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_applied_migrations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MigrationRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get list of applied migrations