Files
gwms/GWMS.Data/Migrations/20210806134012_PlantData_AddLevelReoder.cs
2021-08-06 16:45:33 +02:00

175 lines
5.9 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace GWMS.Data.Migrations
{
public partial class PlantData_AddLevelReoder : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LevelAct",
table: "PlantDetail");
migrationBuilder.DropColumn(
name: "PressAct",
table: "PlantDetail");
migrationBuilder.DropColumn(
name: "PressBHAct",
table: "PlantDetail");
migrationBuilder.DropColumn(
name: "PressBHMax",
table: "PlantDetail");
migrationBuilder.DropColumn(
name: "PressBLAct",
table: "PlantDetail");
migrationBuilder.DropColumn(
name: "PressBLMax",
table: "PlantDetail");
migrationBuilder.RenameColumn(
name: "PressMax",
table: "PlantDetail",
newName: "LevelReorder");
migrationBuilder.UpdateData(
table: "PlantDetail",
keyColumn: "PlantId",
keyValue: 1,
columns: new[] { "LevelMax", "LevelReorder" },
values: new object[] { 26000.0, 15000.0 });
migrationBuilder.UpdateData(
table: "PlantDetail",
keyColumn: "PlantId",
keyValue: 2,
column: "LevelReorder",
value: 15000.0);
migrationBuilder.UpdateData(
table: "PlantDetail",
keyColumn: "PlantId",
keyValue: 3,
column: "LevelReorder",
value: 15000.0);
migrationBuilder.UpdateData(
table: "PlantDetail",
keyColumn: "PlantId",
keyValue: 4,
columns: new[] { "LevelMax", "LevelReorder" },
values: new object[] { 26000.0, 15000.0 });
migrationBuilder.UpdateData(
table: "Transporter",
keyColumn: "TransporterId",
keyValue: 1,
column: "PositionUpdated",
value: new DateTime(2021, 8, 6, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9521));
migrationBuilder.UpdateData(
table: "Transporter",
keyColumn: "TransporterId",
keyValue: 2,
column: "PositionUpdated",
value: new DateTime(2021, 8, 6, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9901));
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "LevelReorder",
table: "PlantDetail",
newName: "PressMax");
migrationBuilder.AddColumn<double>(
name: "LevelAct",
table: "PlantDetail",
type: "double",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "PressAct",
table: "PlantDetail",
type: "double",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "PressBHAct",
table: "PlantDetail",
type: "double",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "PressBHMax",
table: "PlantDetail",
type: "double",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "PressBLAct",
table: "PlantDetail",
type: "double",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "PressBLMax",
table: "PlantDetail",
type: "double",
nullable: false,
defaultValue: 0.0);
migrationBuilder.UpdateData(
table: "PlantDetail",
keyColumn: "PlantId",
keyValue: 1,
columns: new[] { "LevelMax", "PressBHMax", "PressBLMax", "PressMax" },
values: new object[] { 28000.0, 270.0, 270.0, 19.0 });
migrationBuilder.UpdateData(
table: "PlantDetail",
keyColumn: "PlantId",
keyValue: 2,
columns: new[] { "PressBHMax", "PressBLMax", "PressMax" },
values: new object[] { 270.0, 270.0, 19.0 });
migrationBuilder.UpdateData(
table: "PlantDetail",
keyColumn: "PlantId",
keyValue: 3,
columns: new[] { "PressBHMax", "PressBLMax", "PressMax" },
values: new object[] { 270.0, 270.0, 19.0 });
migrationBuilder.UpdateData(
table: "PlantDetail",
keyColumn: "PlantId",
keyValue: 4,
columns: new[] { "LevelMax", "PressBHMax", "PressBLMax", "PressMax" },
values: new object[] { 24000.0, 270.0, 270.0, 19.0 });
migrationBuilder.UpdateData(
table: "Transporter",
keyColumn: "TransporterId",
keyValue: 1,
column: "PositionUpdated",
value: new DateTime(2021, 8, 2, 10, 51, 27, 549, DateTimeKind.Local).AddTicks(3264));
migrationBuilder.UpdateData(
table: "Transporter",
keyColumn: "TransporterId",
keyValue: 2,
column: "PositionUpdated",
value: new DateTime(2021, 8, 2, 10, 51, 27, 549, DateTimeKind.Local).AddTicks(3842));
}
}
}