d45892b279
- redis su cluster - DB su cluster - RIfatta migration x considerazione su cluster
79 lines
3.3 KiB
C#
79 lines
3.3 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace MagMan.Data.Tenant.Migrations
|
|
{
|
|
public partial class AddDailyStat : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "DayStat",
|
|
columns: table => new
|
|
{
|
|
DayId = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
MachineID = table.Column<int>(type: "int", nullable: false),
|
|
DtRif = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
OreDis = table.Column<double>(type: "double", nullable: false),
|
|
OreLav = table.Column<double>(type: "double", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_DayStat", x => x.DayId);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "MachGroupList",
|
|
columns: table => new
|
|
{
|
|
DbId = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
MachGroupId = table.Column<int>(type: "int", nullable: false),
|
|
ProjDbId = table.Column<int>(type: "int", nullable: false),
|
|
DtStart = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
DtEnd = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_MachGroupList", x => x.DbId);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "PartList",
|
|
columns: table => new
|
|
{
|
|
DbId = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
PartId = table.Column<int>(type: "int", nullable: false),
|
|
MachGroupId = table.Column<int>(type: "int", nullable: false),
|
|
ProjDbId = table.Column<int>(type: "int", nullable: false),
|
|
DtStart = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
DtEnd = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_PartList", x => x.DbId);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "DayStat");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "MachGroupList");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "PartList");
|
|
}
|
|
}
|
|
}
|