pub trait MigrationTrait: MigrationName + Send + Sync {
    // Required method
    fn up<'life0, 'life1, 'async_trait>(
&'life0 self,
manager: &'life1 SchemaManager<'_>
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait
; // Provided method fn down<'life0, 'life1, 'async_trait>(
&'life0 self,
_manager: &'life1 SchemaManager<'_>
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait
{ ... } }
Expand description

The migration definition

Required Methods§

source

fn up<'life0, 'life1, 'async_trait>(
&'life0 self,
manager: &'life1 SchemaManager<'_>
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,

Define actions to perform when applying the migration

Provided Methods§

source

fn down<'life0, 'life1, 'async_trait>(
&'life0 self,
_manager: &'life1 SchemaManager<'_>
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,

Define actions to perform when rolling back the migration

Implementors§