forked from ddrilling/AsbCloudServer
61 lines
2.1 KiB
C#
61 lines
2.1 KiB
C#
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|||
|
|
|||
|
namespace AsbCloudDb.Migrations
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
public partial class Add_NewWellOperationCategories : Migration
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.InsertData(
|
|||
|
table: "t_well_operation_category",
|
|||
|
columns: new[] { "id", "id_parent", "key_value_name", "key_value_units", "name" },
|
|||
|
values: new object[,]
|
|||
|
{
|
|||
|
{ 3006, null, "dT", "мин", "Заключительные работы" },
|
|||
|
{ 5113, 4001, "МСП", "м/ч", "Бурение" },
|
|||
|
{ 5114, 4013, "dT", "мин", "ТО оборудования" },
|
|||
|
{ 4019, 3006, "dT", "мин", "Заключительные операции" },
|
|||
|
{ 5115, 4019, "dT", "мин", "Спуск НКТ" }
|
|||
|
});
|
|||
|
|
|||
|
migrationBuilder.Sql
|
|||
|
("UPDATE public.t_well_operation SET id_category=5113 WHERE id_category=5002 OR id_category=5003;");
|
|||
|
}
|
|||
|
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DeleteData(
|
|||
|
table: "t_well_operation_category",
|
|||
|
keyColumn: "id",
|
|||
|
keyValue: 5113);
|
|||
|
|
|||
|
migrationBuilder.DeleteData(
|
|||
|
table: "t_well_operation_category",
|
|||
|
keyColumn: "id",
|
|||
|
keyValue: 5114);
|
|||
|
|
|||
|
migrationBuilder.DeleteData(
|
|||
|
table: "t_well_operation_category",
|
|||
|
keyColumn: "id",
|
|||
|
keyValue: 5115);
|
|||
|
|
|||
|
migrationBuilder.DeleteData(
|
|||
|
table: "t_well_operation_category",
|
|||
|
keyColumn: "id",
|
|||
|
keyValue: 4019);
|
|||
|
|
|||
|
migrationBuilder.DeleteData(
|
|||
|
table: "t_well_operation_category",
|
|||
|
keyColumn: "id",
|
|||
|
keyValue: 3006);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|