forked from ddrilling/AsbCloudServer
new migration
This commit is contained in:
parent
3df7437955
commit
adb9d177bc
7939
AsbCloudDb/Migrations/20230328185054_add_table_WITS_GTR_and_manual_hypertable.Designer.cs
generated
Normal file
7939
AsbCloudDb/Migrations/20230328185054_add_table_WITS_GTR_and_manual_hypertable.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class add_table_WITS_GTR_and_manual_hypertable : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "t_wits_float",
|
||||
columns: table => new
|
||||
{
|
||||
id_telemetry = table.Column<int>(type: "integer", nullable: false),
|
||||
id_record = table.Column<int>(type: "integer", nullable: false),
|
||||
id_item = table.Column<int>(type: "integer", nullable: false),
|
||||
date = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
value = table.Column<float>(type: "real", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_t_wits_float", x => new { x.id_telemetry, x.id_record, x.id_item });
|
||||
table.ForeignKey(
|
||||
name: "FK_t_wits_float_t_telemetry_id_telemetry",
|
||||
column: x => x.id_telemetry,
|
||||
principalTable: "t_telemetry",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
},
|
||||
comment: "таблица данных ГТИ с типом значения float");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "t_wits_int",
|
||||
columns: table => new
|
||||
{
|
||||
id_telemetry = table.Column<int>(type: "integer", nullable: false),
|
||||
id_record = table.Column<int>(type: "integer", nullable: false),
|
||||
id_item = table.Column<int>(type: "integer", nullable: false),
|
||||
date = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
Value = table.Column<long>(type: "bigint", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_t_wits_int", x => new { x.id_telemetry, x.id_record, x.id_item });
|
||||
table.ForeignKey(
|
||||
name: "FK_t_wits_int_t_telemetry_id_telemetry",
|
||||
column: x => x.id_telemetry,
|
||||
principalTable: "t_telemetry",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
},
|
||||
comment: "таблица данных ГТИ с типом значения int16 int32");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "t_wits_string",
|
||||
columns: table => new
|
||||
{
|
||||
id_telemetry = table.Column<int>(type: "integer", nullable: false),
|
||||
id_record = table.Column<int>(type: "integer", nullable: false),
|
||||
id_item = table.Column<int>(type: "integer", nullable: false),
|
||||
date = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
value = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_t_wits_string", x => new { x.id_telemetry, x.id_record, x.id_item });
|
||||
table.ForeignKey(
|
||||
name: "FK_t_wits_string_t_telemetry_id_telemetry",
|
||||
column: x => x.id_telemetry,
|
||||
principalTable: "t_telemetry",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
},
|
||||
comment: "таблица данных ГТИ с типом значения string");
|
||||
|
||||
migrationBuilder.Sql
|
||||
("SELECT create_hypertable('t_wits_string','time','id_telemetry',chunk_time_interval => INTERVAL '5 day'); " +
|
||||
"SELECT create_hypertable('t_wits_float','time','id_telemetry',chunk_time_interval => INTERVAL '5 day'); " +
|
||||
"SELECT create_hypertable('t_wits_int','time','id_telemetry',chunk_time_interval => INTERVAL '5 day'); ");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "t_wits_float");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "t_wits_int");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "t_wits_string");
|
||||
}
|
||||
}
|
||||
}
|
@ -63,7 +63,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdDeposit");
|
||||
|
||||
b.ToTable("t_cluster", (string)null);
|
||||
b.ToTable("t_cluster");
|
||||
|
||||
b.HasComment("Кусты");
|
||||
});
|
||||
@ -93,7 +93,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdCompanyType");
|
||||
|
||||
b.ToTable("t_company", (string)null);
|
||||
b.ToTable("t_company");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
@ -121,7 +121,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("t_company_type", (string)null);
|
||||
b.ToTable("t_company_type");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
@ -162,7 +162,7 @@ namespace AsbCloudDb.Migrations
|
||||
b.HasKey("IdWell", "StartDate")
|
||||
.HasName("t_id_well_date_start_pk");
|
||||
|
||||
b.ToTable("t_daily_report", (string)null);
|
||||
b.ToTable("t_daily_report");
|
||||
|
||||
b.HasComment("Ежедневные отчёты");
|
||||
});
|
||||
@ -198,7 +198,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("t_deposit", (string)null);
|
||||
b.ToTable("t_deposit");
|
||||
|
||||
b.HasComment("Месторождение");
|
||||
});
|
||||
@ -262,7 +262,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdTelemetry");
|
||||
|
||||
b.ToTable("t_detected_operation", (string)null);
|
||||
b.ToTable("t_detected_operation");
|
||||
|
||||
b.HasComment("автоматически определенные операции по телеметрии");
|
||||
});
|
||||
@ -299,7 +299,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("t_driller", (string)null);
|
||||
b.ToTable("t_driller");
|
||||
|
||||
b.HasComment("Бурильщик");
|
||||
});
|
||||
@ -328,7 +328,7 @@ namespace AsbCloudDb.Migrations
|
||||
b.HasIndex("IdWell", "IdFileCategory")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("t_drilling_program_part", (string)null);
|
||||
b.ToTable("t_drilling_program_part");
|
||||
|
||||
b.HasComment("части программ бурения");
|
||||
});
|
||||
@ -355,7 +355,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("t_file_category", (string)null);
|
||||
b.ToTable("t_file_category");
|
||||
|
||||
b.HasComment("Категории файлов");
|
||||
|
||||
@ -745,7 +745,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdWell");
|
||||
|
||||
b.ToTable("t_file_info", (string)null);
|
||||
b.ToTable("t_file_info");
|
||||
|
||||
b.HasComment("Файлы всех категорий");
|
||||
});
|
||||
@ -796,11 +796,99 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdUser");
|
||||
|
||||
b.ToTable("t_file_mark", (string)null);
|
||||
b.ToTable("t_file_mark");
|
||||
|
||||
b.HasComment("Действия с файлами.");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsFloat", b =>
|
||||
{
|
||||
b.Property<int>("IdTelemetry")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id_telemetry");
|
||||
|
||||
b.Property<int>("IdRecord")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id_record");
|
||||
|
||||
b.Property<int>("IdItem")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id_item");
|
||||
|
||||
b.Property<DateTimeOffset>("DateTime")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("date");
|
||||
|
||||
b.Property<float?>("Value")
|
||||
.HasColumnType("real")
|
||||
.HasColumnName("value");
|
||||
|
||||
b.HasKey("IdTelemetry", "IdRecord", "IdItem");
|
||||
|
||||
b.ToTable("t_wits_float");
|
||||
|
||||
b.HasComment("таблица данных ГТИ с типом значения float");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsInt", b =>
|
||||
{
|
||||
b.Property<int>("IdTelemetry")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id_telemetry");
|
||||
|
||||
b.Property<int>("IdRecord")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id_record");
|
||||
|
||||
b.Property<int>("IdItem")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id_item");
|
||||
|
||||
b.Property<DateTimeOffset>("DateTime")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("date");
|
||||
|
||||
b.Property<long?>("Value")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("Value");
|
||||
|
||||
b.HasKey("IdTelemetry", "IdRecord", "IdItem");
|
||||
|
||||
b.ToTable("t_wits_int");
|
||||
|
||||
b.HasComment("таблица данных ГТИ с типом значения int16 int32");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsStr", b =>
|
||||
{
|
||||
b.Property<int>("IdTelemetry")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id_telemetry");
|
||||
|
||||
b.Property<int>("IdRecord")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id_record");
|
||||
|
||||
b.Property<int>("IdItem")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id_item");
|
||||
|
||||
b.Property<DateTimeOffset>("DateTime")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("date");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)")
|
||||
.HasColumnName("value");
|
||||
|
||||
b.HasKey("IdTelemetry", "IdRecord", "IdItem");
|
||||
|
||||
b.ToTable("t_wits_string");
|
||||
|
||||
b.HasComment("таблица данных ГТИ с типом значения string");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.LimitingParameter", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@ -838,7 +926,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdTelemetry");
|
||||
|
||||
b.ToTable("t_limiting_parameter", (string)null);
|
||||
b.ToTable("t_limiting_parameter");
|
||||
|
||||
b.HasComment("Ограничения по параметрам телеметрии");
|
||||
});
|
||||
@ -884,7 +972,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdWell");
|
||||
|
||||
b.ToTable("t_measure", (string)null);
|
||||
b.ToTable("t_measure");
|
||||
|
||||
b.HasComment("Таблица c данными для вкладки 'Последние данные'");
|
||||
});
|
||||
@ -911,7 +999,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("t_measure_category", (string)null);
|
||||
b.ToTable("t_measure_category");
|
||||
|
||||
b.HasComment("Категория последних данных");
|
||||
|
||||
@ -982,7 +1070,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdWell");
|
||||
|
||||
b.ToTable("t_operationvalue", (string)null);
|
||||
b.ToTable("t_operationvalue");
|
||||
|
||||
b.HasComment("Целевые/нормативные показатели операции");
|
||||
});
|
||||
@ -1011,7 +1099,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("t_permission", (string)null);
|
||||
b.ToTable("t_permission");
|
||||
|
||||
b.HasComment("Разрешения на доступ к данным");
|
||||
|
||||
@ -1921,7 +2009,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdWell");
|
||||
|
||||
b.ToTable("t_planned_trajectory", (string)null);
|
||||
b.ToTable("t_planned_trajectory");
|
||||
|
||||
b.HasComment("Загрузка плановой траектории");
|
||||
});
|
||||
@ -2041,7 +2129,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdWellSectionType");
|
||||
|
||||
b.ToTable("t_process_map", (string)null);
|
||||
b.ToTable("t_process_map");
|
||||
|
||||
b.HasComment("Операции по скважине – РТК");
|
||||
});
|
||||
@ -2060,7 +2148,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdWell");
|
||||
|
||||
b.ToTable("t_relation_company_well", (string)null);
|
||||
b.ToTable("t_relation_company_well");
|
||||
|
||||
b.HasComment("отношение скважин и компаний");
|
||||
});
|
||||
@ -2085,7 +2173,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdDrillingProgramPart");
|
||||
|
||||
b.ToTable("t_relation_user_drilling_program_part", (string)null);
|
||||
b.ToTable("t_relation_user_drilling_program_part");
|
||||
|
||||
b.HasComment("Отношение пользователей и частей ПБ");
|
||||
});
|
||||
@ -2104,7 +2192,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdPermission");
|
||||
|
||||
b.ToTable("t_relation_user_role_permission", (string)null);
|
||||
b.ToTable("t_relation_user_role_permission");
|
||||
|
||||
b.HasComment("Отношение ролей пользователей и разрешений доступа");
|
||||
|
||||
@ -3361,7 +3449,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdInclude");
|
||||
|
||||
b.ToTable("t_relation_user_role_user_role", (string)null);
|
||||
b.ToTable("t_relation_user_role_user_role");
|
||||
|
||||
b.HasComment("Отношение ролей к ролям");
|
||||
|
||||
@ -3652,7 +3740,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdUserRole");
|
||||
|
||||
b.ToTable("t_relation_user_user_role", (string)null);
|
||||
b.ToTable("t_relation_user_user_role");
|
||||
|
||||
b.HasComment("Отношение пользователей и ролей");
|
||||
|
||||
@ -3708,7 +3796,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdWell");
|
||||
|
||||
b.ToTable("t_report_property", (string)null);
|
||||
b.ToTable("t_report_property");
|
||||
|
||||
b.HasComment("Отчеты с данными по буровым");
|
||||
});
|
||||
@ -3759,7 +3847,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdWell");
|
||||
|
||||
b.ToTable("t_schedule", (string)null);
|
||||
b.ToTable("t_schedule");
|
||||
|
||||
b.HasComment("График работы бурильщика");
|
||||
});
|
||||
@ -3814,7 +3902,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdWell");
|
||||
|
||||
b.ToTable("t_setpoints_rquest", (string)null);
|
||||
b.ToTable("t_setpoints_rquest");
|
||||
|
||||
b.HasComment("Запросы на изменение уставок панели оператора");
|
||||
});
|
||||
@ -3841,7 +3929,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("t_subsystem", (string)null);
|
||||
b.ToTable("t_subsystem");
|
||||
|
||||
b.HasComment("Описание подсистем");
|
||||
|
||||
@ -3916,7 +4004,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdTelemetry");
|
||||
|
||||
b.ToTable("t_subsystem_operation_time", (string)null);
|
||||
b.ToTable("t_subsystem_operation_time");
|
||||
|
||||
b.HasComment("наработки подсистем");
|
||||
});
|
||||
@ -3952,7 +4040,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex(new[] { "RemoteUid" }, "t_telemetry_remote_uid_index");
|
||||
|
||||
b.ToTable("t_telemetry", (string)null);
|
||||
b.ToTable("t_telemetry");
|
||||
|
||||
b.HasComment("таблица привязки телеметрии от комплектов к конкретной скважине.");
|
||||
});
|
||||
@ -4155,7 +4243,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("IdTelemetry", "DateTime");
|
||||
|
||||
b.ToTable("t_telemetry_data_saub", (string)null);
|
||||
b.ToTable("t_telemetry_data_saub");
|
||||
|
||||
b.HasComment("набор основных данных по SAUB");
|
||||
});
|
||||
@ -4252,7 +4340,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("IdTelemetry", "DateTime");
|
||||
|
||||
b.ToTable("t_telemetry_data_spin", (string)null);
|
||||
b.ToTable("t_telemetry_data_spin");
|
||||
|
||||
b.HasComment("набор основных данных по SpinMaster");
|
||||
});
|
||||
@ -4278,7 +4366,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("IdTelemetry", "IdEvent");
|
||||
|
||||
b.ToTable("t_telemetry_event", (string)null);
|
||||
b.ToTable("t_telemetry_event");
|
||||
|
||||
b.HasComment("Справочник событий. События формируют сообщения. Разделено по версиям посылок от телеметрии.");
|
||||
});
|
||||
@ -4338,7 +4426,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdTelemetry");
|
||||
|
||||
b.ToTable("t_telemetry_message", (string)null);
|
||||
b.ToTable("t_telemetry_message");
|
||||
|
||||
b.HasComment("Сообщения на буровых");
|
||||
});
|
||||
@ -4375,7 +4463,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("IdTelemetry", "IdUser");
|
||||
|
||||
b.ToTable("t_telemetry_user", (string)null);
|
||||
b.ToTable("t_telemetry_user");
|
||||
|
||||
b.HasComment("Пользователи панели САУБ. Для сообщений.");
|
||||
});
|
||||
@ -4417,7 +4505,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("IdTelemetry");
|
||||
|
||||
b.ToTable("t_telemetry_wireline_run_out", (string)null);
|
||||
b.ToTable("t_telemetry_wireline_run_out");
|
||||
|
||||
b.HasComment("Наработка талевого каната");
|
||||
});
|
||||
@ -4497,7 +4585,7 @@ namespace AsbCloudDb.Migrations
|
||||
b.HasIndex("Login")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("t_user", (string)null);
|
||||
b.ToTable("t_user");
|
||||
|
||||
b.HasComment("Пользователи облака");
|
||||
|
||||
@ -4536,7 +4624,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("t_user_role", (string)null);
|
||||
b.ToTable("t_user_role");
|
||||
|
||||
b.HasComment("Роли пользователей в системе");
|
||||
|
||||
@ -4874,7 +4962,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("IdUser", "Key");
|
||||
|
||||
b.ToTable("t_user_settings", (string)null);
|
||||
b.ToTable("t_user_settings");
|
||||
|
||||
b.HasComment("настройки интерфейса пользователя");
|
||||
});
|
||||
@ -4934,7 +5022,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdWellType");
|
||||
|
||||
b.ToTable("t_well", (string)null);
|
||||
b.ToTable("t_well");
|
||||
|
||||
b.HasComment("скважины");
|
||||
});
|
||||
@ -4962,7 +5050,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdWellSrc");
|
||||
|
||||
b.ToTable("t_well_composite", (string)null);
|
||||
b.ToTable("t_well_composite");
|
||||
|
||||
b.HasComment("Композитная скважина");
|
||||
});
|
||||
@ -4988,7 +5076,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdUser");
|
||||
|
||||
b.ToTable("t_well_final_documents", (string)null);
|
||||
b.ToTable("t_well_final_documents");
|
||||
|
||||
b.HasComment("Дело скважины");
|
||||
});
|
||||
@ -5071,7 +5159,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdWellSectionType");
|
||||
|
||||
b.ToTable("t_well_operation", (string)null);
|
||||
b.ToTable("t_well_operation");
|
||||
|
||||
b.HasComment("Данные по операциям на скважине");
|
||||
});
|
||||
@ -5112,7 +5200,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdParent");
|
||||
|
||||
b.ToTable("t_well_operation_category", (string)null);
|
||||
b.ToTable("t_well_operation_category");
|
||||
|
||||
b.HasComment("Справочник операций на скважине");
|
||||
|
||||
@ -6123,7 +6211,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("t_well_section_type", (string)null);
|
||||
b.ToTable("t_well_section_type");
|
||||
|
||||
b.HasComment("конструкция секции скважины");
|
||||
|
||||
@ -6313,7 +6401,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("t_well_type", (string)null);
|
||||
b.ToTable("t_well_type");
|
||||
|
||||
b.HasComment("конструкция скважины");
|
||||
|
||||
@ -6370,7 +6458,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("IdTelemetry", "DateTime");
|
||||
|
||||
b.ToTable("t_telemetry_wits_base", (string)null);
|
||||
b.ToTable("t_telemetry_wits_base");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.WITS.Record1", b =>
|
||||
@ -6534,7 +6622,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("TelemetryId");
|
||||
|
||||
b.ToTable("t_telemetry_wits_1", (string)null);
|
||||
b.ToTable("t_telemetry_wits_1");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.WITS.Record50", b =>
|
||||
@ -6622,7 +6710,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("TelemetryId");
|
||||
|
||||
b.ToTable("t_telemetry_wits_50", (string)null);
|
||||
b.ToTable("t_telemetry_wits_50");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.WITS.Record60", b =>
|
||||
@ -6674,7 +6762,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("TelemetryId");
|
||||
|
||||
b.ToTable("t_telemetry_wits_60", (string)null);
|
||||
b.ToTable("t_telemetry_wits_60");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.WITS.Record61", b =>
|
||||
@ -6730,7 +6818,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("TelemetryId");
|
||||
|
||||
b.ToTable("t_telemetry_wits_61", (string)null);
|
||||
b.ToTable("t_telemetry_wits_61");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.WITS.Record7", b =>
|
||||
@ -6818,7 +6906,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("TelemetryId");
|
||||
|
||||
b.ToTable("t_telemetry_wits_7", (string)null);
|
||||
b.ToTable("t_telemetry_wits_7");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.WITS.Record8", b =>
|
||||
@ -7022,7 +7110,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("TelemetryId");
|
||||
|
||||
b.ToTable("t_telemetry_wits_8", (string)null);
|
||||
b.ToTable("t_telemetry_wits_8");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.Cluster", b =>
|
||||
@ -7143,6 +7231,39 @@ namespace AsbCloudDb.Migrations
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsFloat", b =>
|
||||
{
|
||||
b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdTelemetry")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Telemetry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsInt", b =>
|
||||
{
|
||||
b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdTelemetry")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Telemetry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsStr", b =>
|
||||
{
|
||||
b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdTelemetry")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Telemetry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.LimitingParameter", b =>
|
||||
{
|
||||
b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry")
|
||||
|
@ -340,12 +340,26 @@ namespace AsbCloudDb.Model
|
||||
.HasJsonConversion();
|
||||
});
|
||||
|
||||
modelBuilder.Entity<WitsBase>(entity =>
|
||||
modelBuilder.Entity<WitsFloat>(entity =>
|
||||
{
|
||||
entity.HasKey(
|
||||
nameof(ITelemetryData.IdTelemetry),
|
||||
nameof(WitsBase.IdRecord),
|
||||
nameof(WitsBase.IdItem));
|
||||
nameof(IWitsBase.IdRecord),
|
||||
nameof(IWitsBase.IdItem));
|
||||
});
|
||||
modelBuilder.Entity<WitsInt>(entity =>
|
||||
{
|
||||
entity.HasKey(
|
||||
nameof(ITelemetryData.IdTelemetry),
|
||||
nameof(IWitsBase.IdRecord),
|
||||
nameof(IWitsBase.IdItem));
|
||||
});
|
||||
modelBuilder.Entity<WitsStr>(entity =>
|
||||
{
|
||||
entity.HasKey(
|
||||
nameof(ITelemetryData.IdTelemetry),
|
||||
nameof(IWitsBase.IdRecord),
|
||||
nameof(IWitsBase.IdItem));
|
||||
});
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user