This commit is contained in:
luosheng
2023-02-13 12:49:10 +08:00
parent eb794b85c1
commit 06847a2426
53 changed files with 706 additions and 439 deletions

View File

@@ -0,0 +1,50 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Modbus.Net.Modbus.Test.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "DatabaseWrites",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Value1 = table.Column<double>(type: "double", nullable: true),
Value2 = table.Column<double>(type: "double", nullable: true),
Value3 = table.Column<double>(type: "double", nullable: true),
Value4 = table.Column<double>(type: "double", nullable: true),
Value5 = table.Column<double>(type: "double", nullable: true),
Value6 = table.Column<double>(type: "double", nullable: true),
Value7 = table.Column<double>(type: "double", nullable: true),
Value8 = table.Column<double>(type: "double", nullable: true),
Value9 = table.Column<double>(type: "double", nullable: true),
Value10 = table.Column<double>(type: "double", nullable: true),
UpdateTime = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DatabaseWrites", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "DatabaseWrites");
}
}
}