From cc4d0ddb7063441e6b12723df30853b550cab50b Mon Sep 17 00:00:00 2001 From: kotcheshir73 Date: Sat, 3 Apr 2021 10:56:44 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=BD=D0=B4=D0=B5=D0=BA=D1=81=20=D1=83?= =?UTF-8?q?=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=BD=D0=B5=20=D1=83=D0=BD=D0=B8=D0=BA=D0=B0?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs | 2 -- .../DatabaseCore/Migrations/20210403054350_AddEmployee.cs | 1 - .../DatabaseCore/Migrations/DatabaseContextModelSnapshot.cs | 1 - 3 files changed, 4 deletions(-) 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");