DD.WellWorkover.Cloud/AsbCloudDb/Migrations/20250113122319_TelemetryDataWellWorkover.cs

54 lines
3.3 KiB
C#
Raw Permalink Normal View History

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: "Пользователь ТКРС"),
bit_depth = table.Column<float>(type: "real", nullable: false, comment: "Глубина инструмента, м "),
block_position = table.Column<float>(type: "real", nullable: false, comment: "Высота крюкоблока, м"),
hook_load = table.Column<float>(type: "real", nullable: false, comment: "Вес на крюке"),
trip_in_out_speed = table.Column<float>(type: "real", nullable: false, comment: "Скорость СПО, м/с"),
trip_tank_volume = table.Column<float>(type: "real", nullable: false, comment: "Объем доливной емкости (ДЕ), м3"),
mud_density = table.Column<float>(type: "real", nullable: false, comment: "Плотность жидкости в ДЕ, г/см3"),
flow_rate = table.Column<float>(type: "real", nullable: false, comment: "Расход доливаемой жидкости, м3/ч"),
well_level = table.Column<float>(type: "real", nullable: false, comment: "Уровень в скважине (по эхолоту), м"),
mud_temperature_in_blow_out_preventor = 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");
}
}
}