You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.6 KiB
46 lines
1.6 KiB
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace realm_cli.Migrations
|
|
{
|
|
public partial class AddEcuModel : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "ecus",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<long>(type: "INTEGER", nullable: false)
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
Name = table.Column<string>(type: "TEXT", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ecus", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "lv_states",
|
|
columns: table => new
|
|
{
|
|
ItemId = table.Column<int>(type: "INTEGER", nullable: false)
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
EcuId = table.Column<ushort>(type: "INTEGER", nullable: false),
|
|
Value = table.Column<float>(type: "REAL", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_lv_states", x => x.ItemId);
|
|
});
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "ecus");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "lv_states");
|
|
}
|
|
}
|
|
}
|
|
|