Trait sea_schema::migration::MigrationTrait
source · [−]pub trait MigrationTrait: MigrationName + Send + Sync {
fn up<'life0, 'life1, 'async_trait>(
&'life0 self,
manager: &'life1 SchemaManager<'_>
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn down<'life0, 'life1, 'async_trait>(
&'life0 self,
manager: &'life1 SchemaManager<'_>
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}
This is supported on crate feature
migration
only.Expand description
The migration definition
Required methods
Define actions to perform when applying the migration