forked from ddrilling/AsbCloudServer
52 lines
1.7 KiB
C#
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: "Код признака окончания операции");
|
|
}
|
|
}
|
|
}
|