DetectedOperation add migration

This commit is contained in:
ngfrolov 2023-12-05 11:12:20 +05:00
parent 94764d8669
commit 29c5de89a5
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7
3 changed files with 9153 additions and 5 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class DetectedOperation_add_subsystems_and_extraData : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "id_reason_of_end",
table: "t_detected_operation");
migrationBuilder.AddColumn<int>(
name: "enabled_subsystems",
table: "t_detected_operation",
type: "integer",
nullable: false,
defaultValue: 0,
comment: "флаги аключенных подсистем");
migrationBuilder.AddColumn<IDictionary<string, object>>(
name: "extra_data",
table: "t_detected_operation",
type: "jsonb",
nullable: false,
comment: "доп. инфо по операции");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "enabled_subsystems",
table: "t_detected_operation");
migrationBuilder.DropColumn(
name: "extra_data",
table: "t_detected_operation");
migrationBuilder.AddColumn<int>(
name: "id_reason_of_end",
table: "t_detected_operation",
type: "integer",
nullable: false,
defaultValue: 0,
comment: "Код признака окончания операции");
}
}
}

View File

@ -1,5 +1,6 @@
// <auto-generated />
using System;
using System.Collections.Generic;
using System.Text.Json;
using AsbCloudDb.Model;
using Microsoft.EntityFrameworkCore;
@ -382,16 +383,22 @@ namespace AsbCloudDb.Migrations
.HasColumnName("depth_start")
.HasComment("Глубина на начало операции, м");
b.Property<int>("EnabledSubsystems")
.HasColumnType("integer")
.HasColumnName("enabled_subsystems")
.HasComment("флаги аключенных подсистем");
b.Property<IDictionary<string, object>>("ExtraData")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("extra_data")
.HasComment("доп. инфо по операции");
b.Property<int>("IdCategory")
.HasColumnType("integer")
.HasColumnName("id_category")
.HasComment("Id категории операции");
b.Property<int>("IdReasonOfEnd")
.HasColumnType("integer")
.HasColumnName("id_reason_of_end")
.HasComment("Код признака окончания операции");
b.Property<int>("IdTelemetry")
.HasColumnType("integer")
.HasColumnName("id_telemetry");