20240304140346_addStatusConfig.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 addStatusConfig : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.InsertData(
  13. table: "UserTaskStatuses",
  14. columns: new[] { "Id", "NameAr", "NameEn" },
  15. values: new object[,]
  16. {
  17. { 1L, "جديدة", "New" },
  18. { 2L, "قيد العمل", "Under progress" },
  19. { 3L, "أغلقت", "Closed" },
  20. { 4L, "تمت", "Completed" },
  21. { 5L, "مؤجلة", "Delayed" }
  22. });
  23. }
  24. /// <inheritdoc />
  25. protected override void Down(MigrationBuilder migrationBuilder)
  26. {
  27. migrationBuilder.DeleteData(
  28. table: "UserTaskStatuses",
  29. keyColumn: "Id",
  30. keyValue: 1L);
  31. migrationBuilder.DeleteData(
  32. table: "UserTaskStatuses",
  33. keyColumn: "Id",
  34. keyValue: 2L);
  35. migrationBuilder.DeleteData(
  36. table: "UserTaskStatuses",
  37. keyColumn: "Id",
  38. keyValue: 3L);
  39. migrationBuilder.DeleteData(
  40. table: "UserTaskStatuses",
  41. keyColumn: "Id",
  42. keyValue: 4L);
  43. migrationBuilder.DeleteData(
  44. table: "UserTaskStatuses",
  45. keyColumn: "Id",
  46. keyValue: 5L);
  47. }
  48. }
  49. }