forked from ddrilling/AsbCloudServer
1622 lines
114 KiB
C#
1622 lines
114 KiB
C#
using System;
|
||
using Microsoft.EntityFrameworkCore.Migrations;
|
||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||
|
||
#nullable disable
|
||
|
||
namespace AsbCloudDb.Migrations
|
||
{
|
||
/// <inheritdoc />
|
||
public partial class Add_Tables_ProcessMapOperationsAndFunctions : Migration
|
||
{
|
||
/// <inheritdoc />
|
||
protected override void Up(MigrationBuilder migrationBuilder)
|
||
{
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_functions_shock_test",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
stickslip = table.Column<double>(type: "double precision", nullable: false, comment: "StickSlip"),
|
||
whirl = table.Column<double>(type: "double precision", nullable: false, comment: "Whirl"),
|
||
axial_vibrations = table.Column<double>(type: "double precision", nullable: false, comment: "Осевые вибрации"),
|
||
combined_vibrations = table.Column<double>(type: "double precision", nullable: false, comment: "Комбинированные вибрации"),
|
||
weight_on_bit_min = table.Column<double>(type: "double precision", nullable: false, comment: "Нагрузка минимальная, т"),
|
||
revolution_per_minute_min = table.Column<int>(type: "integer", nullable: false, comment: "Минимальные обороты на ВСП, об/мин."),
|
||
id_autostart_or_warning = table.Column<bool>(type: "boolean", nullable: false, comment: "Автозапуск или Предупреждение"),
|
||
note = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "Примечание"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_functions_shock_test", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_functions_shock_test_t_process_map_functions_~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_functions_shock_test",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_functions_shock_test_t_user_id_author",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_functions_shock_test_t_user_id_editor",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_functions_shock_test_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_functions_shock_test_t_well_section_type_id_w~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "ShockTest");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_functions_anticrash_rotation",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
min_RPM = table.Column<double>(type: "double precision", nullable: false, comment: "Минимальные обороты ВСП, об/мин"),
|
||
min_consumption_starting_flow_rate = table.Column<double>(type: "double precision", nullable: false, comment: "Минимальный расход для запуска оборотов ВСП, л/сек"),
|
||
top_drive_torque_limit_max = table.Column<double>(type: "double precision", nullable: false, comment: "Максимально допустимый момент на ВСП при противоаварийном вращении, кН*м"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_functions_anticrash_rotation", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_anticrash_rotation_t_process_m~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_functions_anticrash_rotation",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_anticrash_rotation_t_user_id_a~",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_anticrash_rotation_t_user_id_e~",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_anticrash_rotation_t_well_id_w~",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_anticrash_rotation_t_well_sect~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Противоаварийное вращение");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_functions_autohold",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
zenit_angle = table.Column<double>(type: "double precision", nullable: false, comment: "Зенитный угол, градусы"),
|
||
note = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "Примечание"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_functions_autohold", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_autohold_t_process_map_plan_fu~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_functions_autohold",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_autohold_t_user_id_author",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_autohold_t_user_id_editor",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_autohold_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_autohold_t_well_section_type_i~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Автоудержание");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_functions_damper",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
stickslip = table.Column<double>(type: "double precision", nullable: false, comment: "StickSlip"),
|
||
note = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "Примечание"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_functions_damper", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_damper_t_process_map_plan_func~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_functions_damper",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_damper_t_user_id_author",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_damper_t_user_id_editor",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_damper_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_damper_t_well_section_type_id_~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Демпфер");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_functions_drilltest",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
weight_on_bit_min = table.Column<double>(type: "double precision", nullable: false, comment: "Нагрузка минимальная, т"),
|
||
number_of_steps_bit = table.Column<int>(type: "integer", nullable: false, comment: "Количество шагов по нагрузке"),
|
||
revolution_per_minute_min = table.Column<int>(type: "integer", nullable: false, comment: "Минимальные обороты на ВСП, об/мин."),
|
||
number_of_steps_rpm = table.Column<int>(type: "integer", nullable: false, comment: "Количество шагов оборотов на ВСП, шт."),
|
||
length_step = table.Column<double>(type: "double precision", nullable: false, comment: "Величина проходки шага, м."),
|
||
id_autostart_or_warning = table.Column<bool>(type: "boolean", nullable: false, comment: "Автозапуск или Предупреждение"),
|
||
note = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "Примечание"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_functions_drilltest", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_drilltest_t_process_map_plan_f~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_functions_drilltest",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_drilltest_t_user_id_author",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_drilltest_t_user_id_editor",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_drilltest_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_drilltest_t_well_section_type_~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Дрилтест");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_functions_jarr_drill_tool",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
zenit_angle = table.Column<double>(type: "double precision", nullable: false, comment: "Зенитный угол, градусы"),
|
||
buckling = table.Column<double>(type: "double precision", nullable: false, comment: "Складывание, м"),
|
||
note = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "Примечание"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_functions_jarr_drill_tool", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_jarr_drill_tool_t_process_map_~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_functions_jarr_drill_tool",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_jarr_drill_tool_t_user_id_auth~",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_jarr_drill_tool_t_user_id_edit~",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_jarr_drill_tool_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_jarr_drill_tool_t_well_section~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Встряхивание бурового инструмента");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_functions_oscillation",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
optimal_oscillation_angle = table.Column<double>(type: "double precision", nullable: false, comment: "Оптимальный угол осцилляции, градусы"),
|
||
RPM_right = table.Column<double>(type: "double precision", nullable: false, comment: "Скорость вправо, об/мин"),
|
||
RPM_left = table.Column<double>(type: "double precision", nullable: false, comment: "Скорость влево, об/мин"),
|
||
torque_limit_right = table.Column<double>(type: "double precision", nullable: false, comment: "Ограничение момента вправо, кН*м"),
|
||
torque_limit_left = table.Column<double>(type: "double precision", nullable: false, comment: "Ограничение момента влево, кН*м"),
|
||
id_mode = table.Column<bool>(type: "boolean", nullable: false, comment: "Режим Авто/Руч"),
|
||
note = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "Примечание"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_functions_oscillation", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_oscillation_t_process_map_plan~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_functions_oscillation",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_oscillation_t_user_id_author",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_oscillation_t_user_id_editor",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_oscillation_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_oscillation_t_well_section_typ~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Осцилляция");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_functions_static_measure",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
signal_waiting_time = table.Column<double>(type: "double precision", nullable: false, comment: "Время ожидания выхода сигнала с ТМС, сек."),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_functions_static_measure", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_static_measure_t_process_map_p~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_functions_static_measure",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_static_measure_t_user_id_author",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_static_measure_t_user_id_editor",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_static_measure_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_static_measure_t_well_section_~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Выход статического замера");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_functions_upgrade_no_load",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
id_decline_socket_column = table.Column<bool>(type: "boolean", nullable: false, comment: "СПУСК ОК Да/Нет"),
|
||
note = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "Примечание"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_functions_upgrade_no_load", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_upgrade_no_load_t_process_map_~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_functions_upgrade_no_load",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_upgrade_no_load_t_user_id_auth~",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_upgrade_no_load_t_user_id_edit~",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_upgrade_no_load_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_functions_upgrade_no_load_t_well_section~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Обновление холостого хода");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_operation_load_capacity",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
time_load_capacity_min = table.Column<double>(type: "double precision", nullable: false, comment: "Время выработки минимальное, сек"),
|
||
differential_pressure_min = table.Column<double>(type: "double precision", nullable: false, comment: "Перепад давления минимальный, атм"),
|
||
weight_on_bit_min = table.Column<double>(type: "double precision", nullable: false, comment: "Нагрузка минимальная, т"),
|
||
note = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "Примечание"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_operation_load_capacity", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_load_capacity_t_process_map_pl~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_operation_load_capacity",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_load_capacity_t_user_id_author",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_load_capacity_t_user_id_editor",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_load_capacity_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_load_capacity_t_well_section_t~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "РТК выработка нагрузки");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_operation_oscillation_angels",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
max_pressure = table.Column<double>(type: "double precision", nullable: false, comment: "Максимальное давление, атм"),
|
||
differential_pressure = table.Column<double>(type: "double precision", nullable: false, comment: "Перепад давления, атм."),
|
||
setpoints_tight = table.Column<double>(type: "double precision", nullable: false, comment: "Уставки, т., затяжка"),
|
||
setpoints_slacking_off = table.Column<double>(type: "double precision", nullable: false, comment: "Уставки, т., посадка"),
|
||
reaming1_rop_up = table.Column<double>(type: "double precision", nullable: false, comment: "Скорость, м/ч., Вверх"),
|
||
reaming1_rop_down = table.Column<double>(type: "double precision", nullable: false, comment: "Скорость, м/ч., Вниз"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_operation_oscillation_angels", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_oscillation_angels_t_process_m~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_operation_oscillation_angels",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_oscillation_angels_t_user_id_a~",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_oscillation_angels_t_user_id_e~",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_oscillation_angels_t_well_id_w~",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_oscillation_angels_t_well_sect~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Определение углов осцилляции");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_operation_positioning_off_the_bottom",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
stop_off_the_bottom = table.Column<double>(type: "double precision", nullable: false, comment: "Остановка над забоем, м"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_operation_positioning_off_the_bottom", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_positioning_off_the_bottom_t_p~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_operation_positioning_off_the_bottom",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_positioning_off_the_bottom_t_u~",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_positioning_off_the_bottom_t_w~",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_positioning_off_the_bottom_t_~1",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_positioning_off_the_bottom_t_~2",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Позиционирование над забоем");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_operation_reaming_rotor",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
max_pressure = table.Column<double>(type: "double precision", nullable: false, comment: "Максимальное давление, атм"),
|
||
differential_pressure = table.Column<double>(type: "double precision", nullable: false, comment: "Перепад давления, атм."),
|
||
setpoints_tight = table.Column<double>(type: "double precision", nullable: false, comment: "Уставки, т., затяжка"),
|
||
setpoints_slacking_off = table.Column<double>(type: "double precision", nullable: false, comment: "Уставки, т., посадка"),
|
||
max_torque = table.Column<double>(type: "double precision", nullable: false, comment: "Максимально допустимый момент, кН*м."),
|
||
reaming1_number_of_repetitions = table.Column<double>(name: "reaming1_number_of_ repetitions", type: "double precision", nullable: false, comment: "Проработка 1, Количество повторений, шт."),
|
||
reaming1_rop_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Скорость, м/ч., Вверх"),
|
||
reaming1_rop_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Скорость, м/ч., Вниз"),
|
||
reaming1_rpm_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Обороты, об/мин., Вверх"),
|
||
reaming1_rpm_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Обороты, об/мин., Вниз"),
|
||
reaming1_flow_rate_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Расход, л/с., Вверх"),
|
||
reaming1_flow_rate_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Расход, л/с., Вниз"),
|
||
reaming1_interval = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Интервал проработки, м."),
|
||
reaming1_stop_point_off_bottom = table.Column<double>(type: "double precision", nullable: false, comment: "Остановка над забоем, м."),
|
||
reaming2_number_of_repetitions = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Количество повторений, шт."),
|
||
reaming2_rop_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Скорость, м/ч., Вверх"),
|
||
reaming2_rop_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Скорость, м/ч., Вниз"),
|
||
reaming2_rpm_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Обороты, об/мин., Вверх"),
|
||
reaming2_rpm_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Обороты, об/мин., Вниз"),
|
||
reaming2_flow_rate_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Расход, л/с., Вверх"),
|
||
reaming2_flow_rate_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Расход, л/с., Вниз"),
|
||
reaming2_interval = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Интервал проработки, м."),
|
||
reaming2_stop_point_off_bottom = table.Column<double>(type: "double precision", nullable: false, comment: "Остановка над забоем, м."),
|
||
reaming3_number_of_repetitions = table.Column<double>(name: "reaming3_number_of_ repetitions", type: "double precision", nullable: false, comment: "Проработка 3, Количество повторений, шт."),
|
||
reaming3_rop_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Скорость, м/ч., Вверх"),
|
||
reaming3_rop_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Скорость, м/ч., Вниз"),
|
||
reaming3_rpm_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Обороты, об/мин., Вверх"),
|
||
reaming3_rpm_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Обороты, об/мин., Вниз"),
|
||
reaming3_flow_rate_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Расход, л/с., Вверх"),
|
||
reaming3_flow_rate_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Расход, л/с., Вниз"),
|
||
reaming3_interval = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Интервал проработки, м."),
|
||
reaming3_stop_point_off_bottom = table.Column<double>(type: "double precision", nullable: false, comment: "Остановка над забоем, м."),
|
||
note = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "Примечание"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_operation_reaming_rotor", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_reaming_rotor_t_process_map_pl~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_operation_reaming_rotor",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_reaming_rotor_t_user_id_author",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_reaming_rotor_t_user_id_editor",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_reaming_rotor_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_reaming_rotor_t_well_section_t~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "РТК проработка ротор");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_operation_reaming_slide",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
max_pressure = table.Column<double>(type: "double precision", nullable: false, comment: "Максимальное давление, атм"),
|
||
differential_pressure = table.Column<double>(type: "double precision", nullable: false, comment: "Перепад давления, атм."),
|
||
setpoints_tight = table.Column<double>(type: "double precision", nullable: false, comment: "Уставки, т., затяжка"),
|
||
setpoints_slacking_off = table.Column<double>(type: "double precision", nullable: false, comment: "Уставки, т., посадка"),
|
||
max_torque = table.Column<double>(type: "double precision", nullable: false, comment: "Максимально допустимый момент, кН*м."),
|
||
reaming1_number_of_repetitions = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Количество повторений, шт."),
|
||
reaming1_rop_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Скорость, м/ч., Вверх"),
|
||
reaming1_rop_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Скорость, м/ч., Вниз"),
|
||
reaming1_rpm_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Обороты, об/мин., Вверх"),
|
||
reaming1_rpm_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Обороты, об/мин., Вниз"),
|
||
reaming1_flow_rate_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Расход, л/с., Вверх"),
|
||
reaming1_flow_rate_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Расход, л/с., Вниз"),
|
||
reaming1_interval = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Интервал проработки, м."),
|
||
reaming1_stop_point_off_bottom = table.Column<double>(type: "double precision", nullable: false, comment: "Остановка над забоем, м."),
|
||
reaming2_number_of_repetitions = table.Column<double>(name: "reaming2_number_of_ repetitions", type: "double precision", nullable: false, comment: "Проработка 2, Количество повторений, шт."),
|
||
reaming2_rop_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Скорость, м/ч., Вверх"),
|
||
reaming2_rop_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Скорость, м/ч., Вниз"),
|
||
reaming2_rpm_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Обороты, об/мин., Вверх"),
|
||
reaming2_rpm_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Обороты, об/мин., Вниз"),
|
||
reaming2_flow_rate_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Расход, л/с., Вверх"),
|
||
reaming2_flow_rate_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Расход, л/с., Вниз"),
|
||
reaming2_interval = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 2, Интервал проработки, м."),
|
||
reaming2_stop_point_off_bottom = table.Column<double>(type: "double precision", nullable: false, comment: "Остановка над забоем, м."),
|
||
reaming3_number_of_repetitions = table.Column<double>(name: "reaming3_number_of_ repetitions", type: "double precision", nullable: false, comment: "Проработка 3, Количество повторений, шт."),
|
||
reaming3_rop_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Скорость, м/ч., Вверх"),
|
||
reaming3_rop_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Скорость, м/ч., Вниз"),
|
||
reaming3_rpm_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Обороты, об/мин., Вверх"),
|
||
reaming3_rpm_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Обороты, об/мин., Вниз"),
|
||
reaming3_flow_rate_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Расход, л/с., Вверх"),
|
||
reaming3_flow_rate_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Расход, л/с., Вниз"),
|
||
reaming3_interval = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 3, Интервал проработки, м."),
|
||
reaming3_stop_point_off_bottom = table.Column<double>(type: "double precision", nullable: false, comment: "Остановка над забоем, м."),
|
||
note = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "Примечание"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_operation_reaming_slide", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_reaming_slide_t_process_map_pl~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_operation_reaming_slide",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_reaming_slide_t_user_id_author",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_reaming_slide_t_user_id_editor",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_reaming_slide_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_reaming_slide_t_well_section_t~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "РТК проработка слайд");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_operation_switch_mode",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
exit_time_consumption = table.Column<double>(type: "double precision", nullable: false, comment: "Выход на плановый расход, время выхода буровых насосов на плановый расход, сек."),
|
||
consumption_flow_rate = table.Column<double>(type: "double precision", nullable: false, comment: "Выход на плановый расход, расход, л/с"),
|
||
pressure_limit_Max = table.Column<double>(type: "double precision", nullable: false, comment: "Максимально допустимое давление, атм."),
|
||
сomment = table.Column<double>(type: "double precision", nullable: false, comment: "Комментарий"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_operation_switch_mode", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_switch_mode_t_process_map_plan~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_operation_switch_mode",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_switch_mode_t_user_id_author",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_switch_mode_t_user_id_editor",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_switch_mode_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_switch_mode_t_well_section_typ~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Выход на режим");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_operation_switch_pump",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
duration = table.Column<double>(type: "double precision", nullable: false, comment: "Продолжительность, сек."),
|
||
residual_pressure_limit = table.Column<double>(type: "double precision", nullable: false, comment: "Лимит остаточного давления, атм."),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_operation_switch_pump", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_switch_pump_t_process_map_plan~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_operation_switch_pump",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_switch_pump_t_user_id_author",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_switch_pump_t_user_id_editor",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_switch_pump_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_switch_pump_t_well_section_typ~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Выключение насоса");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_operation_tf_orientation",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
plan_tf = table.Column<double>(type: "double precision", nullable: false, comment: "План TF, град"),
|
||
spring = table.Column<double>(type: "double precision", nullable: false, comment: "Пружина, град "),
|
||
max_pressure = table.Column<double>(type: "double precision", nullable: false, comment: "Максимальное давление, атм"),
|
||
differential_pressure = table.Column<double>(type: "double precision", nullable: false, comment: "Перепад давления, атм."),
|
||
setpoints_tight = table.Column<double>(type: "double precision", nullable: false, comment: "Уставки, т., затяжка"),
|
||
setpoints_slacking_off = table.Column<double>(type: "double precision", nullable: false, comment: "Уставки, т., посадка"),
|
||
max_torque = table.Column<double>(type: "double precision", nullable: false, comment: "Максимально допустимый момент, кН*м."),
|
||
reaming1_number_of_repetitions = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Количество расхаживаний, шт"),
|
||
reaming1_rop_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Скорость, м/ч., Вверх"),
|
||
reaming1_rop_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Скорость, м/ч., Вниз"),
|
||
reaming1_flow_rate_up = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Расход, л/с., Вверх"),
|
||
reaming1_flow_rate_down = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Расход, л/с., Вниз"),
|
||
reaming1_interval = table.Column<double>(type: "double precision", nullable: false, comment: "Проработка 1, Интервал расхаживания, м."),
|
||
reaming1_stop_point_off_bottom = table.Column<double>(type: "double precision", nullable: false, comment: "Остановка над забоем, м."),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_operation_tf_orientation", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_tf_orientation_t_process_map_p~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_operation_tf_orientation",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_tf_orientation_t_user_id_author",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_tf_orientation_t_user_id_editor",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_tf_orientation_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_operation_tf_orientation_t_well_section_~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Выставление");
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "t_process_map_plan_survey",
|
||
columns: table => new
|
||
{
|
||
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
|
||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||
measurement_recording_time = table.Column<double>(type: "double precision", nullable: false, comment: "Время записи замера, сек"),
|
||
id_author = table.Column<int>(type: "integer", nullable: false, comment: "Автор"),
|
||
id_editor = table.Column<int>(type: "integer", nullable: true, comment: "Редактор"),
|
||
creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "дата создания"),
|
||
obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true, comment: "дата устаревания"),
|
||
id_state = table.Column<int>(type: "integer", nullable: false, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_previous = table.Column<int>(type: "integer", nullable: true, comment: "ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"),
|
||
id_well = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Тип секции"),
|
||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу от, м"),
|
||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина по стволу до, м")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_t_process_map_plan_survey", x => x.id);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_survey_t_process_map_plan_survey_id_prev~",
|
||
column: x => x.id_previous,
|
||
principalTable: "t_process_map_plan_survey",
|
||
principalColumn: "id");
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_survey_t_user_id_author",
|
||
column: x => x.id_author,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_survey_t_user_id_editor",
|
||
column: x => x.id_editor,
|
||
principalTable: "t_user",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Restrict);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_survey_t_well_id_well",
|
||
column: x => x.id_well,
|
||
principalTable: "t_well",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
table.ForeignKey(
|
||
name: "FK_t_process_map_plan_survey_t_well_section_type_id_wellsectio~",
|
||
column: x => x.id_wellsection_type,
|
||
principalTable: "t_well_section_type",
|
||
principalColumn: "id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
},
|
||
comment: "Запись статического замера");
|
||
|
||
migrationBuilder.UpdateData(
|
||
table: "t_well_operation_category",
|
||
keyColumn: "id",
|
||
keyValue: 5002,
|
||
column: "IsHidden",
|
||
value: true);
|
||
|
||
migrationBuilder.UpdateData(
|
||
table: "t_well_operation_category",
|
||
keyColumn: "id",
|
||
keyValue: 5003,
|
||
column: "IsHidden",
|
||
value: true);
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_functions_shock_test_id_author",
|
||
table: "t_process_map_functions_shock_test",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_functions_shock_test_id_editor",
|
||
table: "t_process_map_functions_shock_test",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_functions_shock_test_id_previous",
|
||
table: "t_process_map_functions_shock_test",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_functions_shock_test_id_well",
|
||
table: "t_process_map_functions_shock_test",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_functions_shock_test_id_wellsection_type",
|
||
table: "t_process_map_functions_shock_test",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_anticrash_rotation_id_author",
|
||
table: "t_process_map_plan_functions_anticrash_rotation",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_anticrash_rotation_id_editor",
|
||
table: "t_process_map_plan_functions_anticrash_rotation",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_anticrash_rotation_id_previous",
|
||
table: "t_process_map_plan_functions_anticrash_rotation",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_anticrash_rotation_id_well",
|
||
table: "t_process_map_plan_functions_anticrash_rotation",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_anticrash_rotation_id_wellsect~",
|
||
table: "t_process_map_plan_functions_anticrash_rotation",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_autohold_id_author",
|
||
table: "t_process_map_plan_functions_autohold",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_autohold_id_editor",
|
||
table: "t_process_map_plan_functions_autohold",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_autohold_id_previous",
|
||
table: "t_process_map_plan_functions_autohold",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_autohold_id_well",
|
||
table: "t_process_map_plan_functions_autohold",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_autohold_id_wellsection_type",
|
||
table: "t_process_map_plan_functions_autohold",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_damper_id_author",
|
||
table: "t_process_map_plan_functions_damper",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_damper_id_editor",
|
||
table: "t_process_map_plan_functions_damper",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_damper_id_previous",
|
||
table: "t_process_map_plan_functions_damper",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_damper_id_well",
|
||
table: "t_process_map_plan_functions_damper",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_damper_id_wellsection_type",
|
||
table: "t_process_map_plan_functions_damper",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_drilltest_id_author",
|
||
table: "t_process_map_plan_functions_drilltest",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_drilltest_id_editor",
|
||
table: "t_process_map_plan_functions_drilltest",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_drilltest_id_previous",
|
||
table: "t_process_map_plan_functions_drilltest",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_drilltest_id_well",
|
||
table: "t_process_map_plan_functions_drilltest",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_drilltest_id_wellsection_type",
|
||
table: "t_process_map_plan_functions_drilltest",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_jarr_drill_tool_id_author",
|
||
table: "t_process_map_plan_functions_jarr_drill_tool",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_jarr_drill_tool_id_editor",
|
||
table: "t_process_map_plan_functions_jarr_drill_tool",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_jarr_drill_tool_id_previous",
|
||
table: "t_process_map_plan_functions_jarr_drill_tool",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_jarr_drill_tool_id_well",
|
||
table: "t_process_map_plan_functions_jarr_drill_tool",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_jarr_drill_tool_id_wellsection~",
|
||
table: "t_process_map_plan_functions_jarr_drill_tool",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_oscillation_id_author",
|
||
table: "t_process_map_plan_functions_oscillation",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_oscillation_id_editor",
|
||
table: "t_process_map_plan_functions_oscillation",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_oscillation_id_previous",
|
||
table: "t_process_map_plan_functions_oscillation",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_oscillation_id_well",
|
||
table: "t_process_map_plan_functions_oscillation",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_oscillation_id_wellsection_type",
|
||
table: "t_process_map_plan_functions_oscillation",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_static_measure_id_author",
|
||
table: "t_process_map_plan_functions_static_measure",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_static_measure_id_editor",
|
||
table: "t_process_map_plan_functions_static_measure",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_static_measure_id_previous",
|
||
table: "t_process_map_plan_functions_static_measure",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_static_measure_id_well",
|
||
table: "t_process_map_plan_functions_static_measure",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_static_measure_id_wellsection_~",
|
||
table: "t_process_map_plan_functions_static_measure",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_upgrade_no_load_id_author",
|
||
table: "t_process_map_plan_functions_upgrade_no_load",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_upgrade_no_load_id_editor",
|
||
table: "t_process_map_plan_functions_upgrade_no_load",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_upgrade_no_load_id_previous",
|
||
table: "t_process_map_plan_functions_upgrade_no_load",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_upgrade_no_load_id_well",
|
||
table: "t_process_map_plan_functions_upgrade_no_load",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_functions_upgrade_no_load_id_wellsection~",
|
||
table: "t_process_map_plan_functions_upgrade_no_load",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_load_capacity_id_author",
|
||
table: "t_process_map_plan_operation_load_capacity",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_load_capacity_id_editor",
|
||
table: "t_process_map_plan_operation_load_capacity",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_load_capacity_id_previous",
|
||
table: "t_process_map_plan_operation_load_capacity",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_load_capacity_id_well",
|
||
table: "t_process_map_plan_operation_load_capacity",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_load_capacity_id_wellsection_t~",
|
||
table: "t_process_map_plan_operation_load_capacity",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_oscillation_angels_id_author",
|
||
table: "t_process_map_plan_operation_oscillation_angels",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_oscillation_angels_id_editor",
|
||
table: "t_process_map_plan_operation_oscillation_angels",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_oscillation_angels_id_previous",
|
||
table: "t_process_map_plan_operation_oscillation_angels",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_oscillation_angels_id_well",
|
||
table: "t_process_map_plan_operation_oscillation_angels",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_oscillation_angels_id_wellsect~",
|
||
table: "t_process_map_plan_operation_oscillation_angels",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_positioning_off_the_bottom_id_~",
|
||
table: "t_process_map_plan_operation_positioning_off_the_bottom",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_positioning_off_the_bottom_id~1",
|
||
table: "t_process_map_plan_operation_positioning_off_the_bottom",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_positioning_off_the_bottom_id~2",
|
||
table: "t_process_map_plan_operation_positioning_off_the_bottom",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_positioning_off_the_bottom_id~3",
|
||
table: "t_process_map_plan_operation_positioning_off_the_bottom",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_positioning_off_the_bottom_id~4",
|
||
table: "t_process_map_plan_operation_positioning_off_the_bottom",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_reaming_rotor_id_author",
|
||
table: "t_process_map_plan_operation_reaming_rotor",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_reaming_rotor_id_editor",
|
||
table: "t_process_map_plan_operation_reaming_rotor",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_reaming_rotor_id_previous",
|
||
table: "t_process_map_plan_operation_reaming_rotor",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_reaming_rotor_id_well",
|
||
table: "t_process_map_plan_operation_reaming_rotor",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_reaming_rotor_id_wellsection_t~",
|
||
table: "t_process_map_plan_operation_reaming_rotor",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_reaming_slide_id_author",
|
||
table: "t_process_map_plan_operation_reaming_slide",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_reaming_slide_id_editor",
|
||
table: "t_process_map_plan_operation_reaming_slide",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_reaming_slide_id_previous",
|
||
table: "t_process_map_plan_operation_reaming_slide",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_reaming_slide_id_well",
|
||
table: "t_process_map_plan_operation_reaming_slide",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_reaming_slide_id_wellsection_t~",
|
||
table: "t_process_map_plan_operation_reaming_slide",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_switch_mode_id_author",
|
||
table: "t_process_map_plan_operation_switch_mode",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_switch_mode_id_editor",
|
||
table: "t_process_map_plan_operation_switch_mode",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_switch_mode_id_previous",
|
||
table: "t_process_map_plan_operation_switch_mode",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_switch_mode_id_well",
|
||
table: "t_process_map_plan_operation_switch_mode",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_switch_mode_id_wellsection_type",
|
||
table: "t_process_map_plan_operation_switch_mode",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_switch_pump_id_author",
|
||
table: "t_process_map_plan_operation_switch_pump",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_switch_pump_id_editor",
|
||
table: "t_process_map_plan_operation_switch_pump",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_switch_pump_id_previous",
|
||
table: "t_process_map_plan_operation_switch_pump",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_switch_pump_id_well",
|
||
table: "t_process_map_plan_operation_switch_pump",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_switch_pump_id_wellsection_type",
|
||
table: "t_process_map_plan_operation_switch_pump",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_tf_orientation_id_author",
|
||
table: "t_process_map_plan_operation_tf_orientation",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_tf_orientation_id_editor",
|
||
table: "t_process_map_plan_operation_tf_orientation",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_tf_orientation_id_previous",
|
||
table: "t_process_map_plan_operation_tf_orientation",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_tf_orientation_id_well",
|
||
table: "t_process_map_plan_operation_tf_orientation",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_operation_tf_orientation_id_wellsection_~",
|
||
table: "t_process_map_plan_operation_tf_orientation",
|
||
column: "id_wellsection_type");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_survey_id_author",
|
||
table: "t_process_map_plan_survey",
|
||
column: "id_author");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_survey_id_editor",
|
||
table: "t_process_map_plan_survey",
|
||
column: "id_editor");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_survey_id_previous",
|
||
table: "t_process_map_plan_survey",
|
||
column: "id_previous");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_survey_id_well",
|
||
table: "t_process_map_plan_survey",
|
||
column: "id_well");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_t_process_map_plan_survey_id_wellsection_type",
|
||
table: "t_process_map_plan_survey",
|
||
column: "id_wellsection_type");
|
||
}
|
||
|
||
/// <inheritdoc />
|
||
protected override void Down(MigrationBuilder migrationBuilder)
|
||
{
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_functions_shock_test");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_functions_anticrash_rotation");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_functions_autohold");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_functions_damper");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_functions_drilltest");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_functions_jarr_drill_tool");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_functions_oscillation");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_functions_static_measure");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_functions_upgrade_no_load");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_operation_load_capacity");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_operation_oscillation_angels");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_operation_positioning_off_the_bottom");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_operation_reaming_rotor");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_operation_reaming_slide");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_operation_switch_mode");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_operation_switch_pump");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_operation_tf_orientation");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "t_process_map_plan_survey");
|
||
|
||
migrationBuilder.UpdateData(
|
||
table: "t_well_operation_category",
|
||
keyColumn: "id",
|
||
keyValue: 5002,
|
||
column: "IsHidden",
|
||
value: false);
|
||
|
||
migrationBuilder.UpdateData(
|
||
table: "t_well_operation_category",
|
||
keyColumn: "id",
|
||
keyValue: 5003,
|
||
column: "IsHidden",
|
||
value: false);
|
||
}
|
||
}
|
||
}
|