20240304100029_addTeamMeetinglogs.cs 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace MTWorkHR.Infrastructure.Migrations
  5. {
  6. /// <inheritdoc />
  7. public partial class addTeamMeetinglogs : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.CreateTable(
  13. name: "MeetingLogs",
  14. columns: table => new
  15. {
  16. Id = table.Column<long>(type: "bigint", nullable: false)
  17. .Annotation("SqlServer:Identity", "1, 1"),
  18. Method = table.Column<string>(type: "nvarchar(max)", nullable: false),
  19. QueryString = table.Column<string>(type: "nvarchar(max)", nullable: true),
  20. Input = table.Column<string>(type: "nvarchar(max)", nullable: true),
  21. CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
  22. CreateUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
  23. ServerIP = table.Column<string>(type: "nvarchar(max)", nullable: true),
  24. Channel = table.Column<string>(type: "nvarchar(max)", nullable: true),
  25. UserIP = table.Column<string>(type: "nvarchar(max)", nullable: true),
  26. ServiceResponseTimeInSeconds = table.Column<string>(type: "nvarchar(max)", nullable: false),
  27. ErrorCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
  28. ErrorDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
  29. InnerException = table.Column<string>(type: "nvarchar(max)", nullable: true),
  30. userAgent = table.Column<string>(type: "nvarchar(max)", nullable: true)
  31. },
  32. constraints: table =>
  33. {
  34. table.PrimaryKey("PK_MeetingLogs", x => x.Id);
  35. });
  36. migrationBuilder.CreateTable(
  37. name: "TeamLogs",
  38. columns: table => new
  39. {
  40. Id = table.Column<long>(type: "bigint", nullable: false)
  41. .Annotation("SqlServer:Identity", "1, 1"),
  42. Method = table.Column<string>(type: "nvarchar(max)", nullable: false),
  43. QueryString = table.Column<string>(type: "nvarchar(max)", nullable: true),
  44. Input = table.Column<string>(type: "nvarchar(max)", nullable: true),
  45. CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
  46. CreateUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
  47. ServerIP = table.Column<string>(type: "nvarchar(max)", nullable: true),
  48. Channel = table.Column<string>(type: "nvarchar(max)", nullable: true),
  49. UserIP = table.Column<string>(type: "nvarchar(max)", nullable: true),
  50. ServiceResponseTimeInSeconds = table.Column<string>(type: "nvarchar(max)", nullable: false),
  51. ErrorCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
  52. ErrorDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
  53. InnerException = table.Column<string>(type: "nvarchar(max)", nullable: true),
  54. userAgent = table.Column<string>(type: "nvarchar(max)", nullable: true)
  55. },
  56. constraints: table =>
  57. {
  58. table.PrimaryKey("PK_TeamLogs", x => x.Id);
  59. });
  60. }
  61. /// <inheritdoc />
  62. protected override void Down(MigrationBuilder migrationBuilder)
  63. {
  64. migrationBuilder.DropTable(
  65. name: "MeetingLogs");
  66. migrationBuilder.DropTable(
  67. name: "TeamLogs");
  68. }
  69. }
  70. }