20240624143650_altrAttachpath.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace MTWorkHR.Infrastructure.Migrations
  4. {
  5. /// <inheritdoc />
  6. public partial class altrAttachpath : Migration
  7. {
  8. /// <inheritdoc />
  9. protected override void Up(MigrationBuilder migrationBuilder)
  10. {
  11. migrationBuilder.AddColumn<string>(
  12. name: "FilePath",
  13. table: "UserAttachments",
  14. type: "nvarchar(max)",
  15. nullable: true);
  16. migrationBuilder.UpdateData(
  17. table: "AspNetUsers",
  18. keyColumn: "Id",
  19. keyValue: "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
  20. columns: new[] { "CompanyId", "NormalizedUserName", "UserName" },
  21. values: new object[] { 1L, "A@B.COM", "A@b.com" });
  22. migrationBuilder.UpdateData(
  23. table: "AspNetUsers",
  24. keyColumn: "Id",
  25. keyValue: "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
  26. columns: new[] { "CompanyId", "NormalizedUserName", "UserName" },
  27. values: new object[] { 1L, "ALI@B.COM", "Ali@b.com" });
  28. }
  29. /// <inheritdoc />
  30. protected override void Down(MigrationBuilder migrationBuilder)
  31. {
  32. migrationBuilder.DropColumn(
  33. name: "FilePath",
  34. table: "UserAttachments");
  35. migrationBuilder.UpdateData(
  36. table: "AspNetUsers",
  37. keyColumn: "Id",
  38. keyValue: "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
  39. columns: new[] { "CompanyId", "NormalizedUserName", "UserName" },
  40. values: new object[] { null, "ADMIN", "Admin" });
  41. migrationBuilder.UpdateData(
  42. table: "AspNetUsers",
  43. keyColumn: "Id",
  44. keyValue: "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
  45. columns: new[] { "CompanyId", "NormalizedUserName", "UserName" },
  46. values: new object[] { null, "ALI", "ali" });
  47. }
  48. }
  49. }