индекс у пользователя не уникален
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<Role>().HasIndex(s => s.RoleName).IsUnique();
|
||||||
|
|
||||||
modelBuilder.Entity<User>().HasIndex(s => s.UserName).IsUnique();
|
|
||||||
|
|
||||||
modelBuilder.Entity<EmployeePost>().HasIndex(s => s.EmployeePostName).IsUnique();
|
modelBuilder.Entity<EmployeePost>().HasIndex(s => s.EmployeePostName).IsUnique();
|
||||||
|
|
||||||
modelBuilder.Entity<Employee>().HasIndex(p => new { p.FirstName, p.LastName, p.Patronymic }).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",
|
name: "IX_Users_UserName",
|
||||||
table: "Users",
|
table: "Users",
|
||||||
column: "UserName",
|
column: "UserName",
|
||||||
unique: true,
|
|
||||||
filter: "[UserName] IS NOT NULL");
|
filter: "[UserName] IS NOT NULL");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
|
@ -266,7 +266,6 @@ namespace DatabaseCore.Migrations
|
|||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("UserName")
|
b.HasIndex("UserName")
|
||||||
.IsUnique()
|
|
||||||
.HasFilter("[UserName] IS NOT NULL");
|
.HasFilter("[UserName] IS NOT NULL");
|
||||||
|
|
||||||
b.ToTable("Users");
|
b.ToTable("Users");
|
||||||
|
Loading…
Reference in New Issue
Block a user