forked from ddrilling/AsbCloudServer
237 lines
9.0 KiB
C#
237 lines
9.0 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace AsbCloudDb.Migrations
|
|
{
|
|
public partial class Add_Fields_To_ProcessMapDrillingCache : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<double>(
|
|
name: "axial_load",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "double precision",
|
|
nullable: false,
|
|
defaultValue: 0.0,
|
|
comment: "Фактическая нагрузка");
|
|
|
|
migrationBuilder.AddColumn<float>(
|
|
name: "axial_load_limit_max",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "real",
|
|
nullable: true,
|
|
comment: "Максимально допустимая нагрузка");
|
|
|
|
migrationBuilder.AddColumn<float>(
|
|
name: "axial_load_sp",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "real",
|
|
nullable: true,
|
|
comment: "Ограничение факт. нагрузки");
|
|
|
|
migrationBuilder.AddColumn<float>(
|
|
name: "block_speed_sp",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "real",
|
|
nullable: true,
|
|
comment: "Ограничение скорости блока");
|
|
|
|
migrationBuilder.AddColumn<DateTimeOffset>(
|
|
name: "date_drilling_end",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
defaultValue: new DateTimeOffset(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
|
comment: "Дата и время окончания бурения");
|
|
|
|
migrationBuilder.AddColumn<DateTimeOffset>(
|
|
name: "date_drilling_start",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
defaultValue: new DateTimeOffset(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
|
comment: "Дата и время начала бурения");
|
|
|
|
migrationBuilder.AddColumn<double>(
|
|
name: "depth_end",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "double precision",
|
|
nullable: false,
|
|
defaultValue: 0.0,
|
|
comment: "Глубина забоя по стволу конечная");
|
|
|
|
migrationBuilder.AddColumn<double>(
|
|
name: "depth_start",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "double precision",
|
|
nullable: false,
|
|
defaultValue: 0.0,
|
|
comment: "Глубина забоя по стволу начальная");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "detected_operation_category_id",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "integer",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
comment: "Название автоопределённой операции");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "enabled_subsystems",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "integer",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
comment: "Флаги подсистем");
|
|
|
|
migrationBuilder.AddColumn<short>(
|
|
name: "id_feed_regulator",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "smallint",
|
|
nullable: true,
|
|
comment: "Работа при достижении ограничения");
|
|
|
|
migrationBuilder.AddColumn<double>(
|
|
name: "pressure",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "double precision",
|
|
nullable: false,
|
|
defaultValue: 0.0,
|
|
comment: "Давление");
|
|
|
|
migrationBuilder.AddColumn<float>(
|
|
name: "pressure_idle",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "real",
|
|
nullable: true,
|
|
comment: "Давление холостого хода");
|
|
|
|
migrationBuilder.AddColumn<float>(
|
|
name: "pressure_sp",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "real",
|
|
nullable: true,
|
|
comment: "Ограничение фактического давления");
|
|
|
|
migrationBuilder.AddColumn<double>(
|
|
name: "rotor_speed",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "double precision",
|
|
nullable: false,
|
|
defaultValue: 0.0,
|
|
comment: "Фактическая скорость оборотов ВСП");
|
|
|
|
migrationBuilder.AddColumn<double>(
|
|
name: "rotor_torque",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "double precision",
|
|
nullable: false,
|
|
defaultValue: 0.0,
|
|
comment: "Фактический момент");
|
|
|
|
migrationBuilder.AddColumn<float>(
|
|
name: "rotor_torque_limit_max",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "real",
|
|
nullable: true,
|
|
comment: "Максимально допустимый момент");
|
|
|
|
migrationBuilder.AddColumn<float>(
|
|
name: "rotor_torque_sp",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "real",
|
|
nullable: true,
|
|
comment: "Ограничение факт. момента");
|
|
|
|
migrationBuilder.AddColumn<double>(
|
|
name: "speed",
|
|
table: "t_process_map_drilling_cache",
|
|
type: "double precision",
|
|
nullable: false,
|
|
defaultValue: 0.0,
|
|
comment: "Скорость бурения");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "axial_load",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "axial_load_limit_max",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "axial_load_sp",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "block_speed_sp",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "date_drilling_end",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "date_drilling_start",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "depth_end",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "depth_start",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "detected_operation_category_id",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "enabled_subsystems",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "id_feed_regulator",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "pressure",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "pressure_idle",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "pressure_sp",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "rotor_speed",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "rotor_torque",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "rotor_torque_limit_max",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "rotor_torque_sp",
|
|
table: "t_process_map_drilling_cache");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "speed",
|
|
table: "t_process_map_drilling_cache");
|
|
}
|
|
}
|
|
}
|