using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace IoTGateway.DataAccess.Migrations { public partial class rpclog : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "RpcLogs", columns: table => new { ID = table.Column(type: "TEXT", nullable: false), RpcSide = table.Column(type: "INTEGER", nullable: false), StartTime = table.Column(type: "TEXT", nullable: false), DeviceId = table.Column(type: "TEXT", nullable: true), Method = table.Column(type: "TEXT", nullable: true), Params = table.Column(type: "TEXT", nullable: true), EndTime = table.Column(type: "TEXT", nullable: false), IsSuccess = table.Column(type: "INTEGER", nullable: false), Description = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_RpcLogs", x => x.ID); table.ForeignKey( name: "FK_RpcLogs_Devices_DeviceId", column: x => x.DeviceId, principalTable: "Devices", principalColumn: "ID"); }); migrationBuilder.CreateIndex( name: "IX_RpcLogs_DeviceId", table: "RpcLogs", column: "DeviceId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "RpcLogs"); } } }