Trait mongodb_migrator::migration::Migration
source · [−]pub trait Migration: Sync {
fn up<'life0, 'async_trait>(
&'life0 self,
env: Env
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_id(&self) -> &str;
fn down<'life0, 'async_trait>(
&'life0 self,
_env: Env
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
}
Required Methods
Runs a migration.