201907150814558_Init.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. namespace EVCB_OCPP.Domain.MeterValueDBContextMigrations
  2. {
  3. using System;
  4. using System.Data.Entity.Migrations;
  5. public partial class Init : DbMigration
  6. {
  7. public override void Up()
  8. {
  9. CreateTable(
  10. "dbo.ConnectorMeterValueRecord",
  11. c => new
  12. {
  13. Id = c.Long(nullable: false, identity: true),
  14. ChargePointSerialNumber = c.String(maxLength: 25),
  15. ConnectorId = c.Byte(nullable: false),
  16. Context = c.String(maxLength: 25),
  17. Format = c.String(maxLength: 10),
  18. Measurand = c.String(maxLength: 25),
  19. Phase = c.String(maxLength: 25),
  20. Location = c.String(maxLength: 10),
  21. Value = c.String(maxLength: 10),
  22. Unit = c.String(maxLength: 10),
  23. CreatedOn = c.DateTime(nullable: false),
  24. })
  25. .PrimaryKey(t => t.Id);
  26. }
  27. public override void Down()
  28. {
  29. DropTable("dbo.ConnectorMeterValueRecord");
  30. }
  31. }
  32. }