201907150816214_Init.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. namespace EVCB_OCPP.Domain.ConnectionLogContextMigrations
  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.MachineConnectionLog",
  11. c => new
  12. {
  13. Id = c.Long(nullable: false, identity: true),
  14. ChargePointSerialNumber = c.String(maxLength: 25),
  15. IpPort = c.String(maxLength: 30),
  16. ClientIpPort = c.String(maxLength: 30),
  17. MessageType = c.String(maxLength: 50),
  18. Data = c.String(maxLength: 4000),
  19. Msg = c.String(),
  20. CreatedOn = c.DateTime(nullable: false),
  21. })
  22. .PrimaryKey(t => t.Id);
  23. }
  24. public override void Down()
  25. {
  26. DropTable("dbo.MachineConnectionLog");
  27. }
  28. }
  29. }