pub struct WithMigrationsVec {
pub with_shell_config: Option<WithShellConfig>,
pub with_connection: WithConnection,
pub migrations: Vec<Box<dyn Migration>>,
}
Fields§
§with_shell_config: Option<WithShellConfig>
§with_connection: WithConnection
§migrations: Vec<Box<dyn Migration>>
Implementations§
source§impl WithMigrationsVec
impl WithMigrationsVec
sourcepub async fn up(&self) -> Result<(), MigrationExecution>
pub async fn up(&self) -> Result<(), MigrationExecution>
This function executes all passed migrations in the passed order for migration in migrations createInProgressBson handleIfFailed saveInMongoAsInProgress handleIfResultWasntSaved up createFinishedBson handleIfFailed saveInMongoAsFinished handleIfResultWasntSaved returnIfMigrationUpWithFailedResultWithAllNextSavedAsFail
pub async fn down(&self) -> Result<(), MigrationExecution>
sourcepub async fn up_single_from_vec(
&self,
migration_id: String
) -> Result<(), MigrationExecution>
pub async fn up_single_from_vec(
&self,
migration_id: String
) -> Result<(), MigrationExecution>
Tries to up a migration from the passed before vec
sourcepub async fn down_single_from_vec(
&self,
migration_id: String
) -> Result<(), MigrationExecution>
pub async fn down_single_from_vec(
&self,
migration_id: String
) -> Result<(), MigrationExecution>
Tries do rollback a migration from the bassed before vec