Quellcode durchsuchen

user altr configuration

zinab_elgendy vor 8 Monaten
Ursprung
Commit
ebdb77b67f

+ 1 - 1
MTWorkHR.API/appsettings.json

@@ -6,7 +6,7 @@
     }
   },
   "ConnectionStrings": {
-    "MTWorkHRConnectionString": "Server=localhost;Database=MTWorkHRDataBase;User=sa;Password=p@ssw0rd;MultipleActiveResultSets=true;Integrated Security=True;Encrypt=False"
+    "MTWorkHRConnectionString": "Server=localhost;Database=MTWorkHRDB;User=sa;Password=p@ssw0rd;MultipleActiveResultSets=true;Integrated Security=True;Encrypt=False"
     // "HRIdentityDB": "Server=localhost;Database=HRIdentityDB;User=sa;Password=p@ssw0rd;MultipleActiveResultSets=true"
     //Data Source=.;Initial Catalog=CBQ_VIVR;Integrated Security=True;Encrypt=False
   },

+ 1 - 1
MTWorkHR.Application/Services/DbMigrationService.cs

@@ -19,7 +19,7 @@ public class DbMigrationService : IHostedService
         using (var scope = sp.CreateScope())
         {
             var identityContext = scope.ServiceProvider.GetRequiredService<HRDataContext>();
-            await identityContext.Database.EnsureCreatedAsync(cancellationToken);
+           // await identityContext.Database.EnsureCreatedAsync(cancellationToken);
             await identityContext.Database.MigrateAsync(cancellationToken);
 
         }

+ 2 - 2
MTWorkHR.Infrastructure/Configurations/UserConfiguration.cs

@@ -36,7 +36,7 @@ namespace MTWorkHR.Infrastructure.Configurations
                     SecurityStamp = "49bb16c3-4704-4c60-908d-dc8506950acc",
                     PassportNumber = "1234567",
                     TaxNumber = 111,
-                    IncomeTaxValue = 1,QualificationId = 1,
+                    IncomeTaxValue = 1,QualificationId = null,
                     PasswordHash = "AQAAAAIAAYagAAAAEPg+ASbciPFxtyxQq8Wx5ilBUQ0RbAoITXXkOQm1PzC5BzySX0sn/wUmOjBKPDGV9w==" //hasher.HashPassword(null, "P@ssword1")
                 },
                 new ApplicationUser
@@ -61,7 +61,7 @@ namespace MTWorkHR.Infrastructure.Configurations
                     PassportNumber = "7654321001010",
                     TaxNumber = 222,
                     IncomeTaxValue = 100,
-                    QualificationId = 1,
+                    QualificationId = null,
                     PasswordHash = "AQAAAAIAAYagAAAAEI3QJkcZjCH4Y8Db4rEgL8Mmll5oCvYcWiXZjQSN9bGW4SMcjHe3ZPMnkN/l9DmJeQ=="// hasher.HashPassword(null, "P@ssword1")
                 }) ;
         }

+ 2 - 4
MTWorkHR.Infrastructure/Migrations/20240414154330_altrUserRelations.Designer.cs

@@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 namespace MTWorkHR.Infrastructure.Migrations
 {
     [DbContext(typeof(HRDataContext))]
-    [Migration("20240414154330_altrUserRelations")]
-    partial class altrUserRelations
+    [Migration("20240507163614_altrUserRelation")]
+    partial class altrUserRelation
     {
         /// <inheritdoc />
         protected override void BuildTargetModel(ModelBuilder modelBuilder)
@@ -2283,7 +2283,6 @@ namespace MTWorkHR.Infrastructure.Migrations
                             PasswordHash = "AQAAAAIAAYagAAAAEPg+ASbciPFxtyxQq8Wx5ilBUQ0RbAoITXXkOQm1PzC5BzySX0sn/wUmOjBKPDGV9w==",
                             PhoneNumber = "1234567890",
                             PhoneNumberConfirmed = true,
-                            QualificationId = 1L,
                             SecurityStamp = "49bb16c3-4704-4c60-908d-dc8506950acc",
                             TaxNumber = 111m,
                             TwoFactorEnabled = false,
@@ -2309,7 +2308,6 @@ namespace MTWorkHR.Infrastructure.Migrations
                             PasswordHash = "AQAAAAIAAYagAAAAEI3QJkcZjCH4Y8Db4rEgL8Mmll5oCvYcWiXZjQSN9bGW4SMcjHe3ZPMnkN/l9DmJeQ==",
                             PhoneNumber = "1234567890",
                             PhoneNumberConfirmed = true,
-                            QualificationId = 1L,
                             SecurityStamp = "62549056-1b9d-46d4-84f8-adea3e4d8b68",
                             TaxNumber = 222m,
                             TwoFactorEnabled = false,

+ 3 - 3
MTWorkHR.Infrastructure/Migrations/20240414154330_altrUserRelations.cs

@@ -5,7 +5,7 @@
 namespace MTWorkHR.Infrastructure.Migrations
 {
     /// <inheritdoc />
-    public partial class altrUserRelations : Migration
+    public partial class altrUserRelation : Migration
     {
         /// <inheritdoc />
         protected override void Up(MigrationBuilder migrationBuilder)
@@ -60,14 +60,14 @@ namespace MTWorkHR.Infrastructure.Migrations
                 keyColumn: "Id",
                 keyValue: "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
                 columns: new[] { "CountryId", "IndustryId", "JobTitleId", "QualificationId", "UniversityId" },
-                values: new object[] { null, null, null, 1L, null });
+                values: new object[] { null, null, null, null, null });
 
             migrationBuilder.UpdateData(
                 table: "AspNetUsers",
                 keyColumn: "Id",
                 keyValue: "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
                 columns: new[] { "CountryId", "IndustryId", "JobTitleId", "QualificationId", "UniversityId" },
-                values: new object[] { null, null, null, 1L, null });
+                values: new object[] { null, null, null, null, null });
 
             migrationBuilder.CreateIndex(
                 name: "IX_AspNetUsers_CountryId",

+ 0 - 2
MTWorkHR.Infrastructure/Migrations/HRDataContextModelSnapshot.cs

@@ -2280,7 +2280,6 @@ namespace MTWorkHR.Infrastructure.Migrations
                             PasswordHash = "AQAAAAIAAYagAAAAEPg+ASbciPFxtyxQq8Wx5ilBUQ0RbAoITXXkOQm1PzC5BzySX0sn/wUmOjBKPDGV9w==",
                             PhoneNumber = "1234567890",
                             PhoneNumberConfirmed = true,
-                            QualificationId = 1L,
                             SecurityStamp = "49bb16c3-4704-4c60-908d-dc8506950acc",
                             TaxNumber = 111m,
                             TwoFactorEnabled = false,
@@ -2306,7 +2305,6 @@ namespace MTWorkHR.Infrastructure.Migrations
                             PasswordHash = "AQAAAAIAAYagAAAAEI3QJkcZjCH4Y8Db4rEgL8Mmll5oCvYcWiXZjQSN9bGW4SMcjHe3ZPMnkN/l9DmJeQ==",
                             PhoneNumber = "1234567890",
                             PhoneNumberConfirmed = true,
-                            QualificationId = 1L,
                             SecurityStamp = "62549056-1b9d-46d4-84f8-adea3e4d8b68",
                             TaxNumber = 222m,
                             TwoFactorEnabled = false,