pub trait Migrate {
// Required methods
fn create_schema_if_not_exists<'e>(
&'e mut self,
schema_name: &'e str,
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + 'e>>;
fn ensure_migrations_table<'e>(
&'e mut self,
table_name: &'e str,
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + 'e>>;
fn dirty_version<'e>(
&'e mut self,
table_name: &'e str,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>, MigrateError>> + Send + 'e>>;
fn list_applied_migrations<'e>(
&'e mut self,
table_name: &'e str,
) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration>, MigrateError>> + Send + 'e>>;
fn lock(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_>>;
fn unlock(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_>>;
fn apply<'e>(
&'e mut self,
table_name: &'e str,
migration: &'e Migration,
) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + Send + 'e>>;
fn revert<'e>(
&'e mut self,
table_name: &'e str,
migration: &'e Migration,
) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + Send + 'e>>;
}Required Methods§
Sourcefn create_schema_if_not_exists<'e>(
&'e mut self,
schema_name: &'e str,
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + 'e>>
fn create_schema_if_not_exists<'e>( &'e mut self, schema_name: &'e str, ) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + 'e>>
Create a database schema with the given name if it does not already exist.