forked from ddrilling/AsbCloudServer
Rename DrillingParam.Consumption to Flow
This commit is contained in:
parent
eac38b6139
commit
e7a4164eaf
@ -36,10 +36,10 @@ namespace AsbCloudApp.Data
|
||||
|
||||
public double TopDriveSpeedMax { get; set; }
|
||||
|
||||
public double ConsumptionMin { get; set; }
|
||||
public double FlowMin { get; set; }
|
||||
|
||||
public double ConsumptionAvg { get; set; }
|
||||
public double FlowAvg { get; set; }
|
||||
|
||||
public double ConsumptionMax { get; set; }
|
||||
public double FlowMax { get; set; }
|
||||
}
|
||||
}
|
2519
AsbCloudDb/Migrations/20211011111932_Rename_DrillingParam_Consumption_to_Flow.Designer.cs
generated
Normal file
2519
AsbCloudDb/Migrations/20211011111932_Rename_DrillingParam_Consumption_to_Flow.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,111 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class Rename_DrillingParam_Consumption_to_Flow : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "depth_start",
|
||||
table: "t_well_operation",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
comment: "Глубина на начало операции, м",
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision",
|
||||
oldComment: "Глубина забоя на начало операции, м");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "depth_end",
|
||||
table: "t_well_operation",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
comment: "Глубина после завершения операции, м",
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision",
|
||||
oldComment: "Глубина забоя после завершения операции, м");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "t_drill_params",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
well_id = table.Column<int>(type: "integer", nullable: false, comment: "Id скважины"),
|
||||
depth_start = table.Column<double>(type: "double precision", nullable: false, comment: "Стартовая глубина"),
|
||||
depth_end = table.Column<double>(type: "double precision", nullable: false, comment: "Глубина окончания интервала"),
|
||||
id_wellsection_type = table.Column<int>(type: "integer", nullable: false, comment: "Id с типом секции скважины"),
|
||||
axial_load_min = table.Column<double>(type: "double precision", nullable: false, comment: "Минимальная нагрузка"),
|
||||
axial_load_avg = table.Column<double>(type: "double precision", nullable: false, comment: "Средняя нагрузка"),
|
||||
axial_load_max = table.Column<double>(type: "double precision", nullable: false, comment: "Максимальная нагрузка"),
|
||||
pressure_min = table.Column<double>(type: "double precision", nullable: false, comment: "Минимальное давление"),
|
||||
pressure_avg = table.Column<double>(type: "double precision", nullable: false, comment: "Среднее давление"),
|
||||
pressure_max = table.Column<double>(type: "double precision", nullable: false, comment: "Максимальное давление"),
|
||||
top_drive_min = table.Column<double>(type: "double precision", nullable: false, comment: "Минимальный момент на ВСП"),
|
||||
top_drive_avg = table.Column<double>(type: "double precision", nullable: false, comment: "Средний момент на ВСП"),
|
||||
top_drive_max = table.Column<double>(type: "double precision", nullable: false, comment: "Максимальный момент на ВСП"),
|
||||
top_drive_speed_min = table.Column<double>(type: "double precision", nullable: false, comment: "Минимальные обороты на ВСП"),
|
||||
top_drive_speed_avg = table.Column<double>(type: "double precision", nullable: false, comment: "Средние обороты на ВСП"),
|
||||
top_drive_speed_max = table.Column<double>(type: "double precision", nullable: false, comment: "Максимальные обороты на ВСП"),
|
||||
flow_min = table.Column<double>(type: "double precision", nullable: false, comment: "Минимальный расход"),
|
||||
flow_avg = table.Column<double>(type: "double precision", nullable: false, comment: "Средний расход"),
|
||||
flow_max = table.Column<double>(type: "double precision", nullable: false, comment: "Максимальный расход")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_t_drill_params", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_t_drill_params_t_well_well_id",
|
||||
column: x => x.well_id,
|
||||
principalTable: "t_well",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "t_drill_params_t_well_section_type_id_fk",
|
||||
column: x => x.id_wellsection_type,
|
||||
principalTable: "t_well_section_type",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
},
|
||||
comment: "Режим бурения в секции (диапазоны параметров бурения)");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_t_drill_params_id_wellsection_type",
|
||||
table: "t_drill_params",
|
||||
column: "id_wellsection_type");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_t_drill_params_well_id",
|
||||
table: "t_drill_params",
|
||||
column: "well_id");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "t_drill_params");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "depth_start",
|
||||
table: "t_well_operation",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
comment: "Глубина забоя на начало операции, м",
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision",
|
||||
oldComment: "Глубина на начало операции, м");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "depth_end",
|
||||
table: "t_well_operation",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
comment: "Глубина забоя после завершения операции, м",
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision",
|
||||
oldComment: "Глубина после завершения операции, м");
|
||||
}
|
||||
}
|
||||
}
|
@ -156,6 +156,121 @@ namespace AsbCloudDb.Migrations
|
||||
.HasComment("Месторождение");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.DrillParams", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<double>("AxialLoadAvg")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("axial_load_avg")
|
||||
.HasComment("Средняя нагрузка");
|
||||
|
||||
b.Property<double>("AxialLoadMax")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("axial_load_max")
|
||||
.HasComment("Максимальная нагрузка");
|
||||
|
||||
b.Property<double>("AxialLoadMin")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("axial_load_min")
|
||||
.HasComment("Минимальная нагрузка");
|
||||
|
||||
b.Property<double>("DepthEnd")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("depth_end")
|
||||
.HasComment("Глубина окончания интервала");
|
||||
|
||||
b.Property<double>("DepthStart")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("depth_start")
|
||||
.HasComment("Стартовая глубина");
|
||||
|
||||
b.Property<double>("FlowAvg")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("flow_avg")
|
||||
.HasComment("Средний расход");
|
||||
|
||||
b.Property<double>("FlowMax")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("flow_max")
|
||||
.HasComment("Максимальный расход");
|
||||
|
||||
b.Property<double>("FlowMin")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("flow_min")
|
||||
.HasComment("Минимальный расход");
|
||||
|
||||
b.Property<int>("IdWell")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("well_id")
|
||||
.HasComment("Id скважины");
|
||||
|
||||
b.Property<int>("IdWellSectionType")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id_wellsection_type")
|
||||
.HasComment("Id с типом секции скважины");
|
||||
|
||||
b.Property<double>("PressureAvg")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("pressure_avg")
|
||||
.HasComment("Среднее давление");
|
||||
|
||||
b.Property<double>("PressureMax")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("pressure_max")
|
||||
.HasComment("Максимальное давление");
|
||||
|
||||
b.Property<double>("PressureMin")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("pressure_min")
|
||||
.HasComment("Минимальное давление");
|
||||
|
||||
b.Property<double>("TopDriveSpeedAvg")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("top_drive_speed_avg")
|
||||
.HasComment("Средние обороты на ВСП");
|
||||
|
||||
b.Property<double>("TopDriveSpeedMax")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("top_drive_speed_max")
|
||||
.HasComment("Максимальные обороты на ВСП");
|
||||
|
||||
b.Property<double>("TopDriveSpeedMin")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("top_drive_speed_min")
|
||||
.HasComment("Минимальные обороты на ВСП");
|
||||
|
||||
b.Property<double>("TopDriveTorqueAvg")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("top_drive_avg")
|
||||
.HasComment("Средний момент на ВСП");
|
||||
|
||||
b.Property<double>("TopDriveTorqueMax")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("top_drive_max")
|
||||
.HasComment("Максимальный момент на ВСП");
|
||||
|
||||
b.Property<double>("TopDriveTorqueMin")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("top_drive_min")
|
||||
.HasComment("Минимальный момент на ВСП");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("IdWell");
|
||||
|
||||
b.HasIndex("IdWellSectionType");
|
||||
|
||||
b.ToTable("t_drill_params");
|
||||
|
||||
b
|
||||
.HasComment("Режим бурения в секции (диапазоны параметров бурения)");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.FileCategory", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@ -1480,6 +1595,16 @@ namespace AsbCloudDb.Migrations
|
||||
.HasColumnName("date_start")
|
||||
.HasComment("Дата начала операции");
|
||||
|
||||
b.Property<double>("DepthEnd")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("depth_end")
|
||||
.HasComment("Глубина после завершения операции, м");
|
||||
|
||||
b.Property<double>("DepthStart")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("depth_start")
|
||||
.HasComment("Глубина на начало операции, м");
|
||||
|
||||
b.Property<double>("DurationHours")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("duration_hours")
|
||||
@ -1505,28 +1630,18 @@ namespace AsbCloudDb.Migrations
|
||||
.HasColumnName("id_well_section_type")
|
||||
.HasComment("Id тип секции скважины");
|
||||
|
||||
b.Property<double>("WellDepthEnd")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("depth_end")
|
||||
.HasComment("Глубина забоя после завершения операции, м");
|
||||
|
||||
b.Property<double>("WellDepthStart")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("depth_start")
|
||||
.HasComment("Глубина забоя на начало операции, м");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DateStart");
|
||||
|
||||
b.HasIndex("DepthEnd");
|
||||
|
||||
b.HasIndex("IdCategory");
|
||||
|
||||
b.HasIndex("IdWell");
|
||||
|
||||
b.HasIndex("IdWellSectionType");
|
||||
|
||||
b.HasIndex("WellDepthEnd");
|
||||
|
||||
b.ToTable("t_well_operation");
|
||||
|
||||
b
|
||||
@ -2066,6 +2181,26 @@ namespace AsbCloudDb.Migrations
|
||||
b.Navigation("CompanyType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.DrillParams", b =>
|
||||
{
|
||||
b.HasOne("AsbCloudDb.Model.Well", "Well")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdWell")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("AsbCloudDb.Model.WellSectionType", "WellSectionType")
|
||||
.WithMany("DrillParamsCollection")
|
||||
.HasForeignKey("IdWellSectionType")
|
||||
.HasConstraintName("t_drill_params_t_well_section_type_id_fk")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Well");
|
||||
|
||||
b.Navigation("WellSectionType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.FileInfo", b =>
|
||||
{
|
||||
b.HasOne("AsbCloudDb.Model.User", "Author")
|
||||
@ -2367,6 +2502,8 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.WellSectionType", b =>
|
||||
{
|
||||
b.Navigation("DrillParamsCollection");
|
||||
|
||||
b.Navigation("WellOperations");
|
||||
});
|
||||
|
||||
|
@ -60,14 +60,14 @@ namespace AsbCloudDb.Model
|
||||
[Column("top_drive_speed_max"), Comment("Максимальные обороты на ВСП")]
|
||||
public double TopDriveSpeedMax { get; set; }
|
||||
|
||||
[Column("consumption_min"), Comment("Минимальный расход")]
|
||||
public double ConsumptionMin { get; set; }
|
||||
[Column("flow_min"), Comment("Минимальный расход")]
|
||||
public double FlowMin { get; set; }
|
||||
|
||||
[Column("consumption_avg"), Comment("Средний расход")]
|
||||
public double ConsumptionAvg { get; set; }
|
||||
[Column("flow_avg"), Comment("Средний расход")]
|
||||
public double FlowAvg { get; set; }
|
||||
|
||||
[Column("consumption_max"), Comment("Максимальный расход")]
|
||||
public double ConsumptionMax { get; set; }
|
||||
[Column("flow_max"), Comment("Максимальный расход")]
|
||||
public double FlowMax { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey(nameof(IdWell))]
|
||||
|
Loading…
Reference in New Issue
Block a user