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.

A status about a migration will be stored in a db collection with the following document id

Provided Methods

Rollbacks a migration. Since not every migration could be rollbacked and it often happens there is a blank implementation

Implementors