20240730134009_altrTaskHistory.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace MTWorkHR.Infrastructure.Migrations
  4. {
  5. /// <inheritdoc />
  6. public partial class altrTaskHistory : Migration
  7. {
  8. /// <inheritdoc />
  9. protected override void Up(MigrationBuilder migrationBuilder)
  10. {
  11. migrationBuilder.DeleteData(
  12. table: "UserTaskStatuses",
  13. keyColumn: "Id",
  14. keyValue: 5L);
  15. migrationBuilder.UpdateData(
  16. table: "UserTaskStatuses",
  17. keyColumn: "Id",
  18. keyValue: 1L,
  19. column: "NameEn",
  20. value: "To Do");
  21. migrationBuilder.UpdateData(
  22. table: "UserTaskStatuses",
  23. keyColumn: "Id",
  24. keyValue: 2L,
  25. column: "NameEn",
  26. value: "In progress");
  27. migrationBuilder.UpdateData(
  28. table: "UserTaskStatuses",
  29. keyColumn: "Id",
  30. keyValue: 3L,
  31. columns: new[] { "NameAr", "NameEn" },
  32. values: new object[] { "تحتاج مراجعة", "Need Review" });
  33. migrationBuilder.UpdateData(
  34. table: "UserTaskStatuses",
  35. keyColumn: "Id",
  36. keyValue: 4L,
  37. column: "NameEn",
  38. value: "Done");
  39. }
  40. /// <inheritdoc />
  41. protected override void Down(MigrationBuilder migrationBuilder)
  42. {
  43. migrationBuilder.UpdateData(
  44. table: "UserTaskStatuses",
  45. keyColumn: "Id",
  46. keyValue: 1L,
  47. column: "NameEn",
  48. value: "New");
  49. migrationBuilder.UpdateData(
  50. table: "UserTaskStatuses",
  51. keyColumn: "Id",
  52. keyValue: 2L,
  53. column: "NameEn",
  54. value: "Under progress");
  55. migrationBuilder.UpdateData(
  56. table: "UserTaskStatuses",
  57. keyColumn: "Id",
  58. keyValue: 3L,
  59. columns: new[] { "NameAr", "NameEn" },
  60. values: new object[] { "أغلقت", "Closed" });
  61. migrationBuilder.UpdateData(
  62. table: "UserTaskStatuses",
  63. keyColumn: "Id",
  64. keyValue: 4L,
  65. column: "NameEn",
  66. value: "Completed");
  67. migrationBuilder.InsertData(
  68. table: "UserTaskStatuses",
  69. columns: new[] { "Id", "NameAr", "NameEn" },
  70. values: new object[] { 5L, "مؤجلة", "Delayed" });
  71. }
  72. }
  73. }