DD.WellWorkover.Cloud/AsbCloudDb/Migrations/20220918172453_Change_Subsystems_Data.cs

87 lines
3.2 KiB
C#
Raw Normal View History

2022-09-18 22:30:18 +05:00
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class Change_Subsystems_Data : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 3);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 4);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 5);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 6);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 7);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 11);
migrationBuilder.UpdateData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 1,
columns: new[] { "description", "name" },
values: new object[] { "Совместная работа режимов \"Бурение в роторе\" и \"Бурение в слайде\"", "АКБ" });
migrationBuilder.UpdateData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 2,
columns: new[] { "description", "name" },
values: new object[] { "Алгоритм поиска оптимальных параметров бурения САУБ", "MSE" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 1,
columns: new[] { "description", "name" },
values: new object[] { "Ручной", "Ручной" });
migrationBuilder.UpdateData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 2,
columns: new[] { "description", "name" },
values: new object[] { "Бурение в роторе", "Бурение в роторе" });
migrationBuilder.InsertData(
table: "t_subsystem",
columns: new[] { "id", "description", "name" },
values: new object[,]
{
{ 3, "Проработка", "Проработка" },
{ 4, "Бурение в слайде", "Бурение в слайде" },
{ 5, "Спуск СПО", "Спуск СПО" },
{ 6, "Подъем СПО", "Подъем СПО" },
{ 7, "Подъем с проработкой", "Подъем с проработкой" },
{ 11, "Блокировка", "Блокировка" }
});
}
}
}