20240528094815_altrUserByCompanyId.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace MTWorkHR.Infrastructure.Migrations
  4. {
  5. /// <inheritdoc />
  6. public partial class altrUserByCompanyId : Migration
  7. {
  8. /// <inheritdoc />
  9. protected override void Up(MigrationBuilder migrationBuilder)
  10. {
  11. migrationBuilder.AddColumn<long>(
  12. name: "CompanyId",
  13. table: "AspNetUsers",
  14. type: "bigint",
  15. nullable: true);
  16. migrationBuilder.UpdateData(
  17. table: "AspNetUsers",
  18. keyColumn: "Id",
  19. keyValue: "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
  20. column: "CompanyId",
  21. value: null);
  22. migrationBuilder.UpdateData(
  23. table: "AspNetUsers",
  24. keyColumn: "Id",
  25. keyValue: "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
  26. column: "CompanyId",
  27. value: null);
  28. }
  29. /// <inheritdoc />
  30. protected override void Down(MigrationBuilder migrationBuilder)
  31. {
  32. migrationBuilder.DropColumn(
  33. name: "CompanyId",
  34. table: "AspNetUsers");
  35. }
  36. }
  37. }