using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace AsbCloudDb.Migrations { public partial class AddTable_t_process_map : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "t_process_map", columns: table => new { id = table.Column(type: "integer", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), well_id = table.Column(type: "integer", nullable: false, comment: "Id скважины"), section = table.Column(type: "integer", nullable: false, comment: "Секция"), last_update = table.Column(type: "timestamp with time zone", nullable: false, comment: "Дата последнего изменения"), depth_start = table.Column(type: "double precision", nullable: false, comment: "Стартовая глубина"), depth_end = table.Column(type: "double precision", nullable: false, comment: "Глубина окончания интервала"), axial_load_plan = table.Column(type: "double precision", nullable: false, comment: "Нагрузка, план"), axial_load_fact = table.Column(type: "double precision", nullable: true, comment: "Нагрузка, факт"), pressure_plan = table.Column(type: "double precision", nullable: false, comment: "Перепад давления, план"), pressure_fact = table.Column(type: "double precision", nullable: true, comment: "Перепад давления, факт"), rotor_torque_plan = table.Column(type: "double precision", nullable: false, comment: "Момент на ВСП, план"), rotor_torque_fact = table.Column(type: "double precision", nullable: true, comment: "Момент на ВСП, факт"), rotor_speed_plan = table.Column(type: "double precision", nullable: false, comment: "Обороты на ВСП, план"), rotor_speed_fact = table.Column(type: "double precision", nullable: true, comment: "Обороты на ВСП, факт"), flow_plan = table.Column(type: "double precision", nullable: false, comment: "Расход, план"), flow_fact = table.Column(type: "double precision", nullable: true, comment: "Расход, факт"), mechanical_speed_plan = table.Column(type: "double precision", nullable: false, comment: "Плановая механическая скорость, м/ч") }, constraints: table => { table.PrimaryKey("PK_t_process_map", x => x.id); }, comment: "Операции по скважине - РТК"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "t_process_map"); } } }