This commit is contained in:
Фролов 2021-10-14 17:14:11 +05:00
commit aed661f202
5 changed files with 2739 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace AsbCloudDb.Migrations
{
public partial class Added_DrillFlowChart_OperationCategory_Index : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "id_operation_category",
table: "t_drill_flow_chart",
type: "integer",
nullable: false,
defaultValue: 0,
comment: "Id типа операции");
migrationBuilder.CreateIndex(
name: "IX_t_drill_flow_chart_id_operation_category",
table: "t_drill_flow_chart",
column: "id_operation_category");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_t_drill_flow_chart_id_operation_category",
table: "t_drill_flow_chart");
migrationBuilder.DropColumn(
name: "id_operation_category",
table: "t_drill_flow_chart");
}
}
}

View File

@ -199,6 +199,11 @@ namespace AsbCloudDb.Migrations
.HasColumnName("well_id") .HasColumnName("well_id")
.HasComment("Id скважины"); .HasComment("Id скважины");
b.Property<int>("IdWellOperationCategory")
.HasColumnType("integer")
.HasColumnName("id_operation_category")
.HasComment("Id типа операции");
b.Property<DateTime>("LastUpdate") b.Property<DateTime>("LastUpdate")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp without time zone")
.HasColumnName("last_update") .HasColumnName("last_update")
@ -238,6 +243,8 @@ namespace AsbCloudDb.Migrations
b.HasIndex("IdWell"); b.HasIndex("IdWell");
b.HasIndex("IdWellOperationCategory");
b.ToTable("t_drill_flow_chart"); b.ToTable("t_drill_flow_chart");
b b

View File

@ -219,6 +219,11 @@ namespace AsbCloudDb.Model
.HasConstraintName("t_drill_params_t_well_section_type_id_fk"); .HasConstraintName("t_drill_params_t_well_section_type_id_fk");
}); });
modelBuilder.Entity<DrillFlowChart>(entity =>
{
entity.HasIndex(d => d.IdWellOperationCategory);
});
FillData(modelBuilder); FillData(modelBuilder);
} }

View File

@ -16,6 +16,9 @@ namespace AsbCloudDb.Model
[Column("well_id"), Comment("Id скважины")] [Column("well_id"), Comment("Id скважины")]
public int IdWell { get; set; } public int IdWell { get; set; }
[Column("id_operation_category"), Comment("Id типа операции")]
public int IdWellOperationCategory { get; set; }
[Column("last_update"), Comment("Дата последнего изменения")] [Column("last_update"), Comment("Дата последнего изменения")]
public DateTime LastUpdate { get; set; } public DateTime LastUpdate { get; set; }