20250121093040_altrAdminRole2.cs 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. #pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
  4. namespace MTWorkHR.Infrastructure.Migrations
  5. {
  6. /// <inheritdoc />
  7. public partial class altrAdminRole2 : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.DeleteData(
  13. table: "RolePermissions",
  14. keyColumn: "Id",
  15. keyValue: 17L);
  16. migrationBuilder.DeleteData(
  17. table: "RolePermissions",
  18. keyColumn: "Id",
  19. keyValue: 18L);
  20. migrationBuilder.DeleteData(
  21. table: "RolePermissions",
  22. keyColumn: "Id",
  23. keyValue: 19L);
  24. migrationBuilder.DeleteData(
  25. table: "RolePermissions",
  26. keyColumn: "Id",
  27. keyValue: 20L);
  28. migrationBuilder.DeleteData(
  29. table: "RolePermissions",
  30. keyColumn: "Id",
  31. keyValue: 21L);
  32. migrationBuilder.DeleteData(
  33. table: "RolePermissions",
  34. keyColumn: "Id",
  35. keyValue: 22L);
  36. migrationBuilder.DeleteData(
  37. table: "RolePermissions",
  38. keyColumn: "Id",
  39. keyValue: 31L);
  40. migrationBuilder.DeleteData(
  41. table: "RolePermissions",
  42. keyColumn: "Id",
  43. keyValue: 32L);
  44. migrationBuilder.DeleteData(
  45. table: "RolePermissions",
  46. keyColumn: "Id",
  47. keyValue: 33L);
  48. migrationBuilder.DeleteData(
  49. table: "RolePermissions",
  50. keyColumn: "Id",
  51. keyValue: 34L);
  52. migrationBuilder.DeleteData(
  53. table: "RolePermissions",
  54. keyColumn: "Id",
  55. keyValue: 65L);
  56. migrationBuilder.DeleteData(
  57. table: "RolePermissions",
  58. keyColumn: "Id",
  59. keyValue: 66L);
  60. migrationBuilder.DeleteData(
  61. table: "RolePermissions",
  62. keyColumn: "Id",
  63. keyValue: 67L);
  64. migrationBuilder.DeleteData(
  65. table: "RolePermissions",
  66. keyColumn: "Id",
  67. keyValue: 68L);
  68. migrationBuilder.DeleteData(
  69. table: "RolePermissions",
  70. keyColumn: "Id",
  71. keyValue: 69L);
  72. migrationBuilder.DeleteData(
  73. table: "RolePermissions",
  74. keyColumn: "Id",
  75. keyValue: 70L);
  76. migrationBuilder.UpdateData(
  77. table: "RolePermissions",
  78. keyColumn: "Id",
  79. keyValue: 43L,
  80. column: "PermissionName",
  81. value: "Company");
  82. migrationBuilder.UpdateData(
  83. table: "RolePermissions",
  84. keyColumn: "Id",
  85. keyValue: 46L,
  86. column: "PermissionName",
  87. value: "User");
  88. }
  89. /// <inheritdoc />
  90. protected override void Down(MigrationBuilder migrationBuilder)
  91. {
  92. migrationBuilder.UpdateData(
  93. table: "RolePermissions",
  94. keyColumn: "Id",
  95. keyValue: 43L,
  96. column: "PermissionName",
  97. value: "Company.GetAll");
  98. migrationBuilder.UpdateData(
  99. table: "RolePermissions",
  100. keyColumn: "Id",
  101. keyValue: 46L,
  102. column: "PermissionName",
  103. value: "User.GetAll");
  104. migrationBuilder.InsertData(
  105. table: "RolePermissions",
  106. columns: new[] { "Id", "PermissionId", "PermissionName", "RoleId" },
  107. values: new object[,]
  108. {
  109. { 17L, 17L, "Company", "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E" },
  110. { 18L, 18L, "Company.Create", "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E" },
  111. { 19L, 19L, "Company.Update", "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E" },
  112. { 20L, 22L, "User", "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E" },
  113. { 21L, 23L, "User.Create", "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E" },
  114. { 22L, 24L, "User.Update", "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E" },
  115. { 31L, 35L, "Contract", "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E" },
  116. { 32L, 36L, "Contract.Create", "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E" },
  117. { 33L, 37L, "Contract.Update", "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E" },
  118. { 34L, 38L, "Contract.Delete", "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E" },
  119. { 65L, 17L, "Company", "CO5B3B92-2311-48F8-9DEC-F9FAEF1F211R" },
  120. { 66L, 18L, "Company.Create", "CO5B3B92-2311-48F8-9DEC-F9FAEF1F211R" },
  121. { 67L, 19L, "Company.Update", "CO5B3B92-2311-48F8-9DEC-F9FAEF1F211R" },
  122. { 68L, 22L, "User", "CO5B3B92-2311-48F8-9DEC-F9FAEF1F211R" },
  123. { 69L, 23L, "User.Create", "CO5B3B92-2311-48F8-9DEC-F9FAEF1F211R" },
  124. { 70L, 24L, "User.Update", "CO5B3B92-2311-48F8-9DEC-F9FAEF1F211R" }
  125. });
  126. }
  127. }
  128. }