Trait Migration
Source pub trait Migration<DB: Database>: Send + Sync {
// Required methods
fn version(&self) -> i64;
fn name(&self) -> &str;
fn up<'a, 'async_trait>(
&'a self,
conn: &'a mut <DB as Database>::Connection,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait;
fn down<'a, 'async_trait>(
&'a self,
conn: &'a mut <DB as Database>::Connection,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait;
}
Unique version number for ordering migrations
Human readable name of the migration