20231019091245_InitialCreate.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace EVCB_OCPP.Domain.Migrations.MeterValueDB
  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: "ConnectorMeterValueRecord",
  14. columns: table => new
  15. {
  16. Id = table.Column<long>(type: "bigint", nullable: false),
  17. ConnectorId = table.Column<byte>(type: "tinyint", nullable: false),
  18. Value = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
  19. CreatedOn = table.Column<DateTime>(type: "smalldatetime", nullable: false),
  20. ContextId = table.Column<int>(type: "int", nullable: false),
  21. FormatId = table.Column<int>(type: "int", nullable: false),
  22. MeasurandId = table.Column<int>(type: "int", nullable: false),
  23. PhaseId = table.Column<int>(type: "int", nullable: false),
  24. LocationId = table.Column<int>(type: "int", nullable: false),
  25. UnitId = table.Column<int>(type: "int", nullable: false),
  26. ChargeBoxId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
  27. TransactionId = table.Column<int>(type: "int", nullable: false)
  28. },
  29. constraints: table =>
  30. {
  31. });
  32. }
  33. /// <inheritdoc />
  34. protected override void Down(MigrationBuilder migrationBuilder)
  35. {
  36. migrationBuilder.DropTable(
  37. name: "ConnectorMeterValueRecord");
  38. }
  39. }
  40. }