pub trait Migration<X>where
X: Executor,{
// Required methods
fn name(&self) -> &'static str;
fn up<'a>(
&'a self,
db: &'a X,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'a>>;
}Expand description
One migration step. The unique name orders + dedupes it; up performs the
change against an executor. Implement this on a struct for bespoke DDL, or
use Migrator::create_table for the common “create this entity’s table”.
Required Methods§
fn name(&self) -> &'static str
fn up<'a>( &'a self, db: &'a X, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'a>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".