20231019091533_InitialCreate.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace EVCB_OCPP.Domain.Migrations.ConnectionLogDB
  5. {
  6. /// <inheritdoc />
  7. public partial class InitialCreate : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.CreateTable(
  13. name: "MachineConnectionLog",
  14. columns: table => new
  15. {
  16. Id = table.Column<long>(type: "bigint", nullable: false)
  17. .Annotation("SqlServer:Identity", "1, 1"),
  18. CreatedOn = table.Column<DateTime>(type: "datetime", nullable: false),
  19. MessageType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  20. Data = table.Column<string>(type: "nvarchar(3600)", maxLength: 3600, nullable: true),
  21. Msg = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
  22. ChargeBoxId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
  23. IsSent = table.Column<bool>(type: "bit", nullable: false),
  24. EVSEEndPoint = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: true),
  25. Session = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true)
  26. },
  27. constraints: table =>
  28. {
  29. table.PrimaryKey("PK_MachineConnectionLog", x => new { x.Id, x.CreatedOn });
  30. });
  31. }
  32. /// <inheritdoc />
  33. protected override void Down(MigrationBuilder migrationBuilder)
  34. {
  35. migrationBuilder.DropTable(
  36. name: "MachineConnectionLog");
  37. }
  38. }
  39. }