20240124093416_altrIdentity3.cs 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. #pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
  5. namespace MTWorkHR.Identity.Migrations
  6. {
  7. /// <inheritdoc />
  8. public partial class altrIdentity3 : Migration
  9. {
  10. /// <inheritdoc />
  11. protected override void Up(MigrationBuilder migrationBuilder)
  12. {
  13. migrationBuilder.DropTable(
  14. name: "IdentityRole");
  15. migrationBuilder.DeleteData(
  16. table: "AspNetUserRoles",
  17. keyColumns: new[] { "RoleId", "UserId" },
  18. keyValues: new object[] { "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211B", "AD5B3B92-2311-48F8-9DEC-F9FAEF1F21UA" });
  19. migrationBuilder.DeleteData(
  20. table: "AspNetUserRoles",
  21. keyColumns: new[] { "RoleId", "UserId" },
  22. keyValues: new object[] { "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211A", "LL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB" });
  23. migrationBuilder.DeleteData(
  24. table: "AspNetUsers",
  25. keyColumn: "Id",
  26. keyValue: "AD5B3B92-2311-48F8-9DEC-F9FAEF1F21UA");
  27. migrationBuilder.DeleteData(
  28. table: "AspNetUsers",
  29. keyColumn: "Id",
  30. keyValue: "LL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB");
  31. migrationBuilder.InsertData(
  32. table: "AspNetRoles",
  33. columns: new[] { "Id", "ConcurrencyStamp", "CreateDate", "CreateUser", "DeleteUserId", "IsAdmin", "IsDeleted", "Name", "NormalizedName", "UpdateDate", "UpdateUser" },
  34. values: new object[,]
  35. {
  36. { "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211A", null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, true, false, "Admin", "ADMIN", null, null },
  37. { "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E", null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, false, false, "Employee", "EMPLOYEE", null, null }
  38. });
  39. migrationBuilder.InsertData(
  40. table: "AspNetUsers",
  41. columns: new[] { "Id", "AccessFailedCount", "ConcurrencyStamp", "CreateUser", "DeleteUserId", "Email", "EmailConfirmed", "FirstName", "IsDeleted", "IsStopped", "LastName", "LockoutEnabled", "LockoutEnd", "ManagerId", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "SecurityStamp", "TwoFactorEnabled", "UpdateUser", "UserName", "UserType" },
  42. values: new object[,]
  43. {
  44. { "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA", 0, "14e7547f-8984-433b-af19-5321a2471f8e", null, null, "a@b.com", true, "Zinab", false, false, "Elgendy", false, null, null, "A@B.COM", "ADMIN", "AQAAAAIAAYagAAAAEPg+ASbciPFxtyxQq8Wx5ilBUQ0RbAoITXXkOQm1PzC5BzySX0sn/wUmOjBKPDGV9w==", "1234567890", true, "9355e051-c970-4587-a424-ed11b0b4c606", false, null, "Admin", 1 },
  45. { "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB", 0, "fbae36cf-e1c8-4567-852c-636c111ac689", null, null, "ali@b.com", true, "Ali", false, false, "Farok", false, null, null, "ALI@B.COM", "ALI", "AQAAAAIAAYagAAAAEI3QJkcZjCH4Y8Db4rEgL8Mmll5oCvYcWiXZjQSN9bGW4SMcjHe3ZPMnkN/l9DmJeQ==", "1234567890", true, "3df3d0ca-c1ec-44cf-aee0-3f8405634a8f", false, null, "ali", 1 }
  46. });
  47. migrationBuilder.InsertData(
  48. table: "AspNetUserRoles",
  49. columns: new[] { "RoleId", "UserId" },
  50. values: new object[,]
  51. {
  52. { "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211A", "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA" },
  53. { "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E", "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB" }
  54. });
  55. }
  56. /// <inheritdoc />
  57. protected override void Down(MigrationBuilder migrationBuilder)
  58. {
  59. migrationBuilder.DeleteData(
  60. table: "AspNetUserRoles",
  61. keyColumns: new[] { "RoleId", "UserId" },
  62. keyValues: new object[] { "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211A", "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA" });
  63. migrationBuilder.DeleteData(
  64. table: "AspNetUserRoles",
  65. keyColumns: new[] { "RoleId", "UserId" },
  66. keyValues: new object[] { "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E", "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB" });
  67. migrationBuilder.DeleteData(
  68. table: "AspNetRoles",
  69. keyColumn: "Id",
  70. keyValue: "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211A");
  71. migrationBuilder.DeleteData(
  72. table: "AspNetRoles",
  73. keyColumn: "Id",
  74. keyValue: "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E");
  75. migrationBuilder.DeleteData(
  76. table: "AspNetUsers",
  77. keyColumn: "Id",
  78. keyValue: "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA");
  79. migrationBuilder.DeleteData(
  80. table: "AspNetUsers",
  81. keyColumn: "Id",
  82. keyValue: "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB");
  83. migrationBuilder.CreateTable(
  84. name: "IdentityRole",
  85. columns: table => new
  86. {
  87. Id = table.Column<string>(type: "nvarchar(450)", nullable: false),
  88. ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
  89. Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
  90. NormalizedName = table.Column<string>(type: "nvarchar(max)", nullable: true)
  91. },
  92. constraints: table =>
  93. {
  94. table.PrimaryKey("PK_IdentityRole", x => x.Id);
  95. });
  96. migrationBuilder.InsertData(
  97. table: "AspNetUsers",
  98. columns: new[] { "Id", "AccessFailedCount", "ConcurrencyStamp", "CreateUser", "DeleteUserId", "Email", "EmailConfirmed", "FirstName", "IsDeleted", "IsStopped", "LastName", "LockoutEnabled", "LockoutEnd", "ManagerId", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "SecurityStamp", "TwoFactorEnabled", "UpdateUser", "UserName", "UserType" },
  99. values: new object[,]
  100. {
  101. { "AD5B3B92-2311-48F8-9DEC-F9FAEF1F21UA", 0, "9db21270-bc4c-40e0-8db7-21c2a932d26d", null, null, "a@b.com", true, "Zinab", false, false, "Elgendy", false, null, null, "A@B.COM", "ADMIN", "AQAAAAIAAYagAAAAEPg+ASbciPFxtyxQq8Wx5ilBUQ0RbAoITXXkOQm1PzC5BzySX0sn/wUmOjBKPDGV9w==", "1234567890", true, "3e4eb597-09f6-44fb-8bb1-7027cd4a0eda", false, null, "Admin", 1 },
  102. { "LL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB", 0, "32f0f04a-dbd7-4a86-9b4b-63dcf2ad75f7", null, null, "ali@b.com", true, "Ali", false, false, "Farok", false, null, null, "ALI@B.COM", "ALI", "AQAAAAIAAYagAAAAEI3QJkcZjCH4Y8Db4rEgL8Mmll5oCvYcWiXZjQSN9bGW4SMcjHe3ZPMnkN/l9DmJeQ==", "1234567890", true, "7424f406-f7db-4698-bdb3-c7e28214619c", false, null, "ali", 1 }
  103. });
  104. migrationBuilder.InsertData(
  105. table: "IdentityRole",
  106. columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
  107. values: new object[,]
  108. {
  109. { "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211B", null, "Admin", "ADMIN" },
  110. { "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211A", null, "Employee", "EMPLOYEE" }
  111. });
  112. migrationBuilder.InsertData(
  113. table: "AspNetUserRoles",
  114. columns: new[] { "RoleId", "UserId" },
  115. values: new object[,]
  116. {
  117. { "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211B", "AD5B3B92-2311-48F8-9DEC-F9FAEF1F21UA" },
  118. { "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211A", "LL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB" }
  119. });
  120. }
  121. }
  122. }