индекс у пользователя не уникален
This commit is contained in:
parent
e990f0ba5f
commit
cc4d0ddb70
@ -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();
|
||||
|
@ -102,7 +102,6 @@ namespace DatabaseCore.Migrations
|
||||
name: "IX_Users_UserName",
|
||||
table: "Users",
|
||||
column: "UserName",
|
||||
unique: true,
|
||||
filter: "[UserName] IS NOT NULL");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
|
@ -266,7 +266,6 @@ namespace DatabaseCore.Migrations
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserName")
|
||||
.IsUnique()
|
||||
.HasFilter("[UserName] IS NOT NULL");
|
||||
|
||||
b.ToTable("Users");
|
||||
|
Loading…
Reference in New Issue
Block a user