20240519114008_addQualif_Univ.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 addQualif_Univ : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.InsertData(
  13. table: "Qualifications",
  14. columns: new[] { "Id", "NameAr", "NameEn" },
  15. values: new object[,]
  16. {
  17. { 1L, "بكالوريوس", "BSC" },
  18. { 2L, "درجة الماجيستير", "Master" },
  19. { 3L, "درحة الدكتوراه", "Doctor" }
  20. });
  21. migrationBuilder.InsertData(
  22. table: "Universities",
  23. columns: new[] { "Id", "NameAr", "NameEn" },
  24. values: new object[,]
  25. {
  26. { 1L, "جامعة الملك فهد", "Fahd Univ" },
  27. { 2L, "جامعة الرياض", "Riydh Univ" },
  28. { 3L, "جامعة جدة", "Geda Univ" }
  29. });
  30. }
  31. /// <inheritdoc />
  32. protected override void Down(MigrationBuilder migrationBuilder)
  33. {
  34. migrationBuilder.DeleteData(
  35. table: "Qualifications",
  36. keyColumn: "Id",
  37. keyValue: 1L);
  38. migrationBuilder.DeleteData(
  39. table: "Qualifications",
  40. keyColumn: "Id",
  41. keyValue: 2L);
  42. migrationBuilder.DeleteData(
  43. table: "Qualifications",
  44. keyColumn: "Id",
  45. keyValue: 3L);
  46. migrationBuilder.DeleteData(
  47. table: "Universities",
  48. keyColumn: "Id",
  49. keyValue: 1L);
  50. migrationBuilder.DeleteData(
  51. table: "Universities",
  52. keyColumn: "Id",
  53. keyValue: 2L);
  54. migrationBuilder.DeleteData(
  55. table: "Universities",
  56. keyColumn: "Id",
  57. keyValue: 3L);
  58. }
  59. }
  60. }