From 50d6143366768230881998a0bb01219bd3b60d93 Mon Sep 17 00:00:00 2001 From: eugeniy_ivanov Date: Mon, 26 Dec 2022 21:50:33 +0500 Subject: [PATCH] edit column migration --- ...21226104823_editTable_PlannedTrajectory.cs | 333 ------------------ ...3_editTable_PlannedTrajectory.Designer.cs} | 30 +- ...21226164803_editTable_PlannedTrajectory.cs | 25 ++ .../AsbCloudDbContextModelSnapshot.cs | 28 +- AsbCloudDb/Model/PlannedTrajectory.cs | 28 +- 5 files changed, 68 insertions(+), 376 deletions(-) delete mode 100644 AsbCloudDb/Migrations/20221226104823_editTable_PlannedTrajectory.cs rename AsbCloudDb/Migrations/{20221226104823_editTable_PlannedTrajectory.Designer.cs => 20221226164803_editTable_PlannedTrajectory.Designer.cs} (99%) create mode 100644 AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.cs diff --git a/AsbCloudDb/Migrations/20221226104823_editTable_PlannedTrajectory.cs b/AsbCloudDb/Migrations/20221226104823_editTable_PlannedTrajectory.cs deleted file mode 100644 index 94d761e6..00000000 --- a/AsbCloudDb/Migrations/20221226104823_editTable_PlannedTrajectory.cs +++ /dev/null @@ -1,333 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace AsbCloudDb.Migrations -{ - public partial class editTable_PlannedTrajectory : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "load_date", - table: "t_planned_trajectory", - newName: "update_date"); - - migrationBuilder.AlterColumn( - name: "zenith_angle", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Угол зенитный", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Угол зенитный"); - - migrationBuilder.AlterColumn( - name: "wellbore_depth", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Глубина по стволу", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Глубина по стволу"); - - migrationBuilder.AlterColumn( - name: "vertical_depth", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Глубина вертикальная", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Глубина вертикальная"); - - migrationBuilder.AlterColumn( - name: "spatial_intensity", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Пространственная интенсивность", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Пространственная интенсивность"); - - migrationBuilder.AlterColumn( - name: "orifice_offset", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Смещение от устья", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Смещение от устья"); - - migrationBuilder.AlterColumn( - name: "north_orifice", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Север отн-но устья", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Север отн-но устья"); - - migrationBuilder.AlterColumn( - name: "north_cartographic", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Север картографический", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Север картографический"); - - migrationBuilder.AlterColumn( - name: "east_orifice", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Восток отн-но устья", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Восток отн-но устья"); - - migrationBuilder.AlterColumn( - name: "east_cartographic", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Восток картографический", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Восток картографический"); - - migrationBuilder.AlterColumn( - name: "azimuth_magnetic", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Азимут Магнитный", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Азимут Магнитный"); - - migrationBuilder.AlterColumn( - name: "azimuth_intensity", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Интенсивность по азимуту", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Интенсивность по азимуту"); - - migrationBuilder.AlterColumn( - name: "azimuth_geo", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Азимут Географ.", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Азимут Географ."); - - migrationBuilder.AlterColumn( - name: "angle_intensity", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Интенсивность по углу", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Интенсивность по углу"); - - migrationBuilder.AlterColumn( - name: "absolute_mark", - table: "t_planned_trajectory", - type: "double precision", - nullable: true, - comment: "Абсолютная отметка", - oldClrType: typeof(double), - oldType: "double precision", - oldComment: "Абсолютная отметка"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "update_date", - table: "t_planned_trajectory", - newName: "load_date"); - - migrationBuilder.AlterColumn( - name: "zenith_angle", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Угол зенитный", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Угол зенитный"); - - migrationBuilder.AlterColumn( - name: "wellbore_depth", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Глубина по стволу", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Глубина по стволу"); - - migrationBuilder.AlterColumn( - name: "vertical_depth", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Глубина вертикальная", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Глубина вертикальная"); - - migrationBuilder.AlterColumn( - name: "spatial_intensity", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Пространственная интенсивность", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Пространственная интенсивность"); - - migrationBuilder.AlterColumn( - name: "orifice_offset", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Смещение от устья", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Смещение от устья"); - - migrationBuilder.AlterColumn( - name: "north_orifice", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Север отн-но устья", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Север отн-но устья"); - - migrationBuilder.AlterColumn( - name: "north_cartographic", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Север картографический", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Север картографический"); - - migrationBuilder.AlterColumn( - name: "east_orifice", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Восток отн-но устья", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Восток отн-но устья"); - - migrationBuilder.AlterColumn( - name: "east_cartographic", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Восток картографический", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Восток картографический"); - - migrationBuilder.AlterColumn( - name: "azimuth_magnetic", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Азимут Магнитный", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Азимут Магнитный"); - - migrationBuilder.AlterColumn( - name: "azimuth_intensity", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Интенсивность по азимуту", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Интенсивность по азимуту"); - - migrationBuilder.AlterColumn( - name: "azimuth_geo", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Азимут Географ.", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Азимут Географ."); - - migrationBuilder.AlterColumn( - name: "angle_intensity", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Интенсивность по углу", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Интенсивность по углу"); - - migrationBuilder.AlterColumn( - name: "absolute_mark", - table: "t_planned_trajectory", - type: "double precision", - nullable: false, - defaultValue: 0.0, - comment: "Абсолютная отметка", - oldClrType: typeof(double), - oldType: "double precision", - oldNullable: true, - oldComment: "Абсолютная отметка"); - } - } -} diff --git a/AsbCloudDb/Migrations/20221226104823_editTable_PlannedTrajectory.Designer.cs b/AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.Designer.cs similarity index 99% rename from AsbCloudDb/Migrations/20221226104823_editTable_PlannedTrajectory.Designer.cs rename to AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.Designer.cs index 84d142d6..9349fd24 100644 --- a/AsbCloudDb/Migrations/20221226104823_editTable_PlannedTrajectory.Designer.cs +++ b/AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.Designer.cs @@ -13,7 +13,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace AsbCloudDb.Migrations { [DbContext(typeof(AsbCloudDbContext))] - [Migration("20221226104823_editTable_PlannedTrajectory")] + [Migration("20221226164803_editTable_PlannedTrajectory")] partial class editTable_PlannedTrajectory { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -1773,27 +1773,27 @@ namespace AsbCloudDb.Migrations NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AbsoluteMark") + b.Property("AbsoluteMark") .HasColumnType("double precision") .HasColumnName("absolute_mark") .HasComment("Абсолютная отметка"); - b.Property("AngleIntensity") + b.Property("AngleIntensity") .HasColumnType("double precision") .HasColumnName("angle_intensity") .HasComment("Интенсивность по углу"); - b.Property("AzimuthGeo") + b.Property("AzimuthGeo") .HasColumnType("double precision") .HasColumnName("azimuth_geo") .HasComment("Азимут Географ."); - b.Property("AzimuthIntensity") + b.Property("AzimuthIntensity") .HasColumnType("double precision") .HasColumnName("azimuth_intensity") .HasComment("Интенсивность по азимуту"); - b.Property("AzimuthMagnetic") + b.Property("AzimuthMagnetic") .HasColumnType("double precision") .HasColumnName("azimuth_magnetic") .HasComment("Азимут Магнитный"); @@ -1803,12 +1803,12 @@ namespace AsbCloudDb.Migrations .HasColumnName("comment") .HasComment("Комментарии"); - b.Property("EastCartographic") + b.Property("EastCartographic") .HasColumnType("double precision") .HasColumnName("east_cartographic") .HasComment("Восток картографический"); - b.Property("EastOrifice") + b.Property("EastOrifice") .HasColumnType("double precision") .HasColumnName("east_orifice") .HasComment("Восток отн-но устья"); @@ -1823,22 +1823,22 @@ namespace AsbCloudDb.Migrations .HasColumnName("id_well") .HasComment("ID скважины"); - b.Property("NorthCartographic") + b.Property("NorthCartographic") .HasColumnType("double precision") .HasColumnName("north_cartographic") .HasComment("Север картографический"); - b.Property("NorthOrifice") + b.Property("NorthOrifice") .HasColumnType("double precision") .HasColumnName("north_orifice") .HasComment("Север отн-но устья"); - b.Property("OrificeOffset") + b.Property("OrificeOffset") .HasColumnType("double precision") .HasColumnName("orifice_offset") .HasComment("Смещение от устья"); - b.Property("SpatialIntensity") + b.Property("SpatialIntensity") .HasColumnType("double precision") .HasColumnName("spatial_intensity") .HasComment("Пространственная интенсивность"); @@ -1848,17 +1848,17 @@ namespace AsbCloudDb.Migrations .HasColumnName("update_date") .HasComment("Дата загрузки траектории"); - b.Property("VerticalDepth") + b.Property("VerticalDepth") .HasColumnType("double precision") .HasColumnName("vertical_depth") .HasComment("Глубина вертикальная"); - b.Property("WellboreDepth") + b.Property("WellboreDepth") .HasColumnType("double precision") .HasColumnName("wellbore_depth") .HasComment("Глубина по стволу"); - b.Property("ZenithAngle") + b.Property("ZenithAngle") .HasColumnType("double precision") .HasColumnName("zenith_angle") .HasComment("Угол зенитный"); diff --git a/AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.cs b/AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.cs new file mode 100644 index 00000000..5fa4654c --- /dev/null +++ b/AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.cs @@ -0,0 +1,25 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace AsbCloudDb.Migrations +{ + public partial class editTable_PlannedTrajectory : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "load_date", + table: "t_planned_trajectory", + newName: "update_date"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "update_date", + table: "t_planned_trajectory", + newName: "load_date"); + } + } +} diff --git a/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs b/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs index 5703f0cf..dbb94491 100644 --- a/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs +++ b/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs @@ -1771,27 +1771,27 @@ namespace AsbCloudDb.Migrations NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AbsoluteMark") + b.Property("AbsoluteMark") .HasColumnType("double precision") .HasColumnName("absolute_mark") .HasComment("Абсолютная отметка"); - b.Property("AngleIntensity") + b.Property("AngleIntensity") .HasColumnType("double precision") .HasColumnName("angle_intensity") .HasComment("Интенсивность по углу"); - b.Property("AzimuthGeo") + b.Property("AzimuthGeo") .HasColumnType("double precision") .HasColumnName("azimuth_geo") .HasComment("Азимут Географ."); - b.Property("AzimuthIntensity") + b.Property("AzimuthIntensity") .HasColumnType("double precision") .HasColumnName("azimuth_intensity") .HasComment("Интенсивность по азимуту"); - b.Property("AzimuthMagnetic") + b.Property("AzimuthMagnetic") .HasColumnType("double precision") .HasColumnName("azimuth_magnetic") .HasComment("Азимут Магнитный"); @@ -1801,12 +1801,12 @@ namespace AsbCloudDb.Migrations .HasColumnName("comment") .HasComment("Комментарии"); - b.Property("EastCartographic") + b.Property("EastCartographic") .HasColumnType("double precision") .HasColumnName("east_cartographic") .HasComment("Восток картографический"); - b.Property("EastOrifice") + b.Property("EastOrifice") .HasColumnType("double precision") .HasColumnName("east_orifice") .HasComment("Восток отн-но устья"); @@ -1821,22 +1821,22 @@ namespace AsbCloudDb.Migrations .HasColumnName("id_well") .HasComment("ID скважины"); - b.Property("NorthCartographic") + b.Property("NorthCartographic") .HasColumnType("double precision") .HasColumnName("north_cartographic") .HasComment("Север картографический"); - b.Property("NorthOrifice") + b.Property("NorthOrifice") .HasColumnType("double precision") .HasColumnName("north_orifice") .HasComment("Север отн-но устья"); - b.Property("OrificeOffset") + b.Property("OrificeOffset") .HasColumnType("double precision") .HasColumnName("orifice_offset") .HasComment("Смещение от устья"); - b.Property("SpatialIntensity") + b.Property("SpatialIntensity") .HasColumnType("double precision") .HasColumnName("spatial_intensity") .HasComment("Пространственная интенсивность"); @@ -1846,17 +1846,17 @@ namespace AsbCloudDb.Migrations .HasColumnName("update_date") .HasComment("Дата загрузки траектории"); - b.Property("VerticalDepth") + b.Property("VerticalDepth") .HasColumnType("double precision") .HasColumnName("vertical_depth") .HasComment("Глубина вертикальная"); - b.Property("WellboreDepth") + b.Property("WellboreDepth") .HasColumnType("double precision") .HasColumnName("wellbore_depth") .HasComment("Глубина по стволу"); - b.Property("ZenithAngle") + b.Property("ZenithAngle") .HasColumnType("double precision") .HasColumnName("zenith_angle") .HasComment("Угол зенитный"); diff --git a/AsbCloudDb/Model/PlannedTrajectory.cs b/AsbCloudDb/Model/PlannedTrajectory.cs index bfff3da9..ee14a9d0 100644 --- a/AsbCloudDb/Model/PlannedTrajectory.cs +++ b/AsbCloudDb/Model/PlannedTrajectory.cs @@ -22,46 +22,46 @@ namespace AsbCloudDb.Model public DateTimeOffset UpdateDate { get; set; } [Column("wellbore_depth"), Comment("Глубина по стволу")] - public double? WellboreDepth { get; set; } + public double WellboreDepth { get; set; } [Column("zenith_angle"), Comment("Угол зенитный")] - public double? ZenithAngle { get; set; } + public double ZenithAngle { get; set; } [Column("azimuth_geo"), Comment("Азимут Географ.")] - public double? AzimuthGeo { get; set; } + public double AzimuthGeo { get; set; } [Column("azimuth_magnetic"), Comment("Азимут Магнитный")] - public double? AzimuthMagnetic { get; set; } + public double AzimuthMagnetic { get; set; } [Column("vertical_depth"), Comment("Глубина вертикальная")] - public double? VerticalDepth { get; set; } + public double VerticalDepth { get; set; } [Column("absolute_mark"), Comment("Абсолютная отметка")] - public double? AbsoluteMark { get; set; } + public double AbsoluteMark { get; set; } [Column("north_orifice"), Comment("Север отн-но устья")] - public double? NorthOrifice { get; set; } + public double NorthOrifice { get; set; } [Column("east_orifice"), Comment("Восток отн-но устья")] - public double? EastOrifice { get; set; } + public double EastOrifice { get; set; } [Column("east_cartographic"), Comment("Восток картографический")] - public double? EastCartographic { get; set; } + public double EastCartographic { get; set; } [Column("north_cartographic"), Comment("Север картографический")] - public double? NorthCartographic { get; set; } + public double NorthCartographic { get; set; } [Column("spatial_intensity"), Comment("Пространственная интенсивность")] - public double? SpatialIntensity { get; set; } + public double SpatialIntensity { get; set; } [Column("angle_intensity"), Comment("Интенсивность по углу")] - public double? AngleIntensity { get; set; } + public double AngleIntensity { get; set; } [Column("azimuth_intensity"), Comment("Интенсивность по азимуту")] - public double? AzimuthIntensity { get; set; } + public double AzimuthIntensity { get; set; } [Column("orifice_offset"), Comment("Смещение от устья")] - public double? OrificeOffset { get; set; } + public double OrificeOffset { get; set; } [Column("comment"), Comment("Комментарии")] public string? Comment { get; set; }