20241008101202_addHubConnection.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace MTWorkHR.Infrastructure.Migrations
  5. {
  6. /// <inheritdoc />
  7. public partial class addHubConnection : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.CreateTable(
  13. name: "HubConnections",
  14. columns: table => new
  15. {
  16. Id = table.Column<long>(type: "bigint", nullable: false)
  17. .Annotation("SqlServer:Identity", "1, 1"),
  18. UserId = table.Column<string>(type: "nvarchar(max)", nullable: true),
  19. UserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
  20. SignalrId = table.Column<string>(type: "nvarchar(max)", nullable: true),
  21. TimeStamp = table.Column<DateTime>(type: "datetime2", nullable: false)
  22. },
  23. constraints: table =>
  24. {
  25. table.PrimaryKey("PK_HubConnections", x => x.Id);
  26. });
  27. }
  28. /// <inheritdoc />
  29. protected override void Down(MigrationBuilder migrationBuilder)
  30. {
  31. migrationBuilder.DropTable(
  32. name: "HubConnections");
  33. }
  34. }
  35. }