using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace AsbCloudDb.Migrations
{
    /// <inheritdoc />
    public partial class Update_Tables_ProcessMapOperationsAndFunctions : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "buckling",
                table: "t_process_map_plan_rotor_rpm_acceleration");

            migrationBuilder.DropColumn(
                name: "zenit_angle",
                table: "t_process_map_plan_rotor_rpm_acceleration");

            migrationBuilder.AddColumn<string>(
                name: "note",
                table: "t_process_map_plan_tf_orientation",
                type: "character varying(1024)",
                maxLength: 1024,
                nullable: false,
                defaultValue: "",
                comment: "Примечание");

            migrationBuilder.AddColumn<string>(
                name: "note",
                table: "t_process_map_plan_static_measurement_output",
                type: "character varying(1024)",
                maxLength: 1024,
                nullable: false,
                defaultValue: "",
                comment: "Примечание");

            migrationBuilder.AddColumn<double>(
                name: "rpm",
                table: "t_process_map_plan_rotor_rpm_acceleration",
                type: "double precision",
                nullable: false,
                defaultValue: 0.0,
                comment: "Обороты на ВСП уставка, об/мин.");

            migrationBuilder.AddColumn<double>(
                name: "rpm_max",
                table: "t_process_map_plan_rotor_rpm_acceleration",
                type: "double precision",
                nullable: false,
                defaultValue: 0.0,
                comment: "Обороты на ВСП ограничение, об/мин.");

            migrationBuilder.AddColumn<double>(
                name: "top_drive_torque",
                table: "t_process_map_plan_rotor_rpm_acceleration",
                type: "double precision",
                nullable: false,
                defaultValue: 0.0,
                comment: "Момент на ВСП уставка, кН*м.");

            migrationBuilder.AddColumn<double>(
                name: "top_drive_torque_max",
                table: "t_process_map_plan_rotor_rpm_acceleration",
                type: "double precision",
                nullable: false,
                defaultValue: 0.0,
                comment: "Момент на ВСП ограничение, кН*м.");

            migrationBuilder.AddColumn<string>(
                name: "note",
                table: "t_process_map_plan_operation_switching_off_the_pump",
                type: "character varying(1024)",
                maxLength: 1024,
                nullable: false,
                defaultValue: "",
                comment: "Примечание");

            migrationBuilder.AddColumn<string>(
                name: "note",
                table: "t_process_map_plan_anti_crash_rotation",
                type: "character varying(1024)",
                maxLength: 1024,
                nullable: false,
                defaultValue: "",
                comment: "Примечание");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "note",
                table: "t_process_map_plan_tf_orientation");

            migrationBuilder.DropColumn(
                name: "note",
                table: "t_process_map_plan_static_measurement_output");

            migrationBuilder.DropColumn(
                name: "rpm",
                table: "t_process_map_plan_rotor_rpm_acceleration");

            migrationBuilder.DropColumn(
                name: "rpm_max",
                table: "t_process_map_plan_rotor_rpm_acceleration");

            migrationBuilder.DropColumn(
                name: "top_drive_torque",
                table: "t_process_map_plan_rotor_rpm_acceleration");

            migrationBuilder.DropColumn(
                name: "top_drive_torque_max",
                table: "t_process_map_plan_rotor_rpm_acceleration");

            migrationBuilder.DropColumn(
                name: "note",
                table: "t_process_map_plan_operation_switching_off_the_pump");

            migrationBuilder.DropColumn(
                name: "note",
                table: "t_process_map_plan_anti_crash_rotation");

            migrationBuilder.AddColumn<double>(
                name: "buckling",
                table: "t_process_map_plan_rotor_rpm_acceleration",
                type: "double precision",
                nullable: false,
                defaultValue: 0.0,
                comment: "Складывание, м");

            migrationBuilder.AddColumn<double>(
                name: "zenit_angle",
                table: "t_process_map_plan_rotor_rpm_acceleration",
                type: "double precision",
                nullable: false,
                defaultValue: 0.0,
                comment: "Зенитный угол, градусы");
        }
    }
}