forked from ddrilling/AsbCloudServer
54 lines
3.3 KiB
C#
54 lines
3.3 KiB
C#
|
using System;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace AsbCloudDb.Migrations
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
public partial class TelemetryDataWellWorkover : Migration
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "t_telemetry_data_well_workover",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
id_telemetry = table.Column<int>(type: "integer", nullable: false),
|
|||
|
date = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "'2021-10-19 18:23:54+05'"),
|
|||
|
id_user = table.Column<int>(type: "integer", nullable: true, comment: "Пользователь ТКРС"),
|
|||
|
tool_depth = table.Column<float>(type: "real", nullable: false, comment: "Глубина инструмента, м "),
|
|||
|
hook_block_depth = table.Column<float>(type: "real", nullable: false, comment: "Высота крюкоблока, м"),
|
|||
|
hook_weight = table.Column<float>(type: "real", nullable: false, comment: "Вес на крюке"),
|
|||
|
up_and_down_operations_speed = table.Column<float>(type: "real", nullable: false, comment: "Скорость СПО, м/с"),
|
|||
|
slagging_tank_volume = table.Column<float>(type: "real", nullable: false, comment: "Объем доливной емкости (ДЕ), м3"),
|
|||
|
liquid_density = table.Column<float>(type: "real", nullable: false, comment: "Плотность жидкости в ДЕ, г/см3"),
|
|||
|
liquid_rate = table.Column<float>(type: "real", nullable: false, comment: "Расход доливаемой жидкости, м3/ч"),
|
|||
|
well_level = table.Column<float>(type: "real", nullable: false, comment: "Уровень в скважине (по эхолоту), м"),
|
|||
|
liquid_branch_brace_temperature = table.Column<float>(type: "real", nullable: false, comment: "Температура жидкости в отводе крестовины ПВО, С"),
|
|||
|
gas_indications_CH4 = table.Column<float>(type: "real", nullable: false, comment: "Газопоказания (СН4), %"),
|
|||
|
gas_indications_H2S = table.Column<float>(type: "real", nullable: false, comment: "Газопоказания (Н2S), %")
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_t_telemetry_data_well_workover", x => new { x.id_telemetry, x.date });
|
|||
|
table.ForeignKey(
|
|||
|
name: "t_telemetry_data_well_workover_t_telemetry_id_fk",
|
|||
|
column: x => x.id_telemetry,
|
|||
|
principalTable: "t_telemetry",
|
|||
|
principalColumn: "id",
|
|||
|
onDelete: ReferentialAction.Cascade);
|
|||
|
},
|
|||
|
comment: "набор основных данных для ТКРС");
|
|||
|
}
|
|||
|
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "t_telemetry_data_well_workover");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|