pub trait Migrate {
// Required methods
fn ensure_migrations_table(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>;
fn dirty_version(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>, Error>> + Send + '_>>;
fn version(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<(i64, bool)>, Error>> + Send + '_>>;
fn validate<'e, 'm>(
&'e mut self,
migration: &'m Migration,
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + 'm>>
where 'e: 'm;
fn list_applied_migrations(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration>, Error>> + Send + '_>>;
fn lock(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>;
fn unlock(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>;
fn apply<'e, 'm>(
&'e mut self,
migration: &'m Migration,
) -> Pin<Box<dyn Future<Output = Result<Duration, Error>> + Send + 'm>>
where 'e: 'm;
fn revert<'e, 'm>(
&'e mut self,
migration: &'m Migration,
) -> Pin<Box<dyn Future<Output = Result<Duration, Error>> + Send + 'm>>
where 'e: 'm;
}
Required Methods§
fn ensure_migrations_table( &mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
fn dirty_version( &mut self, ) -> Pin<Box<dyn Future<Output = Result<Option<i64>, Error>> + Send + '_>>
fn version( &mut self, ) -> Pin<Box<dyn Future<Output = Result<Option<(i64, bool)>, Error>> + Send + '_>>
👎Deprecated
fn validate<'e, 'm>(
&'e mut self,
migration: &'m Migration,
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + 'm>>where
'e: 'm,
👎Deprecated