diff --git a/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs b/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs index c4adc76..d00f482 100644 --- a/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs +++ b/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs @@ -30,8 +30,6 @@ namespace DatabaseCore modelBuilder.Entity().HasIndex(s => s.RoleName).IsUnique(); - modelBuilder.Entity().HasIndex(s => s.UserName).IsUnique(); - modelBuilder.Entity().HasIndex(s => s.EmployeePostName).IsUnique(); modelBuilder.Entity().HasIndex(p => new { p.FirstName, p.LastName, p.Patronymic }).IsUnique(); diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/20210403054350_AddEmployee.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/20210403054350_AddEmployee.cs index 6687b27..aa40870 100644 --- a/DepartmentPortal/Common/DatabaseCore/Migrations/20210403054350_AddEmployee.cs +++ b/DepartmentPortal/Common/DatabaseCore/Migrations/20210403054350_AddEmployee.cs @@ -102,7 +102,6 @@ namespace DatabaseCore.Migrations name: "IX_Users_UserName", table: "Users", column: "UserName", - unique: true, filter: "[UserName] IS NOT NULL"); migrationBuilder.CreateIndex( diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/DatabaseContextModelSnapshot.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/DatabaseContextModelSnapshot.cs index a5e420b..c603ee5 100644 --- a/DepartmentPortal/Common/DatabaseCore/Migrations/DatabaseContextModelSnapshot.cs +++ b/DepartmentPortal/Common/DatabaseCore/Migrations/DatabaseContextModelSnapshot.cs @@ -266,7 +266,6 @@ namespace DatabaseCore.Migrations b.HasKey("Id"); b.HasIndex("UserName") - .IsUnique() .HasFilter("[UserName] IS NOT NULL"); b.ToTable("Users");