индекс у пользователя не уникален

This commit is contained in:
kotcheshir73 2021-04-03 10:56:44 +04:00
parent e990f0ba5f
commit cc4d0ddb70
3 changed files with 0 additions and 4 deletions

View File

@ -30,8 +30,6 @@ namespace DatabaseCore
modelBuilder.Entity<Role>().HasIndex(s => s.RoleName).IsUnique();
modelBuilder.Entity<User>().HasIndex(s => s.UserName).IsUnique();
modelBuilder.Entity<EmployeePost>().HasIndex(s => s.EmployeePostName).IsUnique();
modelBuilder.Entity<Employee>().HasIndex(p => new { p.FirstName, p.LastName, p.Patronymic }).IsUnique();

View File

@ -102,7 +102,6 @@ namespace DatabaseCore.Migrations
name: "IX_Users_UserName",
table: "Users",
column: "UserName",
unique: true,
filter: "[UserName] IS NOT NULL");
migrationBuilder.CreateIndex(

View File

@ -266,7 +266,6 @@ namespace DatabaseCore.Migrations
b.HasKey("Id");
b.HasIndex("UserName")
.IsUnique()
.HasFilter("[UserName] IS NOT NULL");
b.ToTable("Users");