You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
}
}
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: