Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed version is recorded into the DatabaseVersion collection #20

Open
safor opened this issue Jul 4, 2016 · 0 comments
Open

Failed version is recorded into the DatabaseVersion collection #20

safor opened this issue Jul 4, 2016 · 0 comments

Comments

@safor
Copy link

safor commented Jul 4, 2016

In case of a migration failure, a corresponding version is being recorded into the DatabaseVersion collection. So, next time migrations are being run the failed one is not being executed. Is it a bug or feature?

In an example below the first run will execute the RedMigration and fail, the second run will skip the RedMigration and execute the GreenMigraion.

    public class RedMigration : Migration
    {
        public RedMigration() : base("1.0.0") { }
        public override void Update() {
            throw new System.Exception("Testing migrations rollback");
        }
    }

    public class GreenMigration : Migration
    {
        public GreenMigration() : base("1.0.1") { }
        public override void Update() {
            // empty
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant