React to aspnet/EntityFramework#2902
This commit is contained in:
parent
2fe720604a
commit
8ccfb99624
|
|
@ -88,8 +88,8 @@ namespace Microsoft.AspNet.Diagnostics.Entity
|
||||||
var pendingMigrations = (
|
var pendingMigrations = (
|
||||||
from m in migrationsAssembly.Migrations
|
from m in migrationsAssembly.Migrations
|
||||||
where !appliedMigrations.Any(
|
where !appliedMigrations.Any(
|
||||||
r => string.Equals(r.MigrationId, m.Id, StringComparison.OrdinalIgnoreCase))
|
r => string.Equals(r.MigrationId, m.Key, StringComparison.OrdinalIgnoreCase))
|
||||||
select m.Id)
|
select m.Key)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
var pendingModelChanges = modelDiffer.HasDifferences(migrationsAssembly.ModelSnapshot?.Model, dbContext.Model);
|
var pendingModelChanges = modelDiffer.HasDifferences(migrationsAssembly.ModelSnapshot?.Model, dbContext.Model);
|
||||||
|
|
|
||||||
|
|
@ -41,13 +41,9 @@ namespace Microsoft.AspNet.Diagnostics.Entity.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[DbContext(typeof(BloggingContextWithMigrations))]
|
[DbContext(typeof(BloggingContextWithMigrations))]
|
||||||
|
[Migration("111111111111111_MigrationOne")]
|
||||||
public class MigrationOne : Migration
|
public class MigrationOne : Migration
|
||||||
{
|
{
|
||||||
public override string Id
|
|
||||||
{
|
|
||||||
get { return "111111111111111_MigrationOne"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IModel TargetModel => new BloggingContextWithMigrationsModelSnapshot().Model;
|
public override IModel TargetModel => new BloggingContextWithMigrationsModelSnapshot().Model;
|
||||||
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
|
@ -68,13 +64,9 @@ namespace Microsoft.AspNet.Diagnostics.Entity.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[DbContext(typeof(BloggingContextWithMigrations))]
|
[DbContext(typeof(BloggingContextWithMigrations))]
|
||||||
|
[Migration("222222222222222_MigrationTwo")]
|
||||||
public class MigrationTwo : Migration
|
public class MigrationTwo : Migration
|
||||||
{
|
{
|
||||||
public override string Id
|
|
||||||
{
|
|
||||||
get { return "222222222222222_MigrationTwo"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IModel TargetModel => new BloggingContextWithMigrationsModelSnapshot().Model;
|
public override IModel TargetModel => new BloggingContextWithMigrationsModelSnapshot().Model;
|
||||||
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
|
|
||||||
|
|
@ -23,13 +23,9 @@ namespace Microsoft.AspNet.Diagnostics.Entity.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[DbContext(typeof(BloggingContextWithPendingModelChanges))]
|
[DbContext(typeof(BloggingContextWithPendingModelChanges))]
|
||||||
|
[Migration("111111111111111_MigrationOne")]
|
||||||
public partial class MigrationOne : Migration
|
public partial class MigrationOne : Migration
|
||||||
{
|
{
|
||||||
public override string Id
|
|
||||||
{
|
|
||||||
get { return "111111111111111_MigrationOne"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{ }
|
{ }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,9 @@ namespace Microsoft.AspNet.Diagnostics.Entity.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[DbContext(typeof(BloggingContextWithSnapshotThatThrows))]
|
[DbContext(typeof(BloggingContextWithSnapshotThatThrows))]
|
||||||
|
[Migration("111111111111111_MigrationOne")]
|
||||||
public class MigrationOne : Migration
|
public class MigrationOne : Migration
|
||||||
{
|
{
|
||||||
public override string Id
|
|
||||||
{
|
|
||||||
get { return "111111111111111_MigrationOne"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IModel TargetModel => new BloggingContextWithSnapshotThatThrowsModelSnapshot().Model;
|
public override IModel TargetModel => new BloggingContextWithSnapshotThatThrowsModelSnapshot().Model;
|
||||||
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue