From fa5d54d925c2b048a3e45f0529bb4f6aa27e483f Mon Sep 17 00:00:00 2001 From: Arthur Vickers Date: Tue, 14 Feb 2023 18:53:23 +0000 Subject: [PATCH] Fix test break due to conflicting merge. --- .../Migrations/ModelSnapshotSqlServerTest.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/EFCore.Design.Tests/Migrations/ModelSnapshotSqlServerTest.cs b/test/EFCore.Design.Tests/Migrations/ModelSnapshotSqlServerTest.cs index 1e91b989766..88000e03c32 100644 --- a/test/EFCore.Design.Tests/Migrations/ModelSnapshotSqlServerTest.cs +++ b/test/EFCore.Design.Tests/Migrations/ModelSnapshotSqlServerTest.cs @@ -802,7 +802,9 @@ partial class Snapshot : ModelSnapshot protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("Relational:MaxIdentifierLength", 128); + modelBuilder + .HasDefaultSchema("DefaultSchema") + .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); @@ -820,7 +822,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("PetsId"); - b.ToTable("HumanPet"); + b.ToTable("HumanPet", "DefaultSchema"); }); modelBuilder.Entity("Microsoft.EntityFrameworkCore.Migrations.ModelSnapshotSqlServerTest+Animal", b => @@ -828,7 +830,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int") - .HasDefaultValueSql("NEXT VALUE FOR [AnimalSequence]"); + .HasDefaultValueSql("NEXT VALUE FOR [DefaultSchema].[AnimalSequence]"); SqlServerPropertyBuilderExtensions.UseSequence(b.Property("Id")); @@ -851,7 +853,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("FavoriteAnimalId"); - b.ToTable("Human"); + b.ToTable("Human", "DefaultSchema"); }); modelBuilder.Entity("Microsoft.EntityFrameworkCore.Migrations.ModelSnapshotSqlServerTest+Pet", b => @@ -871,7 +873,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("EducationLevel") .HasColumnType("nvarchar(max)"); - b.ToTable("Cat"); + b.ToTable("Cat", "DefaultSchema"); }); modelBuilder.Entity("Microsoft.EntityFrameworkCore.Migrations.ModelSnapshotSqlServerTest+Dog", b => @@ -881,7 +883,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("FavoriteToy") .HasColumnType("nvarchar(max)"); - b.ToTable("Dog"); + b.ToTable("Dog", "DefaultSchema"); }); modelBuilder.Entity("HumanPet", b => @@ -915,7 +917,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) """, model => { - Assert.Equal(5, model.GetAnnotations().Count()); + Assert.Equal(6, model.GetAnnotations().Count()); Assert.Equal(6, model.GetEntityTypes().Count()); var animalType = model.FindEntityType("Microsoft.EntityFrameworkCore.Migrations.ModelSnapshotSqlServerTest+Animal");