DD.WellWorkover.Cloud/AsbCloudDb/Migrations/20231205061148_DetectedOperation_add_subsystems_and_extraData.cs
2023-12-05 11:12:20 +05:00

52 lines
1.7 KiB
C#

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: "Код признака окончания операции");
}
}
}