Skip to content

When the last migration fails and previous migrations were done in a previous run it also marks all previous migrations as failed too. #1

@shandak

Description

@shandak

I have the next calls

let migrations: Vec<Box<dyn Migration>> = vec![
        Box::new(m0::M0 {}),
        Box::new(m1::M1 {}),
        Box::new(m2::M2 {}),
        Box::new(m3::M3 {}),
        Box::new(m4::M4 {}),
        Box::new(m5::M5 {}),
        Box::new(m6::M6 {}),
    ];
    
    mongodb_migrator::migrator::default::DefaultMigrator::new()
        .with_conn(mongo.db.clone())
        .with_migrations_vec(migrations)
        .up().await?;

When I run with M6 failing it returns the error Migration wasn't completed successfully - M6\n\t due to that, following it migrations: [\"M1\", \"M2\", \"M3\", \"M4\", \"M5\", \"M6\"] weren't executed and after that all mentioned migrations marked as Fail but they were done successfully before.

And by the way, looks like M0 ignored, right? Can it be counted too?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions