From b5b2baa2b60785cd6a2c8aae97a86d98b7c0d2b9 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Mon, 12 Feb 2024 16:17:13 +0100 Subject: [PATCH 01/36] wip-first-step-renaming --- src/api-legacy/v1/borehole/patch.py | 30 +- src/api/BdmsContextExtensions.cs | 20 +- ...20240212111401_RenameCodelists.Designer.cs | 2794 +++++++++++++++++ .../20240212111401_RenameCodelists.cs | 25 + src/api/Models/CompletionSchemas.cs | 8 +- src/client/cypress/e2e/codeList.cy.js | 34 +- .../src/commons/detail/detailsComponent.js | 4 +- .../src/commons/detail/meta/metaComponent.js | 28 +- .../form/borehole/completion/backfillInput.js | 2 +- .../form/borehole/completion/casingInput.js | 2 +- .../completion/completionSchemaConstants.js | 8 +- .../segments/boreholeDetailSegment.js | 8 +- .../segments/boreholeGeneralSegment.js | 38 +- .../src/commons/form/multiple/multipleForm.js | 18 +- .../commons/search/data/boreholeSearchData.js | 20 +- .../src/commons/table/boreholeEditorTable.js | 2 +- src/client/src/commons/table/boreholeTable.js | 6 +- .../pages/settings/data/boreholeEditorData.js | 6 +- tests/Controllers/BackfillControllerTest.cs | 8 +- tests/Controllers/CasingControllerTest.cs | 8 +- 20 files changed, 2949 insertions(+), 120 deletions(-) create mode 100644 src/api/Migrations/20240212111401_RenameCodelists.Designer.cs create mode 100644 src/api/Migrations/20240212111401_RenameCodelists.cs diff --git a/src/api-legacy/v1/borehole/patch.py b/src/api-legacy/v1/borehole/patch.py index 3b3e4ff2a..bda081fc7 100644 --- a/src/api-legacy/v1/borehole/patch.py +++ b/src/api-legacy/v1/borehole/patch.py @@ -137,25 +137,25 @@ def get_column(field): elif field == 'hrs': column = 'hrs_id_cli' - elif field == 'extended.drilling_method': + elif field == 'drilling_method': column = 'drilling_method_id_cli' - elif field == 'custom.cuttings': + elif field == 'borehole_cuttings_core': column = 'cuttings_id_cli' - elif field == 'extended.purpose': + elif field == 'drilling_purpose': column = 'purpose_id_cli' - elif field == 'extended.status': + elif field == 'borehole_status': column = 'status_id_cli' - elif field == 'custom.qt_bore_inc_dir': + elif field == 'inclination_precision': column = 'qt_inclination_direction_id_cli' elif field == 'custom.qt_depth': column = 'qt_depth_id_cli' - elif field == 'custom.qt_top_bedrock': + elif field == 'depth_precision': column = 'qt_top_bedrock' elif field == 'custom.qt_top_bedrock_tvd': @@ -207,7 +207,7 @@ async def execute(self, id, field, value, user): 'total_depth_tvd', 'extended.top_bedrock', 'extended.top_bedrock_tvd', - 'custom.qt_top_bedrock', + 'depth_precision', 'custom.qt_top_bedrock_tvd', 'extended.groundwater', 'custom.mistakes', @@ -277,11 +277,11 @@ async def execute(self, id, field, value, user): 'qt_elevation', 'hrs', 'custom.landuse', - 'extended.drilling_method', - 'custom.cuttings', - 'extended.purpose', - 'extended.status', - 'custom.qt_bore_inc_dir', + 'drilling_method', + 'borehole_cuttings_core', + 'drilling_purpose', + 'borehole_status', + 'inclination_precision', 'custom.qt_depth', 'custom.processing_status', 'custom.lithology_top_bedrock', @@ -304,7 +304,7 @@ async def execute(self, id, field, value, user): schema = 'custom.chronostratigraphy_top_bedrock' elif field == 'custom.qt_top_bedrock_tvd': - schema = 'custom.qt_top_bedrock' + schema = 'depth_precision' elif field == 'qt_reference_elevation': schema = 'qt_elevation' @@ -313,10 +313,10 @@ async def execute(self, id, field, value, user): schema = 'ibor117' elif field == 'qt_total_depth_tvd': - schema = 'custom.qt_top_bedrock' + schema = 'depth_precision' elif field == 'custom.qt_depth': - schema = 'custom.qt_top_bedrock' + schema = 'depth_precision' # Check if domain is extracted from the correct schema if value is not None and schema != ( diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index b1f4c4b6a..5d0499554 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -64,20 +64,20 @@ public static void SeedData(this BdmsContext context) List restrictionIds = codelists.Where(c => c.Schema == "restriction").Select(s => s.Id).ToList(); List qtLocationnIds = codelists.Where(c => c.Schema == "qt_location").Select(s => s.Id).ToList(); List qtDescriptionIds = codelists.Where(c => c.Schema == "qt_description").Select(s => s.Id).ToList(); - List drillingMethodIds = codelists.Where(c => c.Schema == "extended.drilling_method").Select(s => s.Id).ToList(); - List cuttingsIds = codelists.Where(c => c.Schema == "custom.cuttings").Select(s => s.Id).ToList(); - List qtDepthIds = codelists.Where(c => c.Schema == "custom.qt_top_bedrock").Select(s => s.Id).ToList(); + List drillingMethodIds = codelists.Where(c => c.Schema == "drilling_method").Select(s => s.Id).ToList(); + List cuttingsIds = codelists.Where(c => c.Schema == "borehole_cuttings_core").Select(s => s.Id).ToList(); + List qtDepthIds = codelists.Where(c => c.Schema == "depth_precision").Select(s => s.Id).ToList(); List qtElevationIds = codelists.Where(c => c.Schema == "qt_elevation").Select(s => s.Id).ToList(); List layerKindIds = codelists.Where(c => c.Schema == "layer_kind").Select(s => s.Id).ToList(); - List purposeIds = codelists.Where(c => c.Schema == "extended.purpose").Select(s => s.Id).ToList(); - List statusIds = codelists.Where(c => c.Schema == "extended.status").Select(s => s.Id).ToList(); + List purposeIds = codelists.Where(c => c.Schema == "drilling_purpose").Select(s => s.Id).ToList(); + List statusIds = codelists.Where(c => c.Schema == "borehole_status").Select(s => s.Id).ToList(); List lithologyTopBedrockIds = codelists.Where(c => c.Schema == "custom.lithology_top_bedrock").Select(s => s.Id).ToList(); - List qtInclinationDirectionIds = codelists.Where(c => c.Schema == "custom.qt_bore_inc_dir").Select(s => s.Id).ToList(); + List qtInclinationDirectionIds = codelists.Where(c => c.Schema == "inclination_precision").Select(s => s.Id).ToList(); List chronostratigraphyTopBedrockIds = codelists.Where(c => c.Schema == "custom.chronostratigraphy_top_bedrock").Select(s => s.Id).ToList(); List lithostratigraphyTopBedrockIds = codelists.Where(c => c.Schema == "custom.lithostratigraphy_top_bedrock").Select(s => s.Id).ToList(); List instrumentKindIds = codelists.Where(c => c.Schema == CompletionSchemas.InstrumentationKindSchema).Select(s => s.Id).ToList(); List instrumentStatusIds = codelists.Where(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Select(s => s.Id).ToList(); - List casingKindIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingKindSchema).Select(s => s.Id).ToList(); + List casingTypeIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingTypeSchema).Select(s => s.Id).ToList(); List casingMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Select(s => s.Id).ToList(); List plasticityIds = codelists.Where(c => c.Schema == "mlpr101").Select(s => s.Id).ToList(); List compactnessIds = codelists.Where(c => c.Schema == "mlpr102").Select(s => s.Id).ToList(); @@ -85,7 +85,7 @@ public static void SeedData(this BdmsContext context) List humidityIds = codelists.Where(c => c.Schema == "mlpr105").Select(s => s.Id).ToList(); List alterationIds = codelists.Where(c => c.Schema == "mlpr106").Select(s => s.Id).ToList(); List cohesionIds = codelists.Where(c => c.Schema == "mlpr116").Select(s => s.Id).ToList(); - List backfillKindIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillKindSchema).Select(s => s.Id).ToList(); + List backfillTypeIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Select(s => s.Id).ToList(); List backfillMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Select(s => s.Id).ToList(); List uscsIds = codelists.Where(c => c.Schema == "mcla101").Select(s => s.Id).ToList(); List uscsDeterminationIds = codelists.Where(c => c.Schema == "mcla104").Select(s => s.Id).ToList(); @@ -576,7 +576,7 @@ int GetStratigraphyOrCasingId(int currentLayerId, int startId) .RuleFor(c => c.Name, f => f.Random.Word()) .RuleFor(c => c.FromDepth, f => (casing_ids % 10) * 10) .RuleFor(c => c.ToDepth, f => ((casing_ids % 10) + 1) * 10) - .RuleFor(c => c.KindId, f => f.PickRandom(casingKindIds)) + .RuleFor(c => c.KindId, f => f.PickRandom(casingTypeIds)) .RuleFor(c => c.Kind, _ => default!) .RuleFor(c => c.MaterialId, f => f.PickRandom(casingMaterialIds)) .RuleFor(c => c.Material, _ => default!) @@ -649,7 +649,7 @@ Instrumentation SeededInstrumentation(Completion completion) .RuleFor(b => b.Completion, _ => default!) .RuleFor(b => b.FromDepth, f => (backfill_ids % 10) * 10) .RuleFor(b => b.ToDepth, f => ((backfill_ids % 10) + 1) * 10) - .RuleFor(b => b.KindId, f => f.PickRandom(backfillKindIds)) + .RuleFor(b => b.KindId, f => f.PickRandom(backfillTypeIds)) .RuleFor(b => b.Kind, _ => default!) .RuleFor(b => b.MaterialId, f => f.PickRandom(backfillMaterialIds)) .RuleFor(b => b.Material, _ => default!) diff --git a/src/api/Migrations/20240212111401_RenameCodelists.Designer.cs b/src/api/Migrations/20240212111401_RenameCodelists.Designer.cs new file mode 100644 index 000000000..15421d9a5 --- /dev/null +++ b/src/api/Migrations/20240212111401_RenameCodelists.Designer.cs @@ -0,0 +1,2794 @@ +// +using System; +using BDMS; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using NetTopologySuite.Geometries; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace BDMS.Migrations +{ + [DbContext(typeof(BdmsContext))] + [Migration("20240212111401_RenameCodelists")] + partial class RenameCodelists + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasDefaultSchema("bdms") + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "ltree"); + NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "postgis"); + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("BDMS.Models.Backfill", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CompletionId") + .HasColumnType("integer") + .HasColumnName("completion_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("from_depth"); + + b.Property("TypeId") + .HasColumnType("integer") + .HasColumnName("kind_id"); + + b.Property("MaterialId") + .HasColumnType("integer") + .HasColumnName("material_id"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("to_depth"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CompletionId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("TypeId"); + + b.HasIndex("MaterialId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("backfill", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Borehole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_bho"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AlternateName") + .HasColumnType("text") + .HasColumnName("alternate_name_bho"); + + b.Property("Canton") + .HasColumnType("text") + .HasColumnName("canton_bho"); + + b.Property("ChronostratigraphyId") + .HasColumnType("integer") + .HasColumnName("chronostrat_id_cli"); + + b.Property("Country") + .HasColumnType("text") + .HasColumnName("country_bho"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_bho"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("created_by_bho"); + + b.Property("CuttingsId") + .HasColumnType("integer") + .HasColumnName("cuttings_id_cli"); + + b.Property("DrillingDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("drilling_date_bho"); + + b.Property("DrillingDiameter") + .HasColumnType("double precision") + .HasColumnName("drilling_diameter_bho"); + + b.Property("DrillingMethodId") + .HasColumnType("integer") + .HasColumnName("drilling_method_id_cli"); + + b.Property("ElevationZ") + .HasColumnType("double precision") + .HasColumnName("elevation_z_bho"); + + b.Property("Geometry") + .HasColumnType("geometry") + .HasColumnName("geom_bho"); + + b.Property("HasGroundwater") + .HasColumnType("boolean") + .HasColumnName("groundwater_bho"); + + b.Property("HrsId") + .HasColumnType("integer") + .HasColumnName("hrs_id_cli"); + + b.Property("Inclination") + .HasColumnType("double precision") + .HasColumnName("inclination_bho"); + + b.Property("InclinationDirection") + .HasColumnType("double precision") + .HasColumnName("inclination_direction_bho"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("public_bho"); + + b.Property("TypeId") + .HasColumnType("integer") + .HasColumnName("kind_id_cli"); + + b.Property("LithologyTopBedrockId") + .HasColumnType("integer") + .HasColumnName("lithology_top_bedrock_id_cli"); + + b.Property("LithostratigraphyId") + .HasColumnType("integer") + .HasColumnName("lithostrat_id_cli"); + + b.Property("LocationX") + .HasColumnType("double precision") + .HasColumnName("location_x_bho"); + + b.Property("LocationXLV03") + .HasColumnType("double precision") + .HasColumnName("location_x_lv03_bho"); + + b.Property("LocationY") + .HasColumnType("double precision") + .HasColumnName("location_y_bho"); + + b.Property("LocationYLV03") + .HasColumnType("double precision") + .HasColumnName("location_y_lv03_bho"); + + b.Property("Locked") + .HasColumnType("timestamp with time zone") + .HasColumnName("locked_bho"); + + b.Property("LockedById") + .HasColumnType("integer") + .HasColumnName("locked_by_bho"); + + b.Property("Municipality") + .HasColumnType("text") + .HasColumnName("municipality_bho"); + + b.Property("NationalInterest") + .HasColumnType("boolean") + .HasColumnName("national_interest"); + + b.Property("OriginalName") + .HasColumnType("text") + .HasColumnName("original_name_bho"); + + b.Property("OriginalReferenceSystem") + .HasColumnType("integer") + .HasColumnName("srs_id_cli"); + + b.Property("ProjectName") + .HasColumnType("text") + .HasColumnName("project_name_bho"); + + b.Property("PurposeId") + .HasColumnType("integer") + .HasColumnName("purpose_id_cli"); + + b.Property("QtDepthId") + .HasColumnType("integer") + .HasColumnName("qt_depth_id_cli"); + + b.Property("QtElevationId") + .HasColumnType("integer") + .HasColumnName("qt_elevation_id_cli"); + + b.Property("QtInclinationDirectionId") + .HasColumnType("integer") + .HasColumnName("qt_inclination_direction_id_cli"); + + b.Property("QtLocationId") + .HasColumnType("integer") + .HasColumnName("qt_location_id_cli"); + + b.Property("QtReferenceElevationId") + .HasColumnType("integer") + .HasColumnName("qt_reference_elevation_id_cli"); + + b.Property("QtTopBedrock") + .HasColumnType("double precision") + .HasColumnName("qt_top_bedrock"); + + b.Property("QtTopBedrockTvd") + .HasColumnType("double precision") + .HasColumnName("qt_top_bedrock_tvd"); + + b.Property("QtTotalDepthTvdId") + .HasColumnType("integer") + .HasColumnName("qt_total_depth_tvd_id_cli"); + + b.Property("ReferenceElevation") + .HasColumnType("double precision") + .HasColumnName("reference_elevation_bho"); + + b.Property("ReferenceElevationTypeId") + .HasColumnType("integer") + .HasColumnName("reference_elevation_type_id_cli"); + + b.Property("Remarks") + .HasColumnType("text") + .HasColumnName("remarks_bho"); + + b.Property("RestrictionId") + .HasColumnType("integer") + .HasColumnName("restriction_id_cli"); + + b.Property("RestrictionUntil") + .HasColumnType("timestamp with time zone") + .HasColumnName("restriction_until_bho"); + + b.Property("SpudDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("spud_date_bho"); + + b.Property("StatusId") + .HasColumnType("integer") + .HasColumnName("status_id_cli"); + + b.Property("TopBedrock") + .HasColumnType("double precision") + .HasColumnName("top_bedrock_bho"); + + b.Property("TopBedrockTvd") + .HasColumnType("double precision") + .HasColumnName("top_bedrock_tvd_bho"); + + b.Property("TotalDepth") + .HasColumnType("double precision") + .HasColumnName("total_depth_bho"); + + b.Property("TotalDepthTvd") + .HasColumnType("double precision") + .HasColumnName("total_depth_tvd_bho"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("updated_bho"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updated_by_bho"); + + b.Property("WorkgroupId") + .HasColumnType("integer") + .HasColumnName("id_wgp_fk"); + + b.HasKey("Id"); + + b.HasIndex("ChronostratigraphyId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("CuttingsId"); + + b.HasIndex("DrillingMethodId"); + + b.HasIndex("HrsId"); + + b.HasIndex("TypeId"); + + b.HasIndex("LithologyTopBedrockId"); + + b.HasIndex("LithostratigraphyId"); + + b.HasIndex("LockedById"); + + b.HasIndex("PurposeId"); + + b.HasIndex("QtDepthId"); + + b.HasIndex("QtElevationId"); + + b.HasIndex("QtInclinationDirectionId"); + + b.HasIndex("QtLocationId"); + + b.HasIndex("QtReferenceElevationId"); + + b.HasIndex("QtTotalDepthTvdId"); + + b.HasIndex("ReferenceElevationTypeId"); + + b.HasIndex("RestrictionId"); + + b.HasIndex("StatusId"); + + b.HasIndex("UpdatedById"); + + b.HasIndex("WorkgroupId"); + + b.ToTable("borehole", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.BoreholeCodelist", b => + { + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("id_bho_fk"); + + b.Property("CodelistId") + .HasColumnType("integer") + .HasColumnName("id_cli_fk"); + + b.Property("SchemaName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("code_cli"); + + b.Property("Value") + .IsRequired() + .HasColumnType("text") + .HasColumnName("value_bco"); + + b.HasKey("BoreholeId", "CodelistId"); + + b.HasIndex("CodelistId"); + + b.ToTable("borehole_codelist", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.BoreholeFile", b => + { + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("id_bho_fk"); + + b.Property("FileId") + .HasColumnType("integer") + .HasColumnName("id_fil_fk"); + + b.Property("Attached") + .HasColumnType("timestamp with time zone") + .HasColumnName("attached_bfi"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_bfi"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("created_by_bfi"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description_bfi"); + + b.Property("Public") + .HasColumnType("boolean") + .HasColumnName("public_bfi"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update_bfi"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater_bfi"); + + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.HasKey("BoreholeId", "FileId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("FileId"); + + b.HasIndex("UpdatedById"); + + b.HasIndex("UserId"); + + b.ToTable("borehole_files", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Casing", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CompletionId") + .HasColumnType("integer") + .HasColumnName("completion_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("DateFinish") + .HasColumnType("date") + .HasColumnName("date_finish"); + + b.Property("DateStart") + .HasColumnType("date") + .HasColumnName("date_start"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("from_depth"); + + b.Property("InnerDiameter") + .HasColumnType("double precision") + .HasColumnName("inner_diameter"); + + b.Property("TypeId") + .HasColumnType("integer") + .HasColumnName("kind_id"); + + b.Property("MaterialId") + .HasColumnType("integer") + .HasColumnName("material_id"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes"); + + b.Property("OuterDiameter") + .HasColumnType("double precision") + .HasColumnName("outer_diameter"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("to_depth"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CompletionId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("TypeId"); + + b.HasIndex("MaterialId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("casing", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.ChronostratigraphyLayer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_chr"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChronostratigraphyId") + .HasColumnType("integer") + .HasColumnName("chronostratigraphy_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("is_last"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("id_sty_fk"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("ChronostratigraphyId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("chronostratigraphy", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Codelist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_cli"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Code") + .IsRequired() + .HasColumnType("text") + .HasColumnName("code_cli"); + + b.Property("Conf") + .HasColumnType("text") + .HasColumnName("conf_cli"); + + b.Property("De") + .HasColumnType("text") + .HasColumnName("text_cli_de"); + + b.Property("DescriptionDe") + .HasColumnType("text") + .HasColumnName("description_cli_de"); + + b.Property("DescriptionEn") + .IsRequired() + .HasColumnType("text") + .HasColumnName("description_cli_en"); + + b.Property("DescriptionFr") + .HasColumnType("text") + .HasColumnName("description_cli_fr"); + + b.Property("DescriptionIt") + .HasColumnType("text") + .HasColumnName("description_cli_it"); + + b.Property("DescriptionRo") + .HasColumnType("text") + .HasColumnName("description_cli_ro"); + + b.Property("En") + .IsRequired() + .HasColumnType("text") + .HasColumnName("text_cli_en"); + + b.Property("Fr") + .HasColumnType("text") + .HasColumnName("text_cli_fr"); + + b.Property("Geolcode") + .HasColumnType("integer") + .HasColumnName("geolcode"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("default_cli"); + + b.Property("It") + .HasColumnType("text") + .HasColumnName("text_cli_it"); + + b.Property("Order") + .HasColumnType("integer") + .HasColumnName("order_cli"); + + b.Property("Path") + .HasColumnType("ltree") + .HasColumnName("path_cli"); + + b.Property("Ro") + .HasColumnType("text") + .HasColumnName("text_cli_ro"); + + b.Property("Schema") + .HasColumnType("text") + .HasColumnName("schema_cli"); + + b.HasKey("Id"); + + b.ToTable("codelist", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Completion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AbandonDate") + .HasColumnType("date") + .HasColumnName("abandon_date"); + + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("borehole_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("IsPrimary") + .HasColumnType("boolean") + .HasColumnName("is_primary"); + + b.Property("TypeId") + .HasColumnType("integer") + .HasColumnName("kind_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("BoreholeId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("TypeId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("completion", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Config", b => + { + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name_cfg"); + + b.Property("Value") + .HasColumnType("text") + .HasColumnName("value_cfg"); + + b.HasKey("Name"); + + b.ToTable("config", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Content", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_cnt"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Creation") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_cnt"); + + b.Property("Expired") + .HasColumnType("timestamp with time zone") + .HasColumnName("expired_cnt"); + + b.Property("IsDraft") + .HasColumnType("boolean") + .HasColumnName("draft_cnt"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name_cnt"); + + b.Property("TextDe") + .HasColumnType("text") + .HasColumnName("text_cnt_de"); + + b.Property("TextEn") + .HasColumnType("text") + .HasColumnName("text_cnt_en"); + + b.Property("TextFr") + .HasColumnType("text") + .HasColumnName("text_cnt_fr"); + + b.Property("TextIt") + .HasColumnType("text") + .HasColumnName("text_cnt_it"); + + b.Property("TextRo") + .HasColumnType("text") + .HasColumnName("text_cnt_ro"); + + b.Property("TitelRo") + .HasColumnType("text") + .HasColumnName("title_cnt_ro"); + + b.Property("TitleDe") + .HasColumnType("text") + .HasColumnName("title_cnt_de"); + + b.Property("TitleEn") + .HasColumnType("text") + .HasColumnName("title_cnt_en"); + + b.Property("TitleFr") + .HasColumnType("text") + .HasColumnName("title_cnt_fr"); + + b.Property("TitleIt") + .HasColumnType("text") + .HasColumnName("title_cnt_it"); + + b.HasKey("Id"); + + b.ToTable("contents", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.FaciesDescription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_fac"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("is_last"); + + b.Property("QtDescriptionId") + .HasColumnType("integer") + .HasColumnName("qt_description_id"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("id_sty_fk"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("QtDescriptionId"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("facies_description", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Feedback", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_feb"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_feb"); + + b.Property("IsFrw") + .HasColumnType("boolean") + .HasColumnName("frw_feb"); + + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message_feb"); + + b.Property("Tag") + .HasColumnType("text") + .HasColumnName("tag_feb"); + + b.Property("User") + .IsRequired() + .HasColumnType("text") + .HasColumnName("user_feb"); + + b.HasKey("Id"); + + b.ToTable("feedbacks", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.File", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_fil"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("uploaded_fil"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.Property("Hash") + .IsRequired() + .HasColumnType("text") + .HasColumnName("hash_fil"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name_fil"); + + b.Property("NameUuid") + .HasColumnType("text") + .HasColumnName("name_uuid_fil"); + + b.Property("Type") + .IsRequired() + .HasColumnType("text") + .HasColumnName("type_fil"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("updated_fil"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updated_by_fil"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("UpdatedById"); + + b.ToTable("files", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.HydrotestCodelist", b => + { + b.Property("HydrotestId") + .HasColumnType("integer") + .HasColumnName("id_ht_fk"); + + b.Property("CodelistId") + .HasColumnType("integer") + .HasColumnName("id_cli_fk"); + + b.HasKey("HydrotestId", "CodelistId"); + + b.HasIndex("CodelistId"); + + b.ToTable("hydrotest_codelist", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.HydrotestResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("HydrotestId") + .HasColumnType("integer") + .HasColumnName("hydrotest_id"); + + b.Property("MaxValue") + .HasColumnType("double precision") + .HasColumnName("max_value"); + + b.Property("MinValue") + .HasColumnType("double precision") + .HasColumnName("min_value"); + + b.Property("ParameterId") + .HasColumnType("integer") + .HasColumnName("parameter"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.Property("Value") + .HasColumnType("double precision") + .HasColumnName("value"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("HydrotestId"); + + b.HasIndex("ParameterId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("hydrotest_result", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Instrumentation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CasingId") + .HasColumnType("integer") + .HasColumnName("casing_id"); + + b.Property("CompletionId") + .HasColumnType("integer") + .HasColumnName("completion_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("from_depth"); + + b.Property("TypeId") + .HasColumnType("integer") + .HasColumnName("kind_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes"); + + b.Property("StatusId") + .HasColumnType("integer") + .HasColumnName("status_id"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("to_depth"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CasingId"); + + b.HasIndex("CompletionId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("TypeId"); + + b.HasIndex("StatusId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("instrumentation", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Layer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_lay"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AlterationId") + .HasColumnType("integer") + .HasColumnName("alteration_id_cli"); + + b.Property("CohesionId") + .HasColumnType("integer") + .HasColumnName("cohesion_id_cli"); + + b.Property("CompactnessId") + .HasColumnType("integer") + .HasColumnName("compactness_id_cli"); + + b.Property("ConsistanceId") + .HasColumnType("integer") + .HasColumnName("consistance_id_cli"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_lay"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator_lay"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from_lay"); + + b.Property("GradationId") + .HasColumnType("integer") + .HasColumnName("gradation_id_cli"); + + b.Property("GrainSize1Id") + .HasColumnType("integer") + .HasColumnName("grain_size_1_id_cli"); + + b.Property("GrainSize2Id") + .HasColumnType("integer") + .HasColumnName("grain_size_2_id_cli"); + + b.Property("HumidityId") + .HasColumnType("integer") + .HasColumnName("humidity_id_cli"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("last_lay"); + + b.Property("IsStriae") + .HasColumnType("boolean") + .HasColumnName("striae_lay"); + + b.Property("IsUndefined") + .HasColumnType("boolean") + .HasColumnName("undefined_lay"); + + b.Property("LithologyId") + .HasColumnType("integer") + .HasColumnName("lithology_id_cli"); + + b.Property("LithologyTopBedrockId") + .HasColumnType("integer") + .HasColumnName("lithology_top_bedrock_id_cli"); + + b.Property("LithostratigraphyId") + .HasColumnType("integer") + .HasColumnName("lithostratigraphy_id_cli"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes_lay"); + + b.Property("OriginalLithology") + .HasColumnType("text") + .HasColumnName("original_lithology"); + + b.Property("OriginalUscs") + .HasColumnType("text") + .HasColumnName("uscs_original_lay"); + + b.Property("PlasticityId") + .HasColumnType("integer") + .HasColumnName("plasticity_id_cli"); + + b.Property("QtDescriptionId") + .HasColumnType("integer") + .HasColumnName("qt_description_id_cli"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("id_sty_fk"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to_lay"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update_lay"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater_lay"); + + b.Property("Uscs1Id") + .HasColumnType("integer") + .HasColumnName("uscs_1_id_cli"); + + b.Property("Uscs2Id") + .HasColumnType("integer") + .HasColumnName("uscs_2_id_cli"); + + b.Property("UscsDeterminationId") + .HasColumnType("integer") + .HasColumnName("uscs_determination_id_cli"); + + b.HasKey("Id"); + + b.HasIndex("AlterationId"); + + b.HasIndex("CohesionId"); + + b.HasIndex("CompactnessId"); + + b.HasIndex("ConsistanceId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("GradationId"); + + b.HasIndex("GrainSize1Id"); + + b.HasIndex("GrainSize2Id"); + + b.HasIndex("HumidityId"); + + b.HasIndex("LithologyId"); + + b.HasIndex("LithologyTopBedrockId"); + + b.HasIndex("LithostratigraphyId"); + + b.HasIndex("PlasticityId"); + + b.HasIndex("QtDescriptionId"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.HasIndex("Uscs1Id"); + + b.HasIndex("Uscs2Id"); + + b.HasIndex("UscsDeterminationId"); + + b.ToTable("layer", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.LayerCodelist", b => + { + b.Property("LayerId") + .HasColumnType("integer") + .HasColumnName("id_lay_fk"); + + b.Property("CodelistId") + .HasColumnType("integer") + .HasColumnName("id_cli_fk"); + + b.Property("SchemaName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("code_cli"); + + b.HasKey("LayerId", "CodelistId"); + + b.HasIndex("CodelistId"); + + b.ToTable("layer_codelist", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.LithologicalDescription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_ldp"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("is_last"); + + b.Property("QtDescriptionId") + .HasColumnType("integer") + .HasColumnName("qt_description_id"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("id_sty_fk"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("QtDescriptionId"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("lithological_description", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.LithostratigraphyLayer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("is_last"); + + b.Property("LithostratigraphyId") + .HasColumnType("integer") + .HasColumnName("lithostratigraphy_id"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("stratigraphy_id"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("LithostratigraphyId"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("lithostratigraphy", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Observation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("borehole_id"); + + b.Property("CasingId") + .HasColumnType("integer") + .HasColumnName("casing_id"); + + b.Property("Comment") + .HasColumnType("text") + .HasColumnName("comment"); + + b.Property("CompletionFinished") + .HasColumnType("boolean") + .HasColumnName("completion_finished"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("Duration") + .HasColumnType("double precision") + .HasColumnName("duration"); + + b.Property("EndTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("end_time"); + + b.Property("FromDepthM") + .HasColumnType("double precision") + .HasColumnName("from_depth_m"); + + b.Property("FromDepthMasl") + .HasColumnType("double precision") + .HasColumnName("from_depth_masl"); + + b.Property("ReliabilityId") + .HasColumnType("integer") + .HasColumnName("reliability"); + + b.Property("StartTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("start_time"); + + b.Property("ToDepthM") + .HasColumnType("double precision") + .HasColumnName("to_depth_m"); + + b.Property("ToDepthMasl") + .HasColumnType("double precision") + .HasColumnName("to_depth_masl"); + + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("observation_type"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("BoreholeId"); + + b.HasIndex("CasingId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("ReliabilityId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("observation", "bdms"); + + b.UseTptMappingStrategy(); + }); + + modelBuilder.Entity("BDMS.Models.Stratigraphy", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_sty"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("id_bho_fk"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_sty"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("author_sty"); + + b.Property("Date") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_sty"); + + b.Property("IsPrimary") + .HasColumnType("boolean") + .HasColumnName("primary_sty"); + + b.Property("TypeId") + .HasColumnType("integer") + .HasColumnName("kind_id_cli"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name_sty"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes_sty"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update_sty"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater_sty"); + + b.HasKey("Id"); + + b.HasIndex("BoreholeId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("TypeId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("stratigraphy", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Term", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_tes"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Creation") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_tes"); + + b.Property("Expiration") + .HasColumnType("timestamp with time zone") + .HasColumnName("expired_tes"); + + b.Property("IsDraft") + .HasColumnType("boolean") + .HasColumnName("draft_tes"); + + b.Property("TextDe") + .HasColumnType("text") + .HasColumnName("text_tes_de"); + + b.Property("TextEn") + .IsRequired() + .HasColumnType("text") + .HasColumnName("text_tes_en"); + + b.Property("TextFr") + .HasColumnType("text") + .HasColumnName("text_tes_fr"); + + b.Property("TextIt") + .HasColumnType("text") + .HasColumnName("text_tes_it"); + + b.Property("TextRo") + .HasColumnType("text") + .HasColumnName("text_tes_ro"); + + b.HasKey("Id"); + + b.ToTable("terms", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_usr"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DisabledAt") + .HasColumnType("timestamp with time zone") + .HasColumnName("disabled_usr"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("firstname"); + + b.Property("IsAdmin") + .HasColumnType("boolean") + .HasColumnName("admin_usr"); + + b.Property("IsViewer") + .HasColumnType("boolean") + .HasColumnName("viewer_usr"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("lastname"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("username"); + + b.Property("SubjectId") + .IsRequired() + .HasColumnType("text") + .HasColumnName("subject_id"); + + b.HasKey("Id"); + + b.ToTable("users", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.UserEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_evs"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_evs"); + + b.Property("Payload") + .HasColumnType("jsonb") + .HasColumnName("payload_evs"); + + b.Property("Topic") + .IsRequired() + .HasColumnType("text") + .HasColumnName("topic_evs"); + + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("events", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.UserWorkgroupRole", b => + { + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.Property("WorkgroupId") + .HasColumnType("integer") + .HasColumnName("id_wgp_fk"); + + b.Property("Role") + .HasColumnType("int") + .HasColumnName("id_rol_fk"); + + b.HasKey("UserId", "WorkgroupId", "Role"); + + b.ToTable("users_roles", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Workflow", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_wkf"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("id_bho_fk"); + + b.Property("Finished") + .HasColumnType("timestamp with time zone") + .HasColumnName("finished_wkf"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes_wkf"); + + b.Property("Role") + .HasColumnType("integer") + .HasColumnName("id_rol_fk"); + + b.Property("Started") + .HasColumnType("timestamp with time zone") + .HasColumnName("started_wkf"); + + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.HasKey("Id"); + + b.HasIndex("BoreholeId"); + + b.HasIndex("UserId"); + + b.ToTable("workflow", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Workgroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_wgp"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_wgp"); + + b.Property("Disabled") + .HasColumnType("timestamp with time zone") + .HasColumnName("disabled_wgp"); + + b.Property("IsSupplier") + .HasColumnType("boolean") + .HasColumnName("supplier_wgp"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name_wgp"); + + b.Property("Settings") + .HasColumnType("json") + .HasColumnName("settings_wgp"); + + b.HasKey("Id"); + + b.ToTable("workgroups", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.FieldMeasurement", b => + { + b.HasBaseType("BDMS.Models.Observation"); + + b.Property("ParameterId") + .HasColumnType("integer") + .HasColumnName("parameter"); + + b.Property("SampleTypeId") + .HasColumnType("integer") + .HasColumnName("sample_type"); + + b.Property("Value") + .HasColumnType("double precision") + .HasColumnName("value"); + + b.HasIndex("ParameterId"); + + b.HasIndex("SampleTypeId"); + + b.ToTable("field_measurement", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.GroundwaterLevelMeasurement", b => + { + b.HasBaseType("BDMS.Models.Observation"); + + b.Property("TypeId") + .HasColumnType("integer") + .HasColumnName("kind"); + + b.Property("LevelM") + .HasColumnType("double precision") + .HasColumnName("level_m"); + + b.Property("LevelMasl") + .HasColumnType("double precision") + .HasColumnName("level_masl"); + + b.HasIndex("TypeId"); + + b.ToTable("groundwater_level_measurement", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Hydrotest", b => + { + b.HasBaseType("BDMS.Models.Observation"); + + b.ToTable("hydrotest", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.WaterIngress", b => + { + b.HasBaseType("BDMS.Models.Observation"); + + b.Property("ConditionsId") + .HasColumnType("integer") + .HasColumnName("conditions"); + + b.Property("QuantityId") + .HasColumnType("integer") + .HasColumnName("quantity"); + + b.HasIndex("ConditionsId"); + + b.HasIndex("QuantityId"); + + b.ToTable("water_ingress", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Backfill", b => + { + b.HasOne("BDMS.Models.Completion", "Completion") + .WithMany("Backfills") + .HasForeignKey("CompletionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("TypeId"); + + b.HasOne("BDMS.Models.Codelist", "Material") + .WithMany() + .HasForeignKey("MaterialId"); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Completion"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("Material"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Borehole", b => + { + b.HasOne("BDMS.Models.Codelist", "Chronostratigraphy") + .WithMany() + .HasForeignKey("ChronostratigraphyId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Cuttings") + .WithMany() + .HasForeignKey("CuttingsId"); + + b.HasOne("BDMS.Models.Codelist", "DrillingMethod") + .WithMany() + .HasForeignKey("DrillingMethodId"); + + b.HasOne("BDMS.Models.Codelist", "Hrs") + .WithMany() + .HasForeignKey("HrsId"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("TypeId"); + + b.HasOne("BDMS.Models.Codelist", "LithologyTopBedrock") + .WithMany() + .HasForeignKey("LithologyTopBedrockId"); + + b.HasOne("BDMS.Models.Codelist", "Lithostratigraphy") + .WithMany() + .HasForeignKey("LithostratigraphyId"); + + b.HasOne("BDMS.Models.User", "LockedBy") + .WithMany() + .HasForeignKey("LockedById"); + + b.HasOne("BDMS.Models.Codelist", "Purpose") + .WithMany() + .HasForeignKey("PurposeId"); + + b.HasOne("BDMS.Models.Codelist", "QtDepth") + .WithMany() + .HasForeignKey("QtDepthId"); + + b.HasOne("BDMS.Models.Codelist", "QtElevation") + .WithMany() + .HasForeignKey("QtElevationId"); + + b.HasOne("BDMS.Models.Codelist", "QtInclinationDirection") + .WithMany() + .HasForeignKey("QtInclinationDirectionId"); + + b.HasOne("BDMS.Models.Codelist", "QtLocation") + .WithMany() + .HasForeignKey("QtLocationId"); + + b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") + .WithMany() + .HasForeignKey("QtReferenceElevationId"); + + b.HasOne("BDMS.Models.Codelist", "QtTotalDepthTvd") + .WithMany() + .HasForeignKey("QtTotalDepthTvdId"); + + b.HasOne("BDMS.Models.Codelist", "ReferenceElevationType") + .WithMany() + .HasForeignKey("ReferenceElevationTypeId"); + + b.HasOne("BDMS.Models.Codelist", "Restriction") + .WithMany() + .HasForeignKey("RestrictionId"); + + b.HasOne("BDMS.Models.Codelist", "Status") + .WithMany() + .HasForeignKey("StatusId"); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.HasOne("BDMS.Models.Workgroup", "Workgroup") + .WithMany("Boreholes") + .HasForeignKey("WorkgroupId"); + + b.Navigation("Chronostratigraphy"); + + b.Navigation("CreatedBy"); + + b.Navigation("Cuttings"); + + b.Navigation("DrillingMethod"); + + b.Navigation("Hrs"); + + b.Navigation("Kind"); + + b.Navigation("LithologyTopBedrock"); + + b.Navigation("Lithostratigraphy"); + + b.Navigation("LockedBy"); + + b.Navigation("Purpose"); + + b.Navigation("QtDepth"); + + b.Navigation("QtElevation"); + + b.Navigation("QtInclinationDirection"); + + b.Navigation("QtLocation"); + + b.Navigation("QtReferenceElevation"); + + b.Navigation("QtTotalDepthTvd"); + + b.Navigation("ReferenceElevationType"); + + b.Navigation("Restriction"); + + b.Navigation("Status"); + + b.Navigation("UpdatedBy"); + + b.Navigation("Workgroup"); + }); + + modelBuilder.Entity("BDMS.Models.BoreholeCodelist", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("BoreholeCodelists") + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Codelist") + .WithMany("BoreholeCodelists") + .HasForeignKey("CodelistId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Borehole"); + + b.Navigation("Codelist"); + }); + + modelBuilder.Entity("BDMS.Models.BoreholeFile", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("BoreholeFiles") + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.File", "File") + .WithMany("BoreholeFiles") + .HasForeignKey("FileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.HasOne("BDMS.Models.User", "User") + .WithMany() + .HasForeignKey("UserId"); + + b.Navigation("Borehole"); + + b.Navigation("CreatedBy"); + + b.Navigation("File"); + + b.Navigation("UpdatedBy"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("BDMS.Models.Casing", b => + { + b.HasOne("BDMS.Models.Completion", "Completion") + .WithMany("Casings") + .HasForeignKey("CompletionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("TypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Material") + .WithMany() + .HasForeignKey("MaterialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Completion"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("Material"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.ChronostratigraphyLayer", b => + { + b.HasOne("BDMS.Models.Codelist", "Chronostratigraphy") + .WithMany() + .HasForeignKey("ChronostratigraphyId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("ChronostratigraphyLayers") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Chronostratigraphy"); + + b.Navigation("CreatedBy"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Completion", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("Completions") + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("TypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Borehole"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.FaciesDescription", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "QtDescription") + .WithMany() + .HasForeignKey("QtDescriptionId"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("FaciesDescriptions") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("QtDescription"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.File", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.HydrotestCodelist", b => + { + b.HasOne("BDMS.Models.Codelist", "Codelist") + .WithMany("HydrotestCodelists") + .HasForeignKey("CodelistId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Hydrotest", "Hydrotest") + .WithMany("HydrotestCodelists") + .HasForeignKey("HydrotestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Codelist"); + + b.Navigation("Hydrotest"); + }); + + modelBuilder.Entity("BDMS.Models.HydrotestResult", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Hydrotest", "Hydrotest") + .WithMany("HydrotestResults") + .HasForeignKey("HydrotestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Parameter") + .WithMany() + .HasForeignKey("ParameterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("Hydrotest"); + + b.Navigation("Parameter"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Instrumentation", b => + { + b.HasOne("BDMS.Models.Casing", "Casing") + .WithMany("Instrumentations") + .HasForeignKey("CasingId"); + + b.HasOne("BDMS.Models.Completion", "Completion") + .WithMany("Instrumentations") + .HasForeignKey("CompletionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("TypeId"); + + b.HasOne("BDMS.Models.Codelist", "Status") + .WithMany() + .HasForeignKey("StatusId"); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Casing"); + + b.Navigation("Completion"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("Status"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Layer", b => + { + b.HasOne("BDMS.Models.Codelist", "Alteration") + .WithMany() + .HasForeignKey("AlterationId"); + + b.HasOne("BDMS.Models.Codelist", "Cohesion") + .WithMany() + .HasForeignKey("CohesionId"); + + b.HasOne("BDMS.Models.Codelist", "Compactness") + .WithMany() + .HasForeignKey("CompactnessId"); + + b.HasOne("BDMS.Models.Codelist", "Consistance") + .WithMany() + .HasForeignKey("ConsistanceId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Gradation") + .WithMany() + .HasForeignKey("GradationId"); + + b.HasOne("BDMS.Models.Codelist", "GrainSize1") + .WithMany() + .HasForeignKey("GrainSize1Id"); + + b.HasOne("BDMS.Models.Codelist", "GrainSize2") + .WithMany() + .HasForeignKey("GrainSize2Id"); + + b.HasOne("BDMS.Models.Codelist", "Humidity") + .WithMany() + .HasForeignKey("HumidityId"); + + b.HasOne("BDMS.Models.Codelist", "Lithology") + .WithMany() + .HasForeignKey("LithologyId"); + + b.HasOne("BDMS.Models.Codelist", "LithologyTopBedrock") + .WithMany() + .HasForeignKey("LithologyTopBedrockId"); + + b.HasOne("BDMS.Models.Codelist", "Lithostratigraphy") + .WithMany() + .HasForeignKey("LithostratigraphyId"); + + b.HasOne("BDMS.Models.Codelist", "Plasticity") + .WithMany() + .HasForeignKey("PlasticityId"); + + b.HasOne("BDMS.Models.Codelist", "QtDescription") + .WithMany() + .HasForeignKey("QtDescriptionId"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("Layers") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.HasOne("BDMS.Models.Codelist", "Uscs1") + .WithMany() + .HasForeignKey("Uscs1Id"); + + b.HasOne("BDMS.Models.Codelist", "Uscs2") + .WithMany() + .HasForeignKey("Uscs2Id"); + + b.HasOne("BDMS.Models.Codelist", "UscsDetermination") + .WithMany() + .HasForeignKey("UscsDeterminationId"); + + b.Navigation("Alteration"); + + b.Navigation("Cohesion"); + + b.Navigation("Compactness"); + + b.Navigation("Consistance"); + + b.Navigation("CreatedBy"); + + b.Navigation("Gradation"); + + b.Navigation("GrainSize1"); + + b.Navigation("GrainSize2"); + + b.Navigation("Humidity"); + + b.Navigation("Lithology"); + + b.Navigation("LithologyTopBedrock"); + + b.Navigation("Lithostratigraphy"); + + b.Navigation("Plasticity"); + + b.Navigation("QtDescription"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + + b.Navigation("Uscs1"); + + b.Navigation("Uscs2"); + + b.Navigation("UscsDetermination"); + }); + + modelBuilder.Entity("BDMS.Models.LayerCodelist", b => + { + b.HasOne("BDMS.Models.Codelist", "Codelist") + .WithMany("LayerCodelists") + .HasForeignKey("CodelistId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Layer", "Layer") + .WithMany("LayerCodelists") + .HasForeignKey("LayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Codelist"); + + b.Navigation("Layer"); + }); + + modelBuilder.Entity("BDMS.Models.LithologicalDescription", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "QtDescription") + .WithMany() + .HasForeignKey("QtDescriptionId"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("LithologicalDescriptions") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("QtDescription"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.LithostratigraphyLayer", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Lithostratigraphy") + .WithMany() + .HasForeignKey("LithostratigraphyId"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("LithostratigraphyLayers") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("Lithostratigraphy"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Observation", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany() + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Casing", "Casing") + .WithMany("Observations") + .HasForeignKey("CasingId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Reliability") + .WithMany() + .HasForeignKey("ReliabilityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Borehole"); + + b.Navigation("Casing"); + + b.Navigation("CreatedBy"); + + b.Navigation("Reliability"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Stratigraphy", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("Stratigraphies") + .HasForeignKey("BoreholeId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("TypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Borehole"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.UserEvent", b => + { + b.HasOne("BDMS.Models.User", "User") + .WithMany("BoringEvents") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("BDMS.Models.UserWorkgroupRole", b => + { + b.HasOne("BDMS.Models.User", null) + .WithMany("WorkgroupRoles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("BDMS.Models.Workflow", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("Workflows") + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Borehole"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("BDMS.Models.FieldMeasurement", b => + { + b.HasOne("BDMS.Models.Observation", null) + .WithOne() + .HasForeignKey("BDMS.Models.FieldMeasurement", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Parameter") + .WithMany() + .HasForeignKey("ParameterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "SampleType") + .WithMany() + .HasForeignKey("SampleTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Parameter"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("BDMS.Models.GroundwaterLevelMeasurement", b => + { + b.HasOne("BDMS.Models.Observation", null) + .WithOne() + .HasForeignKey("BDMS.Models.GroundwaterLevelMeasurement", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("TypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Kind"); + }); + + modelBuilder.Entity("BDMS.Models.Hydrotest", b => + { + b.HasOne("BDMS.Models.Observation", null) + .WithOne() + .HasForeignKey("BDMS.Models.Hydrotest", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("BDMS.Models.WaterIngress", b => + { + b.HasOne("BDMS.Models.Codelist", "Conditions") + .WithMany() + .HasForeignKey("ConditionsId"); + + b.HasOne("BDMS.Models.Observation", null) + .WithOne() + .HasForeignKey("BDMS.Models.WaterIngress", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Quantity") + .WithMany() + .HasForeignKey("QuantityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Conditions"); + + b.Navigation("Quantity"); + }); + + modelBuilder.Entity("BDMS.Models.Borehole", b => + { + b.Navigation("BoreholeCodelists"); + + b.Navigation("BoreholeFiles"); + + b.Navigation("Completions"); + + b.Navigation("Stratigraphies"); + + b.Navigation("Workflows"); + }); + + modelBuilder.Entity("BDMS.Models.Casing", b => + { + b.Navigation("Instrumentations"); + + b.Navigation("Observations"); + }); + + modelBuilder.Entity("BDMS.Models.Codelist", b => + { + b.Navigation("BoreholeCodelists"); + + b.Navigation("HydrotestCodelists"); + + b.Navigation("LayerCodelists"); + }); + + modelBuilder.Entity("BDMS.Models.Completion", b => + { + b.Navigation("Backfills"); + + b.Navigation("Casings"); + + b.Navigation("Instrumentations"); + }); + + modelBuilder.Entity("BDMS.Models.File", b => + { + b.Navigation("BoreholeFiles"); + }); + + modelBuilder.Entity("BDMS.Models.Layer", b => + { + b.Navigation("LayerCodelists"); + }); + + modelBuilder.Entity("BDMS.Models.Stratigraphy", b => + { + b.Navigation("ChronostratigraphyLayers"); + + b.Navigation("FaciesDescriptions"); + + b.Navigation("Layers"); + + b.Navigation("LithologicalDescriptions"); + + b.Navigation("LithostratigraphyLayers"); + }); + + modelBuilder.Entity("BDMS.Models.User", b => + { + b.Navigation("BoringEvents"); + + b.Navigation("WorkgroupRoles"); + }); + + modelBuilder.Entity("BDMS.Models.Workgroup", b => + { + b.Navigation("Boreholes"); + }); + + modelBuilder.Entity("BDMS.Models.Hydrotest", b => + { + b.Navigation("HydrotestCodelists"); + + b.Navigation("HydrotestResults"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/api/Migrations/20240212111401_RenameCodelists.cs b/src/api/Migrations/20240212111401_RenameCodelists.cs new file mode 100644 index 000000000..56300f1aa --- /dev/null +++ b/src/api/Migrations/20240212111401_RenameCodelists.cs @@ -0,0 +1,25 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BDMS.Migrations; + +/// +public partial class RenameCodelists : Migration +{ + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.Sql(@" + UPDATE bdms.codelist SET schema_cli = 'casing_type' WHERE schema_cli = 'casi200'; + UPDATE bdms.codelist SET schema_cli = 'casing_material' WHERE schema_cli = 'casi201'; + UPDATE bdms.codelist SET schema_cli = 'borehole_cuttings_core' WHERE schema_cli = 'custom.cuttings'; + UPDATE bdms.codelist SET schema_cli = 'drilling_purpose' WHERE schema_cli = 'extended.purpose'; + UPDATE bdms.codelist SET schema_cli = 'borehole_status' WHERE schema_cli = 'extended.status'; + UPDATE bdms.codelist SET schema_cli = 'drilling_method' WHERE schema_cli = 'extended.drilling_method'; + UPDATE bdms.codelist SET schema_cli = 'depth_precision' WHERE schema_cli = 'custom.qt_top_bedrock'; + UPDATE bdms.codelist SET schema_cli = 'inclination_precision' WHERE schema_cli = 'custom.qt_bore_inc_dir'; + UPDATE bdms.codelist SET schema_cli = 'backfill_type' WHERE schema_cli = 'fill100'; + UPDATE bdms.codelist SET schema_cli = 'backfill_material' WHERE schema_cli = 'fill200';"); + } +} diff --git a/src/api/Models/CompletionSchemas.cs b/src/api/Models/CompletionSchemas.cs index ac8f5b0d4..3f41c6cd3 100644 --- a/src/api/Models/CompletionSchemas.cs +++ b/src/api/Models/CompletionSchemas.cs @@ -8,8 +8,8 @@ public static class CompletionSchemas public const string CompletionKindSchema = "completion_kind"; public const string InstrumentationKindSchema = "inst100"; public const string InstrumentationStatusSchema = "inst101"; - public const string BackfillKindSchema = "fill100"; - public const string BackfillMaterialSchema = "fill200"; - public const string CasingKindSchema = "casi200"; - public const string CasingMaterialSchema = "casi201"; + public const string BackfillTypeSchema = "backfill_type"; + public const string BackfillMaterialSchema = "backfill_material"; + public const string CasingTypeSchema = "casing_type"; + public const string CasingMaterialSchema = "casing_material"; } diff --git a/src/client/cypress/e2e/codeList.cy.js b/src/client/cypress/e2e/codeList.cy.js index efe91faa3..4157032a3 100644 --- a/src/client/cypress/e2e/codeList.cy.js +++ b/src/client/cypress/e2e/codeList.cy.js @@ -1,4 +1,7 @@ -import { loginAsAdmin, loginAsEditorInViewerMode } from "../e2e/helpers/testHelpers"; +import { + loginAsAdmin, + loginAsEditorInViewerMode, +} from "../e2e/helpers/testHelpers"; describe("Codelist translations tests", () => { it("Admin can open codelist translation section", () => { @@ -95,10 +98,14 @@ describe("Codelist translations tests", () => { .find("button") .click(); - cy.contains("p", "custom.cuttings").click(); - cy.get("div[name='custom.cuttings']").children().should("have.length", 5); - cy.get("div[name='custom.cuttings']").first().should("contain", 1); - cy.get("div[name='custom.cuttings']").first().should("contain", "Bohrkern"); + cy.contains("p", "borehole_cuttings_core").click(); + cy.get("div[name='borehole_cuttings_core']") + .children() + .should("have.length", 5); + cy.get("div[name='borehole_cuttings_core']").first().should("contain", 1); + cy.get("div[name='borehole_cuttings_core']") + .first() + .should("contain", "Bohrkern"); // click on record. cy.contains("div", "Bohrkern").click(); @@ -110,17 +117,22 @@ describe("Codelist translations tests", () => { cy.get("input[name=order-input]").click().clear().type("6"); cy.contains("button", "Save").click(); - cy.get("div[name='custom.cuttings']").children().should("have.length", 5); - cy.get("div[name='custom.cuttings']") + cy.get("div[name='borehole_cuttings_core']") + .children() + .should("have.length", 5); + cy.get("div[name='borehole_cuttings_core']") .children() .first() .should("contain", 2); - cy.get("div[name='custom.cuttings']") + cy.get("div[name='borehole_cuttings_core']") .children() .first() .should("contain", "Bohrklein"); - cy.get("div[name='custom.cuttings']").children().eq(4).should("contain", 6); - cy.get("div[name='custom.cuttings']") + cy.get("div[name='borehole_cuttings_core']") + .children() + .eq(4) + .should("contain", 6); + cy.get("div[name='borehole_cuttings_core']") .children() .eq(4) .should("contain", "Bohrkern"); @@ -130,6 +142,6 @@ describe("Codelist translations tests", () => { cy.contains("button", "Save").click(); // order was updated - cy.get("div[name='custom.cuttings']").first().should("contain", 1); + cy.get("div[name='borehole_cuttings_core']").first().should("contain", 1); }); }); diff --git a/src/client/src/commons/detail/detailsComponent.js b/src/client/src/commons/detail/detailsComponent.js index b29148623..5045c7292 100644 --- a/src/client/src/commons/detail/detailsComponent.js +++ b/src/client/src/commons/detail/detailsComponent.js @@ -148,8 +148,8 @@ class DetailsComponent extends React.Component { fontSize: "1.1em", }}>
{this.getDomainRow("kind", data.kind)} {this.getDomainRow( - "extended.purpose", - data.extended.purpose, + "drilling_purpose", + data.drilling_purpose, "purpose", )} {this.getTextRow("spud_date", data.spud_date)} @@ -331,27 +331,27 @@ class MetaComponent extends React.Component { data.inclination !== null ? data.inclination : null, )} {this.getDomainRow( - "custom.qt_bore_inc_dir", - data.custom.qt_bore_inc_dir, + "inclination_precision", + data.inclination_precision, "qt_bore_inc_dir", )}
{this.getDomainRow( - "extended.drilling_method", - data.extended.drilling_method, + "drilling_method", + data.drilling_method, "drilling_method", )} {this.getDomainRow( - "custom.cuttings", - data.custom.cuttings, + "borehole_cuttings_core", + data.borehole_cuttings_core, "cuttings", )} {this.getTextRow("drilling_end_date", data.drilling_date)} {this.getDomainRow( - "extended.status", - data.extended.status, + "borehole_status", + data.borehole_status, "boreholestatus", )} {this.getTextRow( @@ -402,20 +402,18 @@ class MetaComponent extends React.Component {
{this.getDomainRow( - "custom.qt_top_bedrock", + "depth_precision", data.custom.qt_depth, "qt_depth", )} {this.getDomainRow( - "custom.qt_top_bedrock", + "depth_precision", data.qt_total_depth_tvd, "total_depth_tvd_qt", )} {this.getNumericTextRow( "qt_top_bedrock", - data.custom.qt_top_bedrock !== null - ? data.custom.qt_top_bedrock - : null, + data.depth_precision !== null ? data.depth_precision : null, )} {this.getNumericTextRow( "top_bedrock_tvd_qt", diff --git a/src/client/src/commons/form/borehole/completion/backfillInput.js b/src/client/src/commons/form/borehole/completion/backfillInput.js index 639e65732..7b47f9fac 100644 --- a/src/client/src/commons/form/borehole/completion/backfillInput.js +++ b/src/client/src/commons/form/borehole/completion/backfillInput.js @@ -79,7 +79,7 @@ const BackfillInput = ({ required={true} values={domains?.data ?.filter( - d => d.schema === completionSchemaConstants.backfillKind, + d => d.schema === completionSchemaConstants.backfillType, ) .sort((a, b) => a.order - b.order) .map(d => ({ diff --git a/src/client/src/commons/form/borehole/completion/casingInput.js b/src/client/src/commons/form/borehole/completion/casingInput.js index 63a01ee0f..08323cb59 100644 --- a/src/client/src/commons/form/borehole/completion/casingInput.js +++ b/src/client/src/commons/form/borehole/completion/casingInput.js @@ -91,7 +91,7 @@ const CasingInput = ({ required={true} values={domains?.data ?.filter( - d => d.schema === completionSchemaConstants.casingKind, + d => d.schema === completionSchemaConstants.casingType, ) .sort((a, b) => a.order - b.order) .map(d => ({ diff --git a/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js b/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js index 4caea1f7d..1c4e0bc02 100644 --- a/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js +++ b/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js @@ -2,8 +2,8 @@ export const completionSchemaConstants = { completionKind: "completion_kind", instrumentationKind: "inst100", instrumentationStatus: "inst101", - backfillKind: "fill100", - backfillMaterial: "fill200", - casingKind: "casi200", - casingMaterial: "casi201", + backfillType: "backfill_type", + backfillMaterial: "backfill_material", + casingType: "casing_type", + casingMaterial: "casing_material", }; diff --git a/src/client/src/commons/form/borehole/segments/boreholeDetailSegment.js b/src/client/src/commons/form/borehole/segments/boreholeDetailSegment.js index ec7f4b0f7..8499dc524 100644 --- a/src/client/src/commons/form/borehole/segments/boreholeDetailSegment.js +++ b/src/client/src/commons/form/borehole/segments/boreholeDetailSegment.js @@ -48,7 +48,7 @@ const BoreholeDetailSegment = props => { onSelected={selected => { updateChange("custom.qt_depth", selected.id, false); }} - schema="custom.qt_top_bedrock" + schema="depth_precision" selected={borehole.data.custom.qt_depth} readOnly={!isEditable} /> @@ -88,7 +88,7 @@ const BoreholeDetailSegment = props => { onSelected={selected => { updateChange("qt_total_depth_tvd", selected.id, false); }} - schema="custom.qt_top_bedrock" + schema="depth_precision" selected={borehole.data.qt_total_depth_tvd} readOnly={!isEditable} /> @@ -129,12 +129,12 @@ const BoreholeDetailSegment = props => { autoCorrect="off" onChange={e => { updateNumber( - "custom.qt_top_bedrock", + "depth_precision", e.target.value === "" ? null : parseIfString(e.target.value), ); }} spellCheck="false" - value={borehole.data.custom.qt_top_bedrock} + value={borehole.data.depth_precision} thousandSeparator="'" readOnly={!isEditable} /> diff --git a/src/client/src/commons/form/borehole/segments/boreholeGeneralSegment.js b/src/client/src/commons/form/borehole/segments/boreholeGeneralSegment.js index dcab19aae..e81d9f488 100644 --- a/src/client/src/commons/form/borehole/segments/boreholeGeneralSegment.js +++ b/src/client/src/commons/form/borehole/segments/boreholeGeneralSegment.js @@ -45,14 +45,10 @@ const BoreholeGeneralSegment = props => { { - updateChange( - "extended.drilling_method", - selected.id, - false, - ); + updateChange("drilling_method", selected.id, false); }} - schema="extended.drilling_method" - selected={borehole.data.extended.drilling_method} + schema="drilling_method" + selected={borehole.data.drilling_method} readOnly={!isEditable} /> @@ -62,10 +58,10 @@ const BoreholeGeneralSegment = props => { { - updateChange("extended.purpose", selected.id, false); + updateChange("drilling_purpose", selected.id, false); }} - schema="extended.purpose" - selected={borehole.data.extended.purpose} + schema="drilling_purpose" + selected={borehole.data.drilling_purpose} readOnly={!isEditable} /> @@ -83,10 +79,14 @@ const BoreholeGeneralSegment = props => { { - updateChange("custom.cuttings", selected.id, false); + updateChange( + "borehole_cuttings_core", + selected.id, + false, + ); }} - schema="custom.cuttings" - selected={borehole.data.custom.cuttings} + schema="borehole_cuttings_core" + selected={borehole.data.borehole_cuttings_core} readOnly={!isEditable} /> @@ -177,10 +177,10 @@ const BoreholeGeneralSegment = props => { { - updateChange("extended.status", selected.id, false); + updateChange("borehole_status", selected.id, false); }} - schema="extended.status" - selected={borehole.data.extended.status} + schema="borehole_status" + selected={borehole.data.borehole_status} readOnly={!isEditable} /> @@ -238,10 +238,10 @@ const BoreholeGeneralSegment = props => { { - updateChange("custom.qt_bore_inc_dir", selected.id, false); + updateChange("inclination_precision", selected.id, false); }} - schema="custom.qt_bore_inc_dir" - selected={borehole.data.custom.qt_bore_inc_dir} + schema="inclination_precision" + selected={borehole.data.inclination_precision} readOnly={!isEditable} /> diff --git a/src/client/src/commons/form/multiple/multipleForm.js b/src/client/src/commons/form/multiple/multipleForm.js index 51957c827..6b8107757 100644 --- a/src/client/src/commons/form/multiple/multipleForm.js +++ b/src/client/src/commons/form/multiple/multipleForm.js @@ -55,22 +55,22 @@ class MultipleForm extends React.Component { value: null, }, kind: { api: "kind", value: null }, - drilling_method: { api: "extended.drilling_method", value: null }, - purpose: { api: "extended.purpose", value: null }, - cuttings: { api: "custom.cuttings", value: null }, + drilling_method: { api: "drilling_method", value: null }, + purpose: { api: "drilling_purpose", value: null }, + cuttings: { api: "borehole_cuttings_core", value: null }, spud_date: { api: "spud_date", value: null }, drilling_end_date: { api: "drilling_date", value: null }, drill_diameter: { api: "custom.drill_diameter", value: null }, - boreholestatus: { api: "extended.status", value: null }, + boreholestatus: { api: "borehole_status", value: null }, inclination: { api: "inclination", value: null }, inclination_direction: { api: "inclination_direction", value: null }, - qt_bore_inc_dir: { api: "custom.qt_bore_inc_dir", value: null }, + qt_bore_inc_dir: { api: "inclination_precision", value: null }, totaldepth: { api: "total_depth", value: null }, - qt_depth: { api: "custom.qt_top_bedrock", value: null }, + qt_depth: { api: "depth_precision", value: null }, total_depth_tvd: { api: "total_depth_tvd", value: null }, total_depth_tvd_qt: { api: "qt_total_depth_tvd", value: null }, top_bedrock: { api: "extended.top_bedrock", value: null }, - qt_top_bedrock: { api: "custom.qt_top_bedrock", value: null }, + qt_top_bedrock: { api: "depth_precision", value: null }, top_bedrock_tvd: { api: "extended.top_bedrock_tvd", value: null }, top_bedrock_tvd_qt: { api: "custom.qt_top_bedrock_tvd", value: null }, groundwater: { api: "extended.groundwater", value: null }, @@ -439,7 +439,7 @@ class MultipleForm extends React.Component { ])} {this.getGroup([ this.getInput("total_depth_tvd", "number"), - this.getDomain("total_depth_tvd_qt", "custom.qt_top_bedrock"), + this.getDomain("total_depth_tvd_qt", "depth_precision"), ])} {this.getGroup([ this.getInput("top_bedrock", "number"), @@ -447,7 +447,7 @@ class MultipleForm extends React.Component { ])} {this.getGroup([ this.getInput("top_bedrock_tvd", "number"), - this.getDomain("top_bedrock_tvd_qt", "custom.qt_top_bedrock"), + this.getDomain("top_bedrock_tvd_qt", "depth_precision"), ])} {this.getRadio("groundwater")} {this.getDomain( diff --git a/src/client/src/commons/search/data/boreholeSearchData.js b/src/client/src/commons/search/data/boreholeSearchData.js index 628c5c230..6dacaba7f 100644 --- a/src/client/src/commons/search/data/boreholeSearchData.js +++ b/src/client/src/commons/search/data/boreholeSearchData.js @@ -16,7 +16,7 @@ export const boreholeSearchData = [ type: "Dropdown", label: "drilling_method", value: "method", - schema: "extended.drilling_method", + schema: "drilling_method", multiple: false, search: false, isVisibleValue: "extended.method", @@ -26,20 +26,20 @@ export const boreholeSearchData = [ type: "Dropdown", label: "purpose", value: "purpose", - schema: "extended.purpose", + schema: "drilling_purpose", multiple: false, search: false, - isVisibleValue: "extended.purpose", + isVisibleValue: "drilling_purpose", }, { id: 3, type: "Dropdown", label: "cuttings", value: "cuttings", - schema: "custom.cuttings", + schema: "borehole_cuttings_core", multiple: false, search: false, - isVisibleValue: "custom.cuttings", + isVisibleValue: "borehole_cuttings_core", }, { id: 4, @@ -104,10 +104,10 @@ export const boreholeSearchData = [ type: "Dropdown", label: "boreholestatus", value: "status", - schema: "extended.status", + schema: "borehole_status", multiple: false, search: false, - isVisibleValue: "extended.status", + isVisibleValue: "borehole_status", }, { id: 11, @@ -160,7 +160,7 @@ export const boreholeSearchData = [ type: "Dropdown", label: "qt_bore_inc_dir", value: "qt_inclination_direction", - schema: "custom.qt_bore_inc_dir", + schema: "inclination_precision", multiple: false, search: false, isVisibleValue: "qt_bore_inc_dir", @@ -258,7 +258,7 @@ export const boreholeSearchData = [ type: "Dropdown", label: "qt_depth", value: "qt_depth", - schema: "custom.qt_top_bedrock", + schema: "depth_precision", multiple: false, search: false, isVisibleValue: "qt_depth", @@ -268,7 +268,7 @@ export const boreholeSearchData = [ type: "Dropdown", label: "total_depth_tvd_qt", value: "qt_total_depth_tvd", - schema: "custom.qt_top_bedrock", + schema: "depth_precision", multiple: false, search: false, isVisibleValue: "total_depth_tvd_qt", diff --git a/src/client/src/commons/table/boreholeEditorTable.js b/src/client/src/commons/table/boreholeEditorTable.js index 7d18b6660..e8739f7d4 100644 --- a/src/client/src/commons/table/boreholeEditorTable.js +++ b/src/client/src/commons/table/boreholeEditorTable.js @@ -322,7 +322,7 @@ class BoreholeEditorTable extends TTable { , - + , {_.isNil(item.total_depth) ? null : ( diff --git a/src/client/src/commons/table/boreholeTable.js b/src/client/src/commons/table/boreholeTable.js index 97943180e..be1bf5c66 100644 --- a/src/client/src/commons/table/boreholeTable.js +++ b/src/client/src/commons/table/boreholeTable.js @@ -190,12 +190,12 @@ class BoreholeTable extends TableComponent { color: "#787878", fontSize: "0.8em", }}> - {_.isNil(item.extended.purpose) ? null : ( + {_.isNil(item.drilling_purpose) ? null : ( ( ) diff --git a/src/client/src/pages/settings/data/boreholeEditorData.js b/src/client/src/pages/settings/data/boreholeEditorData.js index b103852e7..55f9957c6 100644 --- a/src/client/src/pages/settings/data/boreholeEditorData.js +++ b/src/client/src/pages/settings/data/boreholeEditorData.js @@ -12,12 +12,12 @@ export const boreholeEditorData = [ { id: 2, label: "purpose", - value: "extended.purpose", + value: "drilling_purpose", }, { id: 3, label: "cuttings", - value: "custom.cuttings", + value: "borehole_cuttings_core", }, { id: 4, @@ -37,7 +37,7 @@ export const boreholeEditorData = [ { id: 7, label: "boreholestatus", - value: "extended.status", + value: "borehole_status", }, { id: 8, diff --git a/tests/Controllers/BackfillControllerTest.cs b/tests/Controllers/BackfillControllerTest.cs index ac5500a34..74421e42f 100644 --- a/tests/Controllers/BackfillControllerTest.cs +++ b/tests/Controllers/BackfillControllerTest.cs @@ -68,7 +68,7 @@ public async Task CreateAsync() { CompletionId = completionId, MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id, - KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id, + KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id, Notes = "ARGONSHIP", FromDepth = 0, ToDepth = 100, @@ -84,7 +84,7 @@ public async Task CreateAsync() Assert.AreEqual(0, backfill.FromDepth); Assert.AreEqual(100, backfill.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id, backfill.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id, backfill.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id, backfill.KindId); } [TestMethod] @@ -94,7 +94,7 @@ public async Task EditAsync() var completionId = backfill.CompletionId; backfill.MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id; - backfill.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id; + backfill.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id; backfill.Notes = "COLLAR"; backfill.FromDepth = 50; backfill.ToDepth = 200; @@ -109,7 +109,7 @@ public async Task EditAsync() Assert.AreEqual(50, backfill.FromDepth); Assert.AreEqual(200, backfill.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id, backfill.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id, backfill.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id, backfill.KindId); } [TestMethod] diff --git a/tests/Controllers/CasingControllerTest.cs b/tests/Controllers/CasingControllerTest.cs index c3889c4cf..da97b3dea 100644 --- a/tests/Controllers/CasingControllerTest.cs +++ b/tests/Controllers/CasingControllerTest.cs @@ -72,7 +72,7 @@ public async Task CreateAsync() FromDepth = 0, ToDepth = 100, MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id, - KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id, + KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id, DateStart = new DateOnly(2021, 1, 1), DateFinish = new DateOnly(2021, 1, 2), InnerDiameter = 3, @@ -90,7 +90,7 @@ public async Task CreateAsync() Assert.AreEqual(0, casing.FromDepth); Assert.AreEqual(100, casing.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id, casing.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id, casing.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id, casing.KindId); Assert.AreEqual(3, casing.InnerDiameter); Assert.AreEqual(4, casing.OuterDiameter); Assert.AreEqual(new DateOnly(2021, 1, 1), casing.DateStart); @@ -104,7 +104,7 @@ public async Task EditAsync() var completionId = casing.CompletionId; casing.MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id; - casing.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id; + casing.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id; casing.Notes = "COLLAR"; casing.FromDepth = 50; casing.ToDepth = 200; @@ -119,7 +119,7 @@ public async Task EditAsync() Assert.AreEqual(50, casing.FromDepth); Assert.AreEqual(200, casing.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id, casing.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id, casing.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id, casing.KindId); } [TestMethod] From 8510de2dd292fcf0550c6286778744fd777cbc4d Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 08:41:56 +0100 Subject: [PATCH 02/36] Rename qt_location to location_precision --- src/api-legacy/v1/action.py | 8 ++--- src/api-legacy/v1/borehole/get.py | 2 +- src/api-legacy/v1/borehole/list.py | 4 +-- src/api-legacy/v1/borehole/patch.py | 4 +-- src/api/BdmsContext.cs | 2 +- src/api/BdmsContextExtensions.cs | 6 ++-- src/api/Controllers/UploadController.cs | 2 +- ...41440_AddCasingLayerForeignKey.Designer.cs | 10 +++---- ...1104095126_RemoveObsoleteCodes.Designer.cs | 10 +++---- ...04125332_AddNewReferenceSystem.Designer.cs | 10 +++---- ...249_RemoveMentionsFromWorkflow.Designer.cs | 10 +++---- ...20230105140944_RemoveImportIds.Designer.cs | 10 +++---- ...230105162603_RemoveTectonicIds.Designer.cs | 10 +++---- ...230105171151_RemoveLayerColums.Designer.cs | 10 +++---- ...109123554_AddMissingContraints.Designer.cs | 10 +++---- ...44705_DropStratigraphyCodelist.Designer.cs | 10 +++---- ...1542_AddOriginalLithologyField.Designer.cs | 10 +++---- ...moveOldOriginalLithologyFields.Designer.cs | 10 +++---- ...1151951_UpdateUSCS3Cardinality.Designer.cs | 10 +++---- ...40_RemoveCantonsMunicipalities.Designer.cs | 10 +++---- ...17140814_AddMissingConstraints.Designer.cs | 10 +++---- ...ddLithologicalDescriptionTable.Designer.cs | 10 +++---- ...5558_AddFaciesDescriptionTable.Designer.cs | 10 +++---- ...30112413_UnitiseChangeTracking.Designer.cs | 10 +++---- ...230130153202_AddMissingIndices.Designer.cs | 10 +++---- ...5_DropObsoleteGeodinFilesTable.Designer.cs | 10 +++---- ...akeLayerStratigraphyFKRequired.Designer.cs | 10 +++---- ...DedicatedColumnForFileNameUuid.Designer.cs | 10 +++---- ...thologicalAndFaciesDescription.Designer.cs | 10 +++---- ...428_RemoveFillCasingConstraint.Designer.cs | 10 +++---- ...732_AddChronostratigraphyTable.Designer.cs | 10 +++---- ...2425_MigrateChronostratigraphy.Designer.cs | 10 +++---- ...239_SetFaciesQtDescriptionNull.Designer.cs | 10 +++---- ...29_MigrateChronostratigraphies.Designer.cs | 10 +++---- ...dateChronostratigraphyCodelist.Designer.cs | 10 +++---- ...RemoveObsoleteDateFromBorehole.Designer.cs | 10 +++---- ...1139_ConvertDateOnlyToDateTime.Designer.cs | 10 +++---- ...bservationAndWateringressModel.Designer.cs | 10 +++---- ...58_AddCodelistsForHydrogeology.Designer.cs | 10 +++---- ...30428142353_AddHydrotestModels.Designer.cs | 10 +++---- ...28143532_AddHydrotestCodelists.Designer.cs | 10 +++---- ...0544_RemoveSchemaFromJoinTable.Designer.cs | 10 +++---- ...085446_FixAndExtendChronoCodes.Designer.cs | 10 +++---- ...oundwaterLevelMeasurementModel.Designer.cs | 10 +++---- ...waterLevelMeasurementKindCodes.Designer.cs | 10 +++---- ...drogeologyCodelistTranslations.Designer.cs | 10 +++---- ...30522_AddFieldMeasurementModel.Designer.cs | 10 +++---- ...80107_AddFieldMeasurementCodes.Designer.cs | 10 +++---- ...HydrotestParameterTranslations.Designer.cs | 10 +++---- ...22115624_FixAndExtendCodelists.Designer.cs | 10 +++---- ..._ChangeHydrogeologySchemaNames.Designer.cs | 10 +++---- ...4125115_AllowMultipleTestKinds.Designer.cs | 10 +++---- ...133104_RemoveUnneededCodelists.Designer.cs | 10 +++---- ...2620_AddLithostratigraphyTable.Designer.cs | 10 +++---- ...73101_MigrateLithostratigraphy.Designer.cs | 10 +++---- ...1701_UpdateLithostratiCodelist.Designer.cs | 10 +++---- ...oveChronostratigraphyFromLayer.Designer.cs | 10 +++---- ...50_FixLithostratiCodelistPaths.Designer.cs | 10 +++---- ...oveUnusedDescriptionsFromLayer.Designer.cs | 10 +++---- ...230607153927_CombineNullLayers.Designer.cs | 10 +++---- ...0614140202_AddNationalInterest.Designer.cs | 10 +++---- ...204151555_UpdateAfterMigration.Designer.cs | 10 +++---- ...231204153139_AlterQtTopBedrock.Designer.cs | 10 +++---- ...11124901_RemoveCompletnessView.Designer.cs | 10 +++---- ...1135521_AddCompletionCodelists.Designer.cs | 10 +++---- ...31211140724_AddCompletionTable.Designer.cs | 10 +++---- ...062944_AddInstrumentationTable.Designer.cs | 10 +++---- ...0240109150510_AddUserSubjectId.Designer.cs | 10 +++---- ...0240111060218_AddBackfillTable.Designer.cs | 10 +++---- ...75054_RemoveObsoleteUserFields.Designer.cs | 10 +++---- ...3405_UseDateOnlyForAbandonment.Designer.cs | 10 +++---- .../20240117132514_AddCasingTable.Designer.cs | 10 +++---- ...5161511_AddCasingToObservation.Designer.cs | 10 +++---- ...240126132250_MigrateCompletion.Designer.cs | 10 +++---- ...429_CompletionMigrationCleanUp.Designer.cs | 10 +++---- ...20240212111401_RenameCodelists.Designer.cs | 10 +++---- .../20240212111401_RenameCodelists.cs | 30 ++++++++++++++----- .../Migrations/BdmsContextModelSnapshot.cs | 10 +++---- src/api/Models/Borehole.cs | 6 ++-- src/client/public/locale/common.json | 2 +- src/client/public/locale/de/common.json | 2 +- src/client/public/locale/en/common.json | 2 +- src/client/public/locale/fr/common.json | 2 +- src/client/public/locale/it/common.json | 2 +- src/client/src/api-lib/reducers/index.js | 2 +- .../src/commons/detail/meta/metaComponent.js | 2 +- .../borehole/segments/coordinatesSegment.js | 8 ++--- .../src/commons/form/multiple/multipleForm.js | 4 +-- .../commons/search/data/LocationSearchData.js | 8 ++--- .../search/editor/searchEditorState.js | 2 +- src/client/src/commons/search/searchState.js | 2 +- .../pages/settings/data/locationEditorData.js | 4 +-- 92 files changed, 411 insertions(+), 395 deletions(-) diff --git a/src/api-legacy/v1/action.py b/src/api-legacy/v1/action.py index ab9580efe..174e53ee7 100644 --- a/src/api-legacy/v1/action.py +++ b/src/api-legacy/v1/action.py @@ -649,11 +649,11 @@ def filterBorehole(self, filter={}): drilling_diameter_bho <= %s """ % self.getIdx()) - if 'qt_location' in keys and filter[ - 'qt_location'] not in ['', None]: - params.append(int(filter['qt_location'])) + if 'location_precision' in keys and filter[ + 'location_precision'] not in ['', None]: + params.append(int(filter['location_precision'])) where.append(""" - qt_location_id_cli = %s + location_precision_id_cli = %s """ % self.getIdx()) if 'reference_elevation_from' in keys and filter['reference_elevation_from'] not in ['', None]: diff --git a/src/api-legacy/v1/borehole/get.py b/src/api-legacy/v1/borehole/get.py index f05cd5bbf..c2e53c3ac 100644 --- a/src/api-legacy/v1/borehole/get.py +++ b/src/api-legacy/v1/borehole/get.py @@ -53,7 +53,7 @@ def get_sql(sql_lock='', file_permission=''): location_x_lv03_bho as location_x_lv03, location_y_lv03_bho as location_y_lv03, srs_id_cli as srs, - qt_location_id_cli as qt_location, + qt_location_id_cli as location_precision, elevation_z_bho as elevation_z, hrs_id_cli as hrs, qt_elevation_id_cli as qt_elevation, diff --git a/src/api-legacy/v1/borehole/list.py b/src/api-legacy/v1/borehole/list.py index 244115081..c58570f6c 100644 --- a/src/api-legacy/v1/borehole/list.py +++ b/src/api-legacy/v1/borehole/list.py @@ -45,7 +45,7 @@ def get_sql_text(language='en', cols=None): COALESCE( qtloc.text_cli_{language}, qtloc.text_cli_{fallback} - ) as qt_location, + ) as location_precision, elevation_z_bho as elevation_z, COALESCE( hrs.text_cli_{language}, @@ -230,7 +230,7 @@ def get_sql_geolcode(cols=None, join=None, where=None): location_y_lv03_bho as location_y_lv03, srd.geolcode as srs, - qtloc.geolcode as qt_location, + qtloc.geolcode as location_precision, elevation_z_bho as elevation_z, hrs.geolcode as hrs, qth.geolcode as qt_elevation, diff --git a/src/api-legacy/v1/borehole/patch.py b/src/api-legacy/v1/borehole/patch.py index bda081fc7..410e3aca2 100644 --- a/src/api-legacy/v1/borehole/patch.py +++ b/src/api-legacy/v1/borehole/patch.py @@ -119,7 +119,7 @@ def get_column(field): elif field == 'srs': column = 'srs_id_cli' - elif field == 'qt_location': + elif field == 'location_precision': column = 'qt_location_id_cli' elif field == 'qt_elevation': @@ -273,7 +273,7 @@ async def execute(self, id, field, value, user): 'restriction', 'kind', 'srs', - 'qt_location', + 'location_precision', 'qt_elevation', 'hrs', 'custom.landuse', diff --git a/src/api/BdmsContext.cs b/src/api/BdmsContext.cs index 8f241e881..53953db8e 100644 --- a/src/api/BdmsContext.cs +++ b/src/api/BdmsContext.cs @@ -126,7 +126,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity().HasOne(l => l.QtDepth).WithMany().HasForeignKey(l => l.QtDepthId); modelBuilder.Entity().HasOne(l => l.QtElevation).WithMany().HasForeignKey(l => l.QtElevationId); modelBuilder.Entity().HasOne(l => l.QtInclinationDirection).WithMany().HasForeignKey(l => l.QtInclinationDirectionId); - modelBuilder.Entity().HasOne(l => l.QtLocation).WithMany().HasForeignKey(l => l.QtLocationId); + modelBuilder.Entity().HasOne(l => l.LocationPrecision).WithMany().HasForeignKey(l => l.LocationPrecisionId); modelBuilder.Entity().HasOne(l => l.QtTotalDepthTvd).WithMany().HasForeignKey(l => l.QtTotalDepthTvdId); modelBuilder.Entity().HasOne(l => l.QtReferenceElevation).WithMany().HasForeignKey(l => l.QtReferenceElevationId); modelBuilder.Entity().HasOne(l => l.ReferenceElevationType).WithMany().HasForeignKey(l => l.ReferenceElevationTypeId); diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index 5d0499554..447e3b7a5 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -62,7 +62,7 @@ public static void SeedData(this BdmsContext context) List srsIds = codelists.Where(c => c.Schema == "srs").Select(s => s.Id).ToList(); List hrsIds = codelists.Where(c => c.Schema == "hrs").Select(s => s.Id).ToList(); List restrictionIds = codelists.Where(c => c.Schema == "restriction").Select(s => s.Id).ToList(); - List qtLocationnIds = codelists.Where(c => c.Schema == "qt_location").Select(s => s.Id).ToList(); + List locationPrecisionIds = codelists.Where(c => c.Schema == "location_precision").Select(s => s.Id).ToList(); List qtDescriptionIds = codelists.Where(c => c.Schema == "qt_description").Select(s => s.Id).ToList(); List drillingMethodIds = codelists.Where(c => c.Schema == "drilling_method").Select(s => s.Id).ToList(); List cuttingsIds = codelists.Where(c => c.Schema == "borehole_cuttings_core").Select(s => s.Id).ToList(); @@ -139,8 +139,8 @@ public static void SeedData(this BdmsContext context) .RuleFor(o => o.RestrictionUntil, f => f.Date.Future().ToUniversalTime().OrNull(f, .9f)) .RuleFor(o => o.OriginalName, f => f.Name.FullName()) .RuleFor(o => o.AlternateName, f => f.Person.UserName.OrNull(f, .1f)) - .RuleFor(o => o.QtLocationId, f => f.PickRandom(qtLocationnIds).OrNull(f, .1f)) - .RuleFor(o => o.QtLocation, _ => default!) + .RuleFor(o => o.LocationPrecisionId, f => f.PickRandom(locationPrecisionIds).OrNull(f, .1f)) + .RuleFor(o => o.LocationPrecision, _ => default!) .RuleFor(o => o.QtElevationId, f => f.PickRandom(qtElevationIds).OrNull(f, .1f)) .RuleFor(o => o.QtElevation, _ => default!) .RuleFor(o => o.ProjectName, f => f.Company.CatchPhrase().OrNull(f, .1f)) diff --git a/src/api/Controllers/UploadController.cs b/src/api/Controllers/UploadController.cs index c58f40e69..810e07901 100644 --- a/src/api/Controllers/UploadController.cs +++ b/src/api/Controllers/UploadController.cs @@ -469,7 +469,7 @@ public CsvImportBoreholeMap() Map(m => m.RestrictionUntil).Optional(); Map(m => m.NationalInterest).Optional(); Map(m => m.AlternateName).Optional(); - Map(m => m.QtLocationId).Optional(); + Map(m => m.LocationPrecisionId).Optional(); Map(m => m.QtElevationId).Optional(); Map(m => m.ProjectName).Optional(); Map(m => m.DrillingMethodId).Optional(); diff --git a/src/api/Migrations/20221024141440_AddCasingLayerForeignKey.Designer.cs b/src/api/Migrations/20221024141440_AddCasingLayerForeignKey.Designer.cs index c48534b7c..3128943b8 100644 --- a/src/api/Migrations/20221024141440_AddCasingLayerForeignKey.Designer.cs +++ b/src/api/Migrations/20221024141440_AddCasingLayerForeignKey.Designer.cs @@ -167,7 +167,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -283,7 +283,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1398,9 +1398,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1476,7 +1476,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20221104095126_RemoveObsoleteCodes.Designer.cs b/src/api/Migrations/20221104095126_RemoveObsoleteCodes.Designer.cs index ef77425c6..dbf8e73a4 100644 --- a/src/api/Migrations/20221104095126_RemoveObsoleteCodes.Designer.cs +++ b/src/api/Migrations/20221104095126_RemoveObsoleteCodes.Designer.cs @@ -163,7 +163,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1435,9 +1435,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1513,7 +1513,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20221104125332_AddNewReferenceSystem.Designer.cs b/src/api/Migrations/20221104125332_AddNewReferenceSystem.Designer.cs index 511de38d4..dab23a27c 100644 --- a/src/api/Migrations/20221104125332_AddNewReferenceSystem.Designer.cs +++ b/src/api/Migrations/20221104125332_AddNewReferenceSystem.Designer.cs @@ -163,7 +163,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1435,9 +1435,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1513,7 +1513,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230104130249_RemoveMentionsFromWorkflow.Designer.cs b/src/api/Migrations/20230104130249_RemoveMentionsFromWorkflow.Designer.cs index 33ec57d40..fd58efc7a 100644 --- a/src/api/Migrations/20230104130249_RemoveMentionsFromWorkflow.Designer.cs +++ b/src/api/Migrations/20230104130249_RemoveMentionsFromWorkflow.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -287,7 +287,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1451,9 +1451,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1525,7 +1525,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230105140944_RemoveImportIds.Designer.cs b/src/api/Migrations/20230105140944_RemoveImportIds.Designer.cs index 3667b7a9c..38da639fd 100644 --- a/src/api/Migrations/20230105140944_RemoveImportIds.Designer.cs +++ b/src/api/Migrations/20230105140944_RemoveImportIds.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -283,7 +283,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1439,9 +1439,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1513,7 +1513,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230105162603_RemoveTectonicIds.Designer.cs b/src/api/Migrations/20230105162603_RemoveTectonicIds.Designer.cs index f7b511601..ca025dc80 100644 --- a/src/api/Migrations/20230105162603_RemoveTectonicIds.Designer.cs +++ b/src/api/Migrations/20230105162603_RemoveTectonicIds.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1427,9 +1427,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1497,7 +1497,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230105171151_RemoveLayerColums.Designer.cs b/src/api/Migrations/20230105171151_RemoveLayerColums.Designer.cs index 5babd6786..594b1d048 100644 --- a/src/api/Migrations/20230105171151_RemoveLayerColums.Designer.cs +++ b/src/api/Migrations/20230105171151_RemoveLayerColums.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1409,9 +1409,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1479,7 +1479,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230109123554_AddMissingContraints.Designer.cs b/src/api/Migrations/20230109123554_AddMissingContraints.Designer.cs index 74eb8f4a4..bea52bab7 100644 --- a/src/api/Migrations/20230109123554_AddMissingContraints.Designer.cs +++ b/src/api/Migrations/20230109123554_AddMissingContraints.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -287,7 +287,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1455,9 +1455,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1529,7 +1529,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230109144705_DropStratigraphyCodelist.Designer.cs b/src/api/Migrations/20230109144705_DropStratigraphyCodelist.Designer.cs index d23ed71f5..86c934880 100644 --- a/src/api/Migrations/20230109144705_DropStratigraphyCodelist.Designer.cs +++ b/src/api/Migrations/20230109144705_DropStratigraphyCodelist.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -287,7 +287,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1451,9 +1451,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1525,7 +1525,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230110161542_AddOriginalLithologyField.Designer.cs b/src/api/Migrations/20230110161542_AddOriginalLithologyField.Designer.cs index 1261da493..710403330 100644 --- a/src/api/Migrations/20230110161542_AddOriginalLithologyField.Designer.cs +++ b/src/api/Migrations/20230110161542_AddOriginalLithologyField.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1413,9 +1413,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1483,7 +1483,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230111095011_RemoveOldOriginalLithologyFields.Designer.cs b/src/api/Migrations/20230111095011_RemoveOldOriginalLithologyFields.Designer.cs index 2c8297ffc..d9efbf038 100644 --- a/src/api/Migrations/20230111095011_RemoveOldOriginalLithologyFields.Designer.cs +++ b/src/api/Migrations/20230111095011_RemoveOldOriginalLithologyFields.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1406,9 +1406,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1476,7 +1476,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230111151951_UpdateUSCS3Cardinality.Designer.cs b/src/api/Migrations/20230111151951_UpdateUSCS3Cardinality.Designer.cs index 82b164c97..5d652ef33 100644 --- a/src/api/Migrations/20230111151951_UpdateUSCS3Cardinality.Designer.cs +++ b/src/api/Migrations/20230111151951_UpdateUSCS3Cardinality.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1413,9 +1413,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1483,7 +1483,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230116102740_RemoveCantonsMunicipalities.Designer.cs b/src/api/Migrations/20230116102740_RemoveCantonsMunicipalities.Designer.cs index f43c6a8c9..b39d4419a 100644 --- a/src/api/Migrations/20230116102740_RemoveCantonsMunicipalities.Designer.cs +++ b/src/api/Migrations/20230116102740_RemoveCantonsMunicipalities.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1191,9 +1191,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1257,7 +1257,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230117140814_AddMissingConstraints.Designer.cs b/src/api/Migrations/20230117140814_AddMissingConstraints.Designer.cs index 23ac9492d..21bf2a7c0 100644 --- a/src/api/Migrations/20230117140814_AddMissingConstraints.Designer.cs +++ b/src/api/Migrations/20230117140814_AddMissingConstraints.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1399,9 +1399,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1469,7 +1469,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230124103843_AddLithologicalDescriptionTable.Designer.cs b/src/api/Migrations/20230124103843_AddLithologicalDescriptionTable.Designer.cs index af3337edf..899ec968e 100644 --- a/src/api/Migrations/20230124103843_AddLithologicalDescriptionTable.Designer.cs +++ b/src/api/Migrations/20230124103843_AddLithologicalDescriptionTable.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1275,9 +1275,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1341,7 +1341,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230124145558_AddFaciesDescriptionTable.Designer.cs b/src/api/Migrations/20230124145558_AddFaciesDescriptionTable.Designer.cs index 7da39a4c8..52139ba9b 100644 --- a/src/api/Migrations/20230124145558_AddFaciesDescriptionTable.Designer.cs +++ b/src/api/Migrations/20230124145558_AddFaciesDescriptionTable.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1337,9 +1337,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1403,7 +1403,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230130112413_UnitiseChangeTracking.Designer.cs b/src/api/Migrations/20230130112413_UnitiseChangeTracking.Designer.cs index 84ac17349..6e9a61782 100644 --- a/src/api/Migrations/20230130112413_UnitiseChangeTracking.Designer.cs +++ b/src/api/Migrations/20230130112413_UnitiseChangeTracking.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1357,9 +1357,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1423,7 +1423,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230130153202_AddMissingIndices.Designer.cs b/src/api/Migrations/20230130153202_AddMissingIndices.Designer.cs index 45f64786d..f102ab0f1 100644 --- a/src/api/Migrations/20230130153202_AddMissingIndices.Designer.cs +++ b/src/api/Migrations/20230130153202_AddMissingIndices.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1353,9 +1353,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1419,7 +1419,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230203051645_DropObsoleteGeodinFilesTable.Designer.cs b/src/api/Migrations/20230203051645_DropObsoleteGeodinFilesTable.Designer.cs index e887cbe6b..bab17c012 100644 --- a/src/api/Migrations/20230203051645_DropObsoleteGeodinFilesTable.Designer.cs +++ b/src/api/Migrations/20230203051645_DropObsoleteGeodinFilesTable.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1357,9 +1357,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1423,7 +1423,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230203101538_MakeLayerStratigraphyFKRequired.Designer.cs b/src/api/Migrations/20230203101538_MakeLayerStratigraphyFKRequired.Designer.cs index 76602d0b3..c519c5c93 100644 --- a/src/api/Migrations/20230203101538_MakeLayerStratigraphyFKRequired.Designer.cs +++ b/src/api/Migrations/20230203101538_MakeLayerStratigraphyFKRequired.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1357,9 +1357,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1423,7 +1423,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230203124048_UseDedicatedColumnForFileNameUuid.Designer.cs b/src/api/Migrations/20230203124048_UseDedicatedColumnForFileNameUuid.Designer.cs index 46d3d75c1..f1dd76cf9 100644 --- a/src/api/Migrations/20230203124048_UseDedicatedColumnForFileNameUuid.Designer.cs +++ b/src/api/Migrations/20230203124048_UseDedicatedColumnForFileNameUuid.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1357,9 +1357,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1423,7 +1423,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230203140624_MigrateLayerLythologicalAndFaciesDescription.Designer.cs b/src/api/Migrations/20230203140624_MigrateLayerLythologicalAndFaciesDescription.Designer.cs index 71a7395c1..bc8ae76cd 100644 --- a/src/api/Migrations/20230203140624_MigrateLayerLythologicalAndFaciesDescription.Designer.cs +++ b/src/api/Migrations/20230203140624_MigrateLayerLythologicalAndFaciesDescription.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1357,9 +1357,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1423,7 +1423,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230216105428_RemoveFillCasingConstraint.Designer.cs b/src/api/Migrations/20230216105428_RemoveFillCasingConstraint.Designer.cs index aa4ed9586..a4c1b8b4e 100644 --- a/src/api/Migrations/20230216105428_RemoveFillCasingConstraint.Designer.cs +++ b/src/api/Migrations/20230216105428_RemoveFillCasingConstraint.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1353,9 +1353,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1419,7 +1419,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230224150732_AddChronostratigraphyTable.Designer.cs b/src/api/Migrations/20230224150732_AddChronostratigraphyTable.Designer.cs index ee6264b9c..d768a1dc2 100644 --- a/src/api/Migrations/20230224150732_AddChronostratigraphyTable.Designer.cs +++ b/src/api/Migrations/20230224150732_AddChronostratigraphyTable.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1415,9 +1415,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1481,7 +1481,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230224152425_MigrateChronostratigraphy.Designer.cs b/src/api/Migrations/20230224152425_MigrateChronostratigraphy.Designer.cs index 78053b4a7..6ce38860a 100644 --- a/src/api/Migrations/20230224152425_MigrateChronostratigraphy.Designer.cs +++ b/src/api/Migrations/20230224152425_MigrateChronostratigraphy.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1415,9 +1415,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1481,7 +1481,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230228072239_SetFaciesQtDescriptionNull.Designer.cs b/src/api/Migrations/20230228072239_SetFaciesQtDescriptionNull.Designer.cs index bb96f6765..7d53af9d4 100644 --- a/src/api/Migrations/20230228072239_SetFaciesQtDescriptionNull.Designer.cs +++ b/src/api/Migrations/20230228072239_SetFaciesQtDescriptionNull.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1357,9 +1357,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1423,7 +1423,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230308072029_MigrateChronostratigraphies.Designer.cs b/src/api/Migrations/20230308072029_MigrateChronostratigraphies.Designer.cs index 6af09ad2f..650164a92 100644 --- a/src/api/Migrations/20230308072029_MigrateChronostratigraphies.Designer.cs +++ b/src/api/Migrations/20230308072029_MigrateChronostratigraphies.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1419,9 +1419,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1485,7 +1485,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230308072618_UpdateChronostratigraphyCodelist.Designer.cs b/src/api/Migrations/20230308072618_UpdateChronostratigraphyCodelist.Designer.cs index 5519094b8..e3962ac50 100644 --- a/src/api/Migrations/20230308072618_UpdateChronostratigraphyCodelist.Designer.cs +++ b/src/api/Migrations/20230308072618_UpdateChronostratigraphyCodelist.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1419,9 +1419,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1485,7 +1485,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230317103204_RemoveObsoleteDateFromBorehole.Designer.cs b/src/api/Migrations/20230317103204_RemoveObsoleteDateFromBorehole.Designer.cs index 6cefc5306..0f4de9fd5 100644 --- a/src/api/Migrations/20230317103204_RemoveObsoleteDateFromBorehole.Designer.cs +++ b/src/api/Migrations/20230317103204_RemoveObsoleteDateFromBorehole.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1446,9 +1446,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1512,7 +1512,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230331101139_ConvertDateOnlyToDateTime.Designer.cs b/src/api/Migrations/20230331101139_ConvertDateOnlyToDateTime.Designer.cs index dec808bde..a5ef3eb0d 100644 --- a/src/api/Migrations/20230331101139_ConvertDateOnlyToDateTime.Designer.cs +++ b/src/api/Migrations/20230331101139_ConvertDateOnlyToDateTime.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1442,9 +1442,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1508,7 +1508,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230419130108_AddObservationAndWateringressModel.Designer.cs b/src/api/Migrations/20230419130108_AddObservationAndWateringressModel.Designer.cs index e66ce8f27..fdf1d1c75 100644 --- a/src/api/Migrations/20230419130108_AddObservationAndWateringressModel.Designer.cs +++ b/src/api/Migrations/20230419130108_AddObservationAndWateringressModel.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1553,9 +1553,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1619,7 +1619,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230419131858_AddCodelistsForHydrogeology.Designer.cs b/src/api/Migrations/20230419131858_AddCodelistsForHydrogeology.Designer.cs index 7cf3ccf6c..21731bdb2 100644 --- a/src/api/Migrations/20230419131858_AddCodelistsForHydrogeology.Designer.cs +++ b/src/api/Migrations/20230419131858_AddCodelistsForHydrogeology.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1553,9 +1553,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1619,7 +1619,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230428142353_AddHydrotestModels.Designer.cs b/src/api/Migrations/20230428142353_AddHydrotestModels.Designer.cs index 919d66a6c..a4579a085 100644 --- a/src/api/Migrations/20230428142353_AddHydrotestModels.Designer.cs +++ b/src/api/Migrations/20230428142353_AddHydrotestModels.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1646,9 +1646,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1712,7 +1712,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230428143532_AddHydrotestCodelists.Designer.cs b/src/api/Migrations/20230428143532_AddHydrotestCodelists.Designer.cs index de7b0b589..3396760c4 100644 --- a/src/api/Migrations/20230428143532_AddHydrotestCodelists.Designer.cs +++ b/src/api/Migrations/20230428143532_AddHydrotestCodelists.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1646,9 +1646,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1712,7 +1712,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230504080544_RemoveSchemaFromJoinTable.Designer.cs b/src/api/Migrations/20230504080544_RemoveSchemaFromJoinTable.Designer.cs index 29af889a9..d9444ccca 100644 --- a/src/api/Migrations/20230504080544_RemoveSchemaFromJoinTable.Designer.cs +++ b/src/api/Migrations/20230504080544_RemoveSchemaFromJoinTable.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1641,9 +1641,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1707,7 +1707,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230508085446_FixAndExtendChronoCodes.Designer.cs b/src/api/Migrations/20230508085446_FixAndExtendChronoCodes.Designer.cs index 7667ccab5..132cbe186 100644 --- a/src/api/Migrations/20230508085446_FixAndExtendChronoCodes.Designer.cs +++ b/src/api/Migrations/20230508085446_FixAndExtendChronoCodes.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1646,9 +1646,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1712,7 +1712,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230511133525_AddGroundwaterLevelMeasurementModel.Designer.cs b/src/api/Migrations/20230511133525_AddGroundwaterLevelMeasurementModel.Designer.cs index 8acd8fad0..c2e823671 100644 --- a/src/api/Migrations/20230511133525_AddGroundwaterLevelMeasurementModel.Designer.cs +++ b/src/api/Migrations/20230511133525_AddGroundwaterLevelMeasurementModel.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1667,9 +1667,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1733,7 +1733,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230511133636_AddGroundwaterLevelMeasurementKindCodes.Designer.cs b/src/api/Migrations/20230511133636_AddGroundwaterLevelMeasurementKindCodes.Designer.cs index ac5654bb9..08bf00842 100644 --- a/src/api/Migrations/20230511133636_AddGroundwaterLevelMeasurementKindCodes.Designer.cs +++ b/src/api/Migrations/20230511133636_AddGroundwaterLevelMeasurementKindCodes.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1667,9 +1667,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1733,7 +1733,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230515092206_AddHydrogeologyCodelistTranslations.Designer.cs b/src/api/Migrations/20230515092206_AddHydrogeologyCodelistTranslations.Designer.cs index 0d12a706a..ea4197b51 100644 --- a/src/api/Migrations/20230515092206_AddHydrogeologyCodelistTranslations.Designer.cs +++ b/src/api/Migrations/20230515092206_AddHydrogeologyCodelistTranslations.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1646,9 +1646,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1712,7 +1712,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230515130522_AddFieldMeasurementModel.Designer.cs b/src/api/Migrations/20230515130522_AddFieldMeasurementModel.Designer.cs index 02bfcca5b..6b03ab0df 100644 --- a/src/api/Migrations/20230515130522_AddFieldMeasurementModel.Designer.cs +++ b/src/api/Migrations/20230515130522_AddFieldMeasurementModel.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1690,9 +1690,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1756,7 +1756,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230516080107_AddFieldMeasurementCodes.Designer.cs b/src/api/Migrations/20230516080107_AddFieldMeasurementCodes.Designer.cs index 357ffea58..80d681beb 100644 --- a/src/api/Migrations/20230516080107_AddFieldMeasurementCodes.Designer.cs +++ b/src/api/Migrations/20230516080107_AddFieldMeasurementCodes.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1685,9 +1685,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1751,7 +1751,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230517075056_AddHydrotestParameterTranslations.Designer.cs b/src/api/Migrations/20230517075056_AddHydrotestParameterTranslations.Designer.cs index 93affd1aa..622f44571 100644 --- a/src/api/Migrations/20230517075056_AddHydrotestParameterTranslations.Designer.cs +++ b/src/api/Migrations/20230517075056_AddHydrotestParameterTranslations.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1685,9 +1685,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1751,7 +1751,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230522115624_FixAndExtendCodelists.Designer.cs b/src/api/Migrations/20230522115624_FixAndExtendCodelists.Designer.cs index 399ad74e9..328f1f8b6 100644 --- a/src/api/Migrations/20230522115624_FixAndExtendCodelists.Designer.cs +++ b/src/api/Migrations/20230522115624_FixAndExtendCodelists.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1685,9 +1685,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1751,7 +1751,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230523071042_ChangeHydrogeologySchemaNames.Designer.cs b/src/api/Migrations/20230523071042_ChangeHydrogeologySchemaNames.Designer.cs index 1d16a5171..a34dee12f 100644 --- a/src/api/Migrations/20230523071042_ChangeHydrogeologySchemaNames.Designer.cs +++ b/src/api/Migrations/20230523071042_ChangeHydrogeologySchemaNames.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1685,9 +1685,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1751,7 +1751,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230524125115_AllowMultipleTestKinds.Designer.cs b/src/api/Migrations/20230524125115_AllowMultipleTestKinds.Designer.cs index 12ec95a29..b3a794e2f 100644 --- a/src/api/Migrations/20230524125115_AllowMultipleTestKinds.Designer.cs +++ b/src/api/Migrations/20230524125115_AllowMultipleTestKinds.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1679,9 +1679,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1745,7 +1745,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230525133104_RemoveUnneededCodelists.Designer.cs b/src/api/Migrations/20230525133104_RemoveUnneededCodelists.Designer.cs index 990c55072..7b9bee476 100644 --- a/src/api/Migrations/20230525133104_RemoveUnneededCodelists.Designer.cs +++ b/src/api/Migrations/20230525133104_RemoveUnneededCodelists.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1685,9 +1685,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1751,7 +1751,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230531072620_AddLithostratigraphyTable.Designer.cs b/src/api/Migrations/20230531072620_AddLithostratigraphyTable.Designer.cs index ea5c75ebd..1dc3368d0 100644 --- a/src/api/Migrations/20230531072620_AddLithostratigraphyTable.Designer.cs +++ b/src/api/Migrations/20230531072620_AddLithostratigraphyTable.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1743,9 +1743,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1809,7 +1809,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230531073101_MigrateLithostratigraphy.Designer.cs b/src/api/Migrations/20230531073101_MigrateLithostratigraphy.Designer.cs index a1cd4c426..f3712314a 100644 --- a/src/api/Migrations/20230531073101_MigrateLithostratigraphy.Designer.cs +++ b/src/api/Migrations/20230531073101_MigrateLithostratigraphy.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1743,9 +1743,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1809,7 +1809,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230602151701_UpdateLithostratiCodelist.Designer.cs b/src/api/Migrations/20230602151701_UpdateLithostratiCodelist.Designer.cs index 29e2d8e15..81bdddd6c 100644 --- a/src/api/Migrations/20230602151701_UpdateLithostratiCodelist.Designer.cs +++ b/src/api/Migrations/20230602151701_UpdateLithostratiCodelist.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1737,9 +1737,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1803,7 +1803,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230605084334_RemoveChronostratigraphyFromLayer.Designer.cs b/src/api/Migrations/20230605084334_RemoveChronostratigraphyFromLayer.Designer.cs index 877ea967a..7a47b08e5 100644 --- a/src/api/Migrations/20230605084334_RemoveChronostratigraphyFromLayer.Designer.cs +++ b/src/api/Migrations/20230605084334_RemoveChronostratigraphyFromLayer.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1731,9 +1731,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1797,7 +1797,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230606075050_FixLithostratiCodelistPaths.Designer.cs b/src/api/Migrations/20230606075050_FixLithostratiCodelistPaths.Designer.cs index 4cdbaed16..3bb2190ad 100644 --- a/src/api/Migrations/20230606075050_FixLithostratiCodelistPaths.Designer.cs +++ b/src/api/Migrations/20230606075050_FixLithostratiCodelistPaths.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1737,9 +1737,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1803,7 +1803,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230606152236_RemoveUnusedDescriptionsFromLayer.Designer.cs b/src/api/Migrations/20230606152236_RemoveUnusedDescriptionsFromLayer.Designer.cs index 141aba4cf..c60e0206e 100644 --- a/src/api/Migrations/20230606152236_RemoveUnusedDescriptionsFromLayer.Designer.cs +++ b/src/api/Migrations/20230606152236_RemoveUnusedDescriptionsFromLayer.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1729,9 +1729,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1795,7 +1795,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230607153927_CombineNullLayers.Designer.cs b/src/api/Migrations/20230607153927_CombineNullLayers.Designer.cs index 1efeb9b98..ca455829c 100644 --- a/src/api/Migrations/20230607153927_CombineNullLayers.Designer.cs +++ b/src/api/Migrations/20230607153927_CombineNullLayers.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1723,9 +1723,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1789,7 +1789,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230614140202_AddNationalInterest.Designer.cs b/src/api/Migrations/20230614140202_AddNationalInterest.Designer.cs index 19f1fe6df..ed3639bcd 100644 --- a/src/api/Migrations/20230614140202_AddNationalInterest.Designer.cs +++ b/src/api/Migrations/20230614140202_AddNationalInterest.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1727,9 +1727,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1793,7 +1793,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20231204151555_UpdateAfterMigration.Designer.cs b/src/api/Migrations/20231204151555_UpdateAfterMigration.Designer.cs index cb0b6f0f4..d09ac28c0 100644 --- a/src/api/Migrations/20231204151555_UpdateAfterMigration.Designer.cs +++ b/src/api/Migrations/20231204151555_UpdateAfterMigration.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1732,9 +1732,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1798,7 +1798,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20231204153139_AlterQtTopBedrock.Designer.cs b/src/api/Migrations/20231204153139_AlterQtTopBedrock.Designer.cs index bd7dee191..5e944a4c8 100644 --- a/src/api/Migrations/20231204153139_AlterQtTopBedrock.Designer.cs +++ b/src/api/Migrations/20231204153139_AlterQtTopBedrock.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1728,9 +1728,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1786,7 +1786,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20231211124901_RemoveCompletnessView.Designer.cs b/src/api/Migrations/20231211124901_RemoveCompletnessView.Designer.cs index 4753476f1..754effc45 100644 --- a/src/api/Migrations/20231211124901_RemoveCompletnessView.Designer.cs +++ b/src/api/Migrations/20231211124901_RemoveCompletnessView.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1728,9 +1728,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1786,7 +1786,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20231211135521_AddCompletionCodelists.Designer.cs b/src/api/Migrations/20231211135521_AddCompletionCodelists.Designer.cs index e958aa481..c0a34fdf7 100644 --- a/src/api/Migrations/20231211135521_AddCompletionCodelists.Designer.cs +++ b/src/api/Migrations/20231211135521_AddCompletionCodelists.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1790,9 +1790,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1848,7 +1848,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20231211140724_AddCompletionTable.Designer.cs b/src/api/Migrations/20231211140724_AddCompletionTable.Designer.cs index d2e657053..2c3ef56de 100644 --- a/src/api/Migrations/20231211140724_AddCompletionTable.Designer.cs +++ b/src/api/Migrations/20231211140724_AddCompletionTable.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1790,9 +1790,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1848,7 +1848,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20231213062944_AddInstrumentationTable.Designer.cs b/src/api/Migrations/20231213062944_AddInstrumentationTable.Designer.cs index c1338ce6d..6992c4ea3 100644 --- a/src/api/Migrations/20231213062944_AddInstrumentationTable.Designer.cs +++ b/src/api/Migrations/20231213062944_AddInstrumentationTable.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1858,9 +1858,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1916,7 +1916,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240109150510_AddUserSubjectId.Designer.cs b/src/api/Migrations/20240109150510_AddUserSubjectId.Designer.cs index 7a5ec9f5f..0f8e46e9f 100644 --- a/src/api/Migrations/20240109150510_AddUserSubjectId.Designer.cs +++ b/src/api/Migrations/20240109150510_AddUserSubjectId.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1863,9 +1863,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1921,7 +1921,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240111060218_AddBackfillTable.Designer.cs b/src/api/Migrations/20240111060218_AddBackfillTable.Designer.cs index df0441e45..4555a2ff8 100644 --- a/src/api/Migrations/20240111060218_AddBackfillTable.Designer.cs +++ b/src/api/Migrations/20240111060218_AddBackfillTable.Designer.cs @@ -242,7 +242,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -346,7 +346,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1957,9 +1957,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -2015,7 +2015,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240115075054_RemoveObsoleteUserFields.Designer.cs b/src/api/Migrations/20240115075054_RemoveObsoleteUserFields.Designer.cs index 596224b62..84c782bc5 100644 --- a/src/api/Migrations/20240115075054_RemoveObsoleteUserFields.Designer.cs +++ b/src/api/Migrations/20240115075054_RemoveObsoleteUserFields.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1795,9 +1795,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1853,7 +1853,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240117093405_UseDateOnlyForAbandonment.Designer.cs b/src/api/Migrations/20240117093405_UseDateOnlyForAbandonment.Designer.cs index 7b56302cf..b76e7eae6 100644 --- a/src/api/Migrations/20240117093405_UseDateOnlyForAbandonment.Designer.cs +++ b/src/api/Migrations/20240117093405_UseDateOnlyForAbandonment.Designer.cs @@ -242,7 +242,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -346,7 +346,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1967,9 +1967,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -2025,7 +2025,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240117132514_AddCasingTable.Designer.cs b/src/api/Migrations/20240117132514_AddCasingTable.Designer.cs index 09fc05a9f..5feb67c4f 100644 --- a/src/api/Migrations/20240117132514_AddCasingTable.Designer.cs +++ b/src/api/Migrations/20240117132514_AddCasingTable.Designer.cs @@ -242,7 +242,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -346,7 +346,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -2053,9 +2053,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -2111,7 +2111,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240125161511_AddCasingToObservation.Designer.cs b/src/api/Migrations/20240125161511_AddCasingToObservation.Designer.cs index e43895b7d..afe9389d5 100644 --- a/src/api/Migrations/20240125161511_AddCasingToObservation.Designer.cs +++ b/src/api/Migrations/20240125161511_AddCasingToObservation.Designer.cs @@ -242,7 +242,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -346,7 +346,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -2053,9 +2053,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -2111,7 +2111,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240126132250_MigrateCompletion.Designer.cs b/src/api/Migrations/20240126132250_MigrateCompletion.Designer.cs index 20b8dfe7b..c2b04f33c 100644 --- a/src/api/Migrations/20240126132250_MigrateCompletion.Designer.cs +++ b/src/api/Migrations/20240126132250_MigrateCompletion.Designer.cs @@ -242,7 +242,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -346,7 +346,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -2053,9 +2053,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -2111,7 +2111,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240126132429_CompletionMigrationCleanUp.Designer.cs b/src/api/Migrations/20240126132429_CompletionMigrationCleanUp.Designer.cs index 10b7eaf5c..356a0a841 100644 --- a/src/api/Migrations/20240126132429_CompletionMigrationCleanUp.Designer.cs +++ b/src/api/Migrations/20240126132429_CompletionMigrationCleanUp.Designer.cs @@ -242,7 +242,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -346,7 +346,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -2053,9 +2053,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -2111,7 +2111,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240212111401_RenameCodelists.Designer.cs b/src/api/Migrations/20240212111401_RenameCodelists.Designer.cs index 15421d9a5..20f10893b 100644 --- a/src/api/Migrations/20240212111401_RenameCodelists.Designer.cs +++ b/src/api/Migrations/20240212111401_RenameCodelists.Designer.cs @@ -242,7 +242,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -346,7 +346,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1969,9 +1969,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -2027,7 +2027,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240212111401_RenameCodelists.cs b/src/api/Migrations/20240212111401_RenameCodelists.cs index 56300f1aa..0ffdb89ba 100644 --- a/src/api/Migrations/20240212111401_RenameCodelists.cs +++ b/src/api/Migrations/20240212111401_RenameCodelists.cs @@ -13,13 +13,29 @@ protected override void Up(MigrationBuilder migrationBuilder) migrationBuilder.Sql(@" UPDATE bdms.codelist SET schema_cli = 'casing_type' WHERE schema_cli = 'casi200'; UPDATE bdms.codelist SET schema_cli = 'casing_material' WHERE schema_cli = 'casi201'; - UPDATE bdms.codelist SET schema_cli = 'borehole_cuttings_core' WHERE schema_cli = 'custom.cuttings'; - UPDATE bdms.codelist SET schema_cli = 'drilling_purpose' WHERE schema_cli = 'extended.purpose'; - UPDATE bdms.codelist SET schema_cli = 'borehole_status' WHERE schema_cli = 'extended.status'; - UPDATE bdms.codelist SET schema_cli = 'drilling_method' WHERE schema_cli = 'extended.drilling_method'; - UPDATE bdms.codelist SET schema_cli = 'depth_precision' WHERE schema_cli = 'custom.qt_top_bedrock'; - UPDATE bdms.codelist SET schema_cli = 'inclination_precision' WHERE schema_cli = 'custom.qt_bore_inc_dir'; UPDATE bdms.codelist SET schema_cli = 'backfill_type' WHERE schema_cli = 'fill100'; - UPDATE bdms.codelist SET schema_cli = 'backfill_material' WHERE schema_cli = 'fill200';"); + UPDATE bdms.codelist SET schema_cli = 'backfill_material' WHERE schema_cli = 'fill200'; + UPDATE bdms.codelist SET schema_cli = 'location_precision' WHERE schema_cli = 'qt_location'; + UPDATE bdms.codelist SET schema_cli = 'elevation_precision' WHERE schema_cli = 'qt_elevation'; + UPDATE bdms.codelist SET schema_cli = 'reference_elevation_type' WHERE schema_cli = 'ibore117'; + UPDATE bdms.codelist SET schema_cli = 'instrument_type' WHERE schema_cli = 'inst100'; + UPDATE bdms.codelist SET schema_cli = 'instrument_status' WHERE schema_cli = 'inst101'; + UPDATE bdms.codelist SET schema_cli = 'uscs_type' WHERE schema_cli = 'mcla101'; + UPDATE bdms.codelist SET schema_cli = 'uscs_determination' WHERE schema_cli = 'mcla104'; + UPDATE bdms.codelist SET schema_cli = 'debris' WHERE schema_cli = 'mcla107'; + UPDATE bdms.codelist SET schema_cli = 'plasticity' WHERE schema_cli = 'mlpr101'; + UPDATE bdms.codelist SET schema_cli = 'compactness' WHERE schema_cli = 'mlpr102'; + UPDATE bdms.codelist SET schema_cli = 'consistency' WHERE schema_cli = 'mlpr103'; + UPDATE bdms.codelist SET schema_cli = 'humidity' WHERE schema_cli = 'mlpr105'; + UPDATE bdms.codelist SET schema_cli = 'alteration' WHERE schema_cli = 'mlpr106'; + UPDATE bdms.codelist SET schema_cli = 'organic_components' WHERE schema_cli = 'mlpr108'; + UPDATE bdms.codelist SET schema_cli = 'grain_size' WHERE schema_cli = 'mlpr109'; + UPDATE bdms.codelist SET schema_cli = 'grain_shape' WHERE schema_cli = 'mlpr110'; + UPDATE bdms.codelist SET schema_cli = 'description_quality' WHERE schema_cli = 'qt_description'; + UPDATE bdms.codelist SET schema_cli = 'colour' WHERE schema_cli = 'mlpr112'; + UPDATE bdms.codelist SET schema_cli = 'grain_angularity' WHERE schema_cli = 'mlpr115'; + UPDATE bdms.codelist SET schema_cli = 'cohesion' WHERE schema_cli = 'mlpr116'; + DELETE FROM bdms.codelist WHERE schema_cli = 'casi100'; + DELETE FROM bdms.codelist WHERE schema_cli = 'casi101';"); } } diff --git a/src/api/Migrations/BdmsContextModelSnapshot.cs b/src/api/Migrations/BdmsContextModelSnapshot.cs index b0b98065a..6c1807f7f 100644 --- a/src/api/Migrations/BdmsContextModelSnapshot.cs +++ b/src/api/Migrations/BdmsContextModelSnapshot.cs @@ -239,7 +239,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("QtLocationId") + b.Property("LocationPrecisionId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -343,7 +343,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("QtLocationId"); + b.HasIndex("LocationPrecisionId"); b.HasIndex("QtReferenceElevationId"); @@ -1966,9 +1966,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "QtLocation") + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("QtLocationId"); + .HasForeignKey("LocationPrecisionId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -2024,7 +2024,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("QtLocation"); + b.Navigation("LocationPrecision"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Models/Borehole.cs b/src/api/Models/Borehole.cs index f327b4095..be135ca6a 100644 --- a/src/api/Models/Borehole.cs +++ b/src/api/Models/Borehole.cs @@ -163,11 +163,11 @@ public class Borehole : IChangeTracking, IIdentifyable public string? AlternateName { get; set; } /// - /// Gets or sets the 's QTLocationId. + /// Gets or sets the 's location precision. /// [Column("qt_location_id_cli")] - public int? QtLocationId { get; set; } - public Codelist? QtLocation { get; set; } + public int? LocationPrecisionId { get; set; } + public Codelist? LocationPrecision { get; set; } /// /// Gets or sets the 's QTElevationId. diff --git a/src/client/public/locale/common.json b/src/client/public/locale/common.json index e951480ef..8e33ec3fa 100644 --- a/src/client/public/locale/common.json +++ b/src/client/public/locale/common.json @@ -284,7 +284,7 @@ "qt_bore_inc_dir": "", "qt_elevation": "", "qt_depth": "", - "qt_location": "", + "location_precision": "", "qt_top_bedrock": "", "refElevationCasing": "", "refresh": "", diff --git a/src/client/public/locale/de/common.json b/src/client/public/locale/de/common.json index 84849f907..99407b410 100644 --- a/src/client/public/locale/de/common.json +++ b/src/client/public/locale/de/common.json @@ -290,7 +290,7 @@ "qt_bore_inc_dir": "Ink. / Richtung Genauigkeit", "qt_depth": "+/- Bohrlochlänge [m MD]", "qt_elevation": "+/- Terrainhöhe [m]", - "qt_location": "+/- Koordinaten [m]", + "location_precision": "+/- Koordinaten [m]", "qt_top_bedrock": "+/- Top Fels [m MD]", "reference_elevation": "Referenz Ansatzhöhe [m ü.M.]", "reference_elevation_qt": "+/- Referenz Ansatzhöhe [m]", diff --git a/src/client/public/locale/en/common.json b/src/client/public/locale/en/common.json index ee5eb4f05..180185473 100644 --- a/src/client/public/locale/en/common.json +++ b/src/client/public/locale/en/common.json @@ -290,7 +290,7 @@ "qt_bore_inc_dir": "Inclin. / direction precision", "qt_depth": "+/- Borehole length [m MD]", "qt_elevation": "+/- Ground elevation [m]", - "qt_location": "+/- Coordinates [m]", + "location_precision": "+/- Coordinates [m]", "qt_top_bedrock": "+/- Top bedrock [m MD]", "reference_elevation": "Reference elevation [m a.s.l.]", "reference_elevation_qt": "+/- Reference elevation [m]", diff --git a/src/client/public/locale/fr/common.json b/src/client/public/locale/fr/common.json index 7aac52a80..8a2903b98 100644 --- a/src/client/public/locale/fr/common.json +++ b/src/client/public/locale/fr/common.json @@ -290,7 +290,7 @@ "qt_bore_inc_dir": "Précision de inclin. / direction", "qt_depth": "+/- Longueur du forage [m MD]", "qt_elevation": "+/- Niveau du terrain [m]", - "qt_location": "+/- Coordonnées [m]", + "location_precision": "+/- Coordonnées [m]", "qt_top_bedrock": "+/- Toit du rocher [m MD]", "reference_elevation": "Référence altitudinale [m s.m.]", "reference_elevation_qt": "+/- Référence altitudinale [m]", diff --git a/src/client/public/locale/it/common.json b/src/client/public/locale/it/common.json index cb1302077..d5d4d0f82 100644 --- a/src/client/public/locale/it/common.json +++ b/src/client/public/locale/it/common.json @@ -290,7 +290,7 @@ "qt_bore_inc_dir": "Qualità inclinazione / direzione", "qt_depth": "+/- Lunghezza della perforazione [m MD]", "qt_elevation": "+/- Quota livello del terreno [m]", - "qt_location": "+/- Coordinate [m]", + "location_precision": "+/- Coordinate [m]", "qt_top_bedrock": "+/- Top del substrato roccioso [m MD]", "reference_elevation": "Riferimento della quota [m s.l.m.]", "reference_elevation_qt": "+/- Riferimento della quota [m]", diff --git a/src/client/src/api-lib/reducers/index.js b/src/client/src/api-lib/reducers/index.js index 2c08d31d2..d0b5266b0 100644 --- a/src/client/src/api-lib/reducers/index.js +++ b/src/client/src/api-lib/reducers/index.js @@ -330,7 +330,7 @@ export function borehole() { location_x: "", location_y: "", srs: null, - qt_location: null, + location_precision: null, elevation_z: "", hrs: null, qt_elevation: null, diff --git a/src/client/src/commons/detail/meta/metaComponent.js b/src/client/src/commons/detail/meta/metaComponent.js index a257f2391..11cf73ac4 100644 --- a/src/client/src/commons/detail/meta/metaComponent.js +++ b/src/client/src/commons/detail/meta/metaComponent.js @@ -280,7 +280,7 @@ class MetaComponent extends React.Component { )}
- {this.getDomainRow("qt_location", data.qt_location)} + {this.getDomainRow("location_precision", data.location_precision)} {this.getDomainRow("qt_elevation", data.qt_elevation)} {this.getDomainRow( "qt_elevation", diff --git a/src/client/src/commons/form/borehole/segments/coordinatesSegment.js b/src/client/src/commons/form/borehole/segments/coordinatesSegment.js index 4be33557f..01b82f4e1 100644 --- a/src/client/src/commons/form/borehole/segments/coordinatesSegment.js +++ b/src/client/src/commons/form/borehole/segments/coordinatesSegment.js @@ -568,14 +568,14 @@ const CoordinatesSegment = props => { { - updateChange("qt_location", selected.id, false); + updateChange("location_precision", selected.id, false); }} - schema="qt_location" - selected={borehole.data.qt_location} + schema="location_precision" + selected={borehole.data.location_precision} readOnly={!isEditable} /> diff --git a/src/client/src/commons/form/multiple/multipleForm.js b/src/client/src/commons/form/multiple/multipleForm.js index 6b8107757..c5c6d07c3 100644 --- a/src/client/src/commons/form/multiple/multipleForm.js +++ b/src/client/src/commons/form/multiple/multipleForm.js @@ -44,7 +44,7 @@ class MultipleForm extends React.Component { value: null, }, national_interest: { api: "national_interest", value: null }, - qt_location: { api: "qt_location", value: null }, + location_precision: { api: "location_precision", value: null }, qt_elevation: { api: "qt_elevation", value: null }, reference_elevation_qt: { api: "qt_reference_elevation", @@ -409,7 +409,7 @@ class MultipleForm extends React.Component { ) : null} {this.getGroup([ - this.getDomain("qt_location"), + this.getDomain("location_precision"), this.getDomain("qt_elevation"), this.getDomain("reference_elevation_qt", "qt_elevation"), this.getDomain("reference_elevation_type", "ibor117"), diff --git a/src/client/src/commons/search/data/LocationSearchData.js b/src/client/src/commons/search/data/LocationSearchData.js index 18a3dbe0a..ae7b2b224 100644 --- a/src/client/src/commons/search/data/LocationSearchData.js +++ b/src/client/src/commons/search/data/LocationSearchData.js @@ -157,12 +157,12 @@ export const LocationSearchData = [ { id: 14, type: "Dropdown", - label: "qt_location", - value: "qt_location", - schema: "qt_location", + label: "location_precision", + value: "location_precision", + schema: "location_precision", multiple: false, search: false, - isVisibleValue: "qt_location", + isVisibleValue: "location_precision", }, { id: 15, diff --git a/src/client/src/commons/search/editor/searchEditorState.js b/src/client/src/commons/search/editor/searchEditorState.js index e4408b320..2cdc3d940 100644 --- a/src/client/src/commons/search/editor/searchEditorState.js +++ b/src/client/src/commons/search/editor/searchEditorState.js @@ -112,7 +112,7 @@ const initialState = { reference_elevation_type: null, qt_reference_elevation: null, qt_elevation: null, - qt_location: null, + location_precision: null, reference_elevation_from: "", reference_elevation_to: "", srs: null, diff --git a/src/client/src/commons/search/searchState.js b/src/client/src/commons/search/searchState.js index a43d8cc1c..913207b85 100644 --- a/src/client/src/commons/search/searchState.js +++ b/src/client/src/commons/search/searchState.js @@ -106,7 +106,7 @@ const initialState = { reference_elevation_type: null, qt_reference_elevation: null, qt_elevation: null, - qt_location: null, + location_precision: null, reference_elevation_from: "", reference_elevation_to: "", srs: null, diff --git a/src/client/src/pages/settings/data/locationEditorData.js b/src/client/src/pages/settings/data/locationEditorData.js index 53bb8c644..ba992964d 100644 --- a/src/client/src/pages/settings/data/locationEditorData.js +++ b/src/client/src/pages/settings/data/locationEditorData.js @@ -51,8 +51,8 @@ export const locationEditorData = [ }, { id: 10, - label: "qt_location", - value: "qt_location", + label: "location_precision", + value: "location_precision", }, { id: 11, From b77715b70e0968b1de2b3aaa9727a81dfa1568f0 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 08:53:34 +0100 Subject: [PATCH 03/36] rename qt_elevation to elevation_precision --- src/api-legacy/v1/action.py | 6 +++--- src/api-legacy/v1/borehole/get.py | 2 +- src/api-legacy/v1/borehole/list.py | 4 ++-- src/api-legacy/v1/borehole/patch.py | 6 +++--- src/api/BdmsContext.cs | 2 +- src/api/BdmsContextExtensions.cs | 8 ++++---- src/api/Controllers/UploadController.cs | 2 +- src/api/Models/Borehole.cs | 8 ++++---- src/client/public/locale/common.json | 2 +- src/client/public/locale/de/common.json | 2 +- src/client/public/locale/en/common.json | 2 +- src/client/public/locale/fr/common.json | 2 +- src/client/public/locale/it/common.json | 2 +- src/client/src/api-lib/reducers/index.js | 2 +- src/client/src/commons/detail/meta/metaComponent.js | 4 ++-- .../form/borehole/segments/coordinatesSegment.js | 10 +++++----- src/client/src/commons/form/multiple/multipleForm.js | 6 +++--- .../src/commons/search/data/LocationSearchData.js | 10 +++++----- .../src/commons/search/editor/searchEditorState.js | 2 +- src/client/src/commons/search/searchState.js | 2 +- .../src/pages/settings/data/locationEditorData.js | 4 ++-- 21 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/api-legacy/v1/action.py b/src/api-legacy/v1/action.py index 174e53ee7..ec60e6d42 100644 --- a/src/api-legacy/v1/action.py +++ b/src/api-legacy/v1/action.py @@ -694,9 +694,9 @@ def filterBorehole(self, filter={}): elevation_z_bho <= %s """ % self.getIdx()) - if 'qt_elevation' in keys and filter[ - 'qt_elevation'] not in ['', None]: - params.append(int(filter['qt_elevation'])) + if 'elevation_precision' in keys and filter[ + 'elevation_precision'] not in ['', None]: + params.append(int(filter['elevation_precision'])) where.append(""" qt_elevation_id_cli = %s """ % self.getIdx()) diff --git a/src/api-legacy/v1/borehole/get.py b/src/api-legacy/v1/borehole/get.py index c2e53c3ac..6ae598ec6 100644 --- a/src/api-legacy/v1/borehole/get.py +++ b/src/api-legacy/v1/borehole/get.py @@ -56,7 +56,7 @@ def get_sql(sql_lock='', file_permission=''): qt_location_id_cli as location_precision, elevation_z_bho as elevation_z, hrs_id_cli as hrs, - qt_elevation_id_cli as qt_elevation, + qt_elevation_id_cli as elevation_precision, reference_elevation_bho as reference_elevation, qt_reference_elevation_id_cli as qt_reference_elevation, diff --git a/src/api-legacy/v1/borehole/list.py b/src/api-legacy/v1/borehole/list.py index c58570f6c..c8e6c3117 100644 --- a/src/api-legacy/v1/borehole/list.py +++ b/src/api-legacy/v1/borehole/list.py @@ -54,7 +54,7 @@ def get_sql_text(language='en', cols=None): COALESCE( qth.text_cli_{language}, qth.text_cli_{fallback} - ) as qt_elevation, + ) as elevation_precision, reference_elevation_bho as reference_elevation, COALESCE( @@ -233,7 +233,7 @@ def get_sql_geolcode(cols=None, join=None, where=None): qtloc.geolcode as location_precision, elevation_z_bho as elevation_z, hrs.geolcode as hrs, - qth.geolcode as qt_elevation, + qth.geolcode as elevation_precision, reference_elevation_bho as reference_elevation, qre.geolcode as qt_reference_elevation, diff --git a/src/api-legacy/v1/borehole/patch.py b/src/api-legacy/v1/borehole/patch.py index 410e3aca2..4cca5c2bf 100644 --- a/src/api-legacy/v1/borehole/patch.py +++ b/src/api-legacy/v1/borehole/patch.py @@ -122,7 +122,7 @@ def get_column(field): elif field == 'location_precision': column = 'qt_location_id_cli' - elif field == 'qt_elevation': + elif field == 'elevation_precision': column = 'qt_elevation_id_cli' elif field == 'reference_elevation': @@ -274,7 +274,7 @@ async def execute(self, id, field, value, user): 'kind', 'srs', 'location_precision', - 'qt_elevation', + 'elevation_precision', 'hrs', 'custom.landuse', 'drilling_method', @@ -307,7 +307,7 @@ async def execute(self, id, field, value, user): schema = 'depth_precision' elif field == 'qt_reference_elevation': - schema = 'qt_elevation' + schema = 'elevation_precision' elif field == 'reference_elevation_type': schema = 'ibor117' diff --git a/src/api/BdmsContext.cs b/src/api/BdmsContext.cs index 53953db8e..1d7e053c5 100644 --- a/src/api/BdmsContext.cs +++ b/src/api/BdmsContext.cs @@ -124,7 +124,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity().HasOne(l => l.Lithostratigraphy).WithMany().HasForeignKey(l => l.LithostratigraphyId); modelBuilder.Entity().HasOne(l => l.Purpose).WithMany().HasForeignKey(l => l.PurposeId); modelBuilder.Entity().HasOne(l => l.QtDepth).WithMany().HasForeignKey(l => l.QtDepthId); - modelBuilder.Entity().HasOne(l => l.QtElevation).WithMany().HasForeignKey(l => l.QtElevationId); + modelBuilder.Entity().HasOne(l => l.ElevationPrecision).WithMany().HasForeignKey(l => l.ElevationPrecisionId); modelBuilder.Entity().HasOne(l => l.QtInclinationDirection).WithMany().HasForeignKey(l => l.QtInclinationDirectionId); modelBuilder.Entity().HasOne(l => l.LocationPrecision).WithMany().HasForeignKey(l => l.LocationPrecisionId); modelBuilder.Entity().HasOne(l => l.QtTotalDepthTvd).WithMany().HasForeignKey(l => l.QtTotalDepthTvdId); diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index 447e3b7a5..6e08b04bf 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -67,7 +67,7 @@ public static void SeedData(this BdmsContext context) List drillingMethodIds = codelists.Where(c => c.Schema == "drilling_method").Select(s => s.Id).ToList(); List cuttingsIds = codelists.Where(c => c.Schema == "borehole_cuttings_core").Select(s => s.Id).ToList(); List qtDepthIds = codelists.Where(c => c.Schema == "depth_precision").Select(s => s.Id).ToList(); - List qtElevationIds = codelists.Where(c => c.Schema == "qt_elevation").Select(s => s.Id).ToList(); + List elevationPrecisionIds = codelists.Where(c => c.Schema == "elevation_precision").Select(s => s.Id).ToList(); List layerKindIds = codelists.Where(c => c.Schema == "layer_kind").Select(s => s.Id).ToList(); List purposeIds = codelists.Where(c => c.Schema == "drilling_purpose").Select(s => s.Id).ToList(); List statusIds = codelists.Where(c => c.Schema == "borehole_status").Select(s => s.Id).ToList(); @@ -141,8 +141,8 @@ public static void SeedData(this BdmsContext context) .RuleFor(o => o.AlternateName, f => f.Person.UserName.OrNull(f, .1f)) .RuleFor(o => o.LocationPrecisionId, f => f.PickRandom(locationPrecisionIds).OrNull(f, .1f)) .RuleFor(o => o.LocationPrecision, _ => default!) - .RuleFor(o => o.QtElevationId, f => f.PickRandom(qtElevationIds).OrNull(f, .1f)) - .RuleFor(o => o.QtElevation, _ => default!) + .RuleFor(o => o.ElevationPrecisionId, f => f.PickRandom(elevationPrecisionIds).OrNull(f, .1f)) + .RuleFor(o => o.ElevationPrecision, _ => default!) .RuleFor(o => o.ProjectName, f => f.Company.CatchPhrase().OrNull(f, .1f)) .RuleFor(o => o.Country, f => f.Address.Country().OrNull(f, 0.01f)) .RuleFor(o => o.Canton, f => f.Address.State().OrNull(f, 0.01f)) @@ -175,7 +175,7 @@ public static void SeedData(this BdmsContext context) .RuleFor(o => o.TopBedrockTvd, f => f.Random.Double(0, 1000).OrNull(f, .05f)) .RuleFor(o => o.QtTopBedrockTvd, f => f.Random.Double(0, 2).OrNull(f, .05f)) .RuleFor(o => o.ReferenceElevation, f => f.Random.Double(0, 4500).OrNull(f, .05f)) - .RuleFor(o => o.QtReferenceElevationId, f => f.PickRandom(qtElevationIds).OrNull(f, .05f)) + .RuleFor(o => o.QtReferenceElevationId, f => f.PickRandom(elevationPrecisionIds).OrNull(f, .05f)) .RuleFor(o => o.QtReferenceElevation, _ => default!) .RuleFor(o => o.QtInclinationDirectionId, f => f.PickRandom(qtInclinationDirectionIds).OrNull(f, .05f)) .RuleFor(o => o.QtInclinationDirection, _ => default!) diff --git a/src/api/Controllers/UploadController.cs b/src/api/Controllers/UploadController.cs index 810e07901..b149a2d34 100644 --- a/src/api/Controllers/UploadController.cs +++ b/src/api/Controllers/UploadController.cs @@ -470,7 +470,7 @@ public CsvImportBoreholeMap() Map(m => m.NationalInterest).Optional(); Map(m => m.AlternateName).Optional(); Map(m => m.LocationPrecisionId).Optional(); - Map(m => m.QtElevationId).Optional(); + Map(m => m.ElevationPrecisionId).Optional(); Map(m => m.ProjectName).Optional(); Map(m => m.DrillingMethodId).Optional(); Map(m => m.DrillingDate).Optional(); diff --git a/src/api/Models/Borehole.cs b/src/api/Models/Borehole.cs index be135ca6a..c5fecc2b2 100644 --- a/src/api/Models/Borehole.cs +++ b/src/api/Models/Borehole.cs @@ -170,15 +170,15 @@ public class Borehole : IChangeTracking, IIdentifyable public Codelist? LocationPrecision { get; set; } /// - /// Gets or sets the 's QTElevationId. + /// Gets or sets the 's elevation precision id. /// [Column("qt_elevation_id_cli")] - public int? QtElevationId { get; set; } + public int? ElevationPrecisionId { get; set; } /// - /// Gets or sets the 's QTElevation. + /// Gets or sets the 's elevation precision. /// - public Codelist? QtElevation { get; set; } + public Codelist? ElevationPrecision { get; set; } /// /// Gets or sets the 's project name. diff --git a/src/client/public/locale/common.json b/src/client/public/locale/common.json index 8e33ec3fa..2e3675aa6 100644 --- a/src/client/public/locale/common.json +++ b/src/client/public/locale/common.json @@ -282,7 +282,7 @@ "publish": "", "purpose": "", "qt_bore_inc_dir": "", - "qt_elevation": "", + "elevation_precision": "", "qt_depth": "", "location_precision": "", "qt_top_bedrock": "", diff --git a/src/client/public/locale/de/common.json b/src/client/public/locale/de/common.json index 99407b410..5679f81f4 100644 --- a/src/client/public/locale/de/common.json +++ b/src/client/public/locale/de/common.json @@ -289,7 +289,7 @@ "purpose": "Bohrzweck", "qt_bore_inc_dir": "Ink. / Richtung Genauigkeit", "qt_depth": "+/- Bohrlochlänge [m MD]", - "qt_elevation": "+/- Terrainhöhe [m]", + "elevation_precision": "+/- Terrainhöhe [m]", "location_precision": "+/- Koordinaten [m]", "qt_top_bedrock": "+/- Top Fels [m MD]", "reference_elevation": "Referenz Ansatzhöhe [m ü.M.]", diff --git a/src/client/public/locale/en/common.json b/src/client/public/locale/en/common.json index 180185473..27c863d38 100644 --- a/src/client/public/locale/en/common.json +++ b/src/client/public/locale/en/common.json @@ -289,7 +289,7 @@ "purpose": "Drilling purpose", "qt_bore_inc_dir": "Inclin. / direction precision", "qt_depth": "+/- Borehole length [m MD]", - "qt_elevation": "+/- Ground elevation [m]", + "elevation_precision": "+/- Ground elevation [m]", "location_precision": "+/- Coordinates [m]", "qt_top_bedrock": "+/- Top bedrock [m MD]", "reference_elevation": "Reference elevation [m a.s.l.]", diff --git a/src/client/public/locale/fr/common.json b/src/client/public/locale/fr/common.json index 8a2903b98..e5d6583be 100644 --- a/src/client/public/locale/fr/common.json +++ b/src/client/public/locale/fr/common.json @@ -289,7 +289,7 @@ "purpose": "But du forage", "qt_bore_inc_dir": "Précision de inclin. / direction", "qt_depth": "+/- Longueur du forage [m MD]", - "qt_elevation": "+/- Niveau du terrain [m]", + "elevation_precision": "+/- Niveau du terrain [m]", "location_precision": "+/- Coordonnées [m]", "qt_top_bedrock": "+/- Toit du rocher [m MD]", "reference_elevation": "Référence altitudinale [m s.m.]", diff --git a/src/client/public/locale/it/common.json b/src/client/public/locale/it/common.json index d5d4d0f82..0f2c6ae76 100644 --- a/src/client/public/locale/it/common.json +++ b/src/client/public/locale/it/common.json @@ -289,7 +289,7 @@ "purpose": "Scopo della perforazione", "qt_bore_inc_dir": "Qualità inclinazione / direzione", "qt_depth": "+/- Lunghezza della perforazione [m MD]", - "qt_elevation": "+/- Quota livello del terreno [m]", + "elevation_precision": "+/- Quota livello del terreno [m]", "location_precision": "+/- Coordinate [m]", "qt_top_bedrock": "+/- Top del substrato roccioso [m MD]", "reference_elevation": "Riferimento della quota [m s.l.m.]", diff --git a/src/client/src/api-lib/reducers/index.js b/src/client/src/api-lib/reducers/index.js index d0b5266b0..96970b9fb 100644 --- a/src/client/src/api-lib/reducers/index.js +++ b/src/client/src/api-lib/reducers/index.js @@ -333,7 +333,7 @@ export function borehole() { location_precision: null, elevation_z: "", hrs: null, - qt_elevation: null, + elevation_precision: null, drilling_date: null, bore_inc: null, bore_inc_dir: null, diff --git a/src/client/src/commons/detail/meta/metaComponent.js b/src/client/src/commons/detail/meta/metaComponent.js index 11cf73ac4..6c70b6d67 100644 --- a/src/client/src/commons/detail/meta/metaComponent.js +++ b/src/client/src/commons/detail/meta/metaComponent.js @@ -281,9 +281,9 @@ class MetaComponent extends React.Component {
{this.getDomainRow("location_precision", data.location_precision)} - {this.getDomainRow("qt_elevation", data.qt_elevation)} + {this.getDomainRow("elevation_precision", data.elevation_precision)} {this.getDomainRow( - "qt_elevation", + "elevation_precision", data.qt_reference_elevation, "reference_elevation_qt", )} diff --git a/src/client/src/commons/form/borehole/segments/coordinatesSegment.js b/src/client/src/commons/form/borehole/segments/coordinatesSegment.js index 01b82f4e1..d036e0eac 100644 --- a/src/client/src/commons/form/borehole/segments/coordinatesSegment.js +++ b/src/client/src/commons/form/borehole/segments/coordinatesSegment.js @@ -604,14 +604,14 @@ const CoordinatesSegment = props => { { - updateChange("qt_elevation", selected.id, false); + updateChange("elevation_precision", selected.id, false); }} - schema="qt_elevation" - selected={borehole.data.qt_elevation} + schema="elevation_precision" + selected={borehole.data.elevation_precision} readOnly={!isEditable} /> @@ -654,7 +654,7 @@ const CoordinatesSegment = props => { onSelected={selected => { updateChange("qt_reference_elevation", selected.id, false); }} - schema="qt_elevation" + schema="elevation_precision" selected={borehole.data.qt_reference_elevation} readOnly={!isEditable} /> diff --git a/src/client/src/commons/form/multiple/multipleForm.js b/src/client/src/commons/form/multiple/multipleForm.js index c5c6d07c3..bd8cfa4e7 100644 --- a/src/client/src/commons/form/multiple/multipleForm.js +++ b/src/client/src/commons/form/multiple/multipleForm.js @@ -45,7 +45,7 @@ class MultipleForm extends React.Component { }, national_interest: { api: "national_interest", value: null }, location_precision: { api: "location_precision", value: null }, - qt_elevation: { api: "qt_elevation", value: null }, + elevation_precision: { api: "elevation_precision", value: null }, reference_elevation_qt: { api: "qt_reference_elevation", value: null, @@ -410,8 +410,8 @@ class MultipleForm extends React.Component { ) : null} {this.getGroup([ this.getDomain("location_precision"), - this.getDomain("qt_elevation"), - this.getDomain("reference_elevation_qt", "qt_elevation"), + this.getDomain("elevation_precision"), + this.getDomain("reference_elevation_qt", "elevation_precision"), this.getDomain("reference_elevation_type", "ibor117"), ])} {this.getGroup([ diff --git a/src/client/src/commons/search/data/LocationSearchData.js b/src/client/src/commons/search/data/LocationSearchData.js index ae7b2b224..e21b3a85a 100644 --- a/src/client/src/commons/search/data/LocationSearchData.js +++ b/src/client/src/commons/search/data/LocationSearchData.js @@ -167,19 +167,19 @@ export const LocationSearchData = [ { id: 15, type: "Dropdown", - label: "qt_elevation", - value: "qt_elevation", - schema: "qt_elevation", + label: "elevation_precision", + value: "elevation_precision", + schema: "elevation_precision", multiple: false, search: false, - isVisibleValue: "qt_elevation", + isVisibleValue: "elevation_precision", }, { id: 16, type: "Dropdown", label: "reference_elevation_qt", value: "qt_reference_elevation", - schema: "qt_elevation", + schema: "elevation_precision", multiple: false, search: false, isVisibleValue: "reference_elevation_qt", diff --git a/src/client/src/commons/search/editor/searchEditorState.js b/src/client/src/commons/search/editor/searchEditorState.js index 2cdc3d940..c9cea01e6 100644 --- a/src/client/src/commons/search/editor/searchEditorState.js +++ b/src/client/src/commons/search/editor/searchEditorState.js @@ -111,7 +111,7 @@ const initialState = { reference_elevation_type: null, qt_reference_elevation: null, - qt_elevation: null, + elevation_precision: null, location_precision: null, reference_elevation_from: "", reference_elevation_to: "", diff --git a/src/client/src/commons/search/searchState.js b/src/client/src/commons/search/searchState.js index 913207b85..95b3b705f 100644 --- a/src/client/src/commons/search/searchState.js +++ b/src/client/src/commons/search/searchState.js @@ -105,7 +105,7 @@ const initialState = { reference_elevation_type: null, qt_reference_elevation: null, - qt_elevation: null, + elevation_precision: null, location_precision: null, reference_elevation_from: "", reference_elevation_to: "", diff --git a/src/client/src/pages/settings/data/locationEditorData.js b/src/client/src/pages/settings/data/locationEditorData.js index ba992964d..d49102d04 100644 --- a/src/client/src/pages/settings/data/locationEditorData.js +++ b/src/client/src/pages/settings/data/locationEditorData.js @@ -56,8 +56,8 @@ export const locationEditorData = [ }, { id: 11, - label: "qt_elevation", - value: "qt_elevation", + label: "elevation_precision", + value: "elevation_precision", }, { id: 12, From 544ad9148a556886185819481e8010e7a263dfcd Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 08:58:08 +0100 Subject: [PATCH 04/36] Rename inst100 to instrument_type --- src/api/Models/CompletionSchemas.cs | 2 +- .../form/borehole/completion/completionSchemaConstants.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/Models/CompletionSchemas.cs b/src/api/Models/CompletionSchemas.cs index 3f41c6cd3..20c6ceeb0 100644 --- a/src/api/Models/CompletionSchemas.cs +++ b/src/api/Models/CompletionSchemas.cs @@ -6,7 +6,7 @@ public static class CompletionSchemas { public const string CompletionKindSchema = "completion_kind"; - public const string InstrumentationKindSchema = "inst100"; + public const string InstrumentationKindSchema = "instrument_type"; public const string InstrumentationStatusSchema = "inst101"; public const string BackfillTypeSchema = "backfill_type"; public const string BackfillMaterialSchema = "backfill_material"; diff --git a/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js b/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js index 1c4e0bc02..4fb5b667f 100644 --- a/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js +++ b/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js @@ -1,6 +1,6 @@ export const completionSchemaConstants = { completionKind: "completion_kind", - instrumentationKind: "inst100", + instrumentationKind: "instrument_type", instrumentationStatus: "inst101", backfillType: "backfill_type", backfillMaterial: "backfill_material", From a3011b12f0e162b5bc2be802e40a6de568084568 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 08:59:12 +0100 Subject: [PATCH 05/36] Rename inst101 to instrument_status --- src/api/Models/CompletionSchemas.cs | 2 +- .../form/borehole/completion/completionSchemaConstants.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/Models/CompletionSchemas.cs b/src/api/Models/CompletionSchemas.cs index 20c6ceeb0..570583636 100644 --- a/src/api/Models/CompletionSchemas.cs +++ b/src/api/Models/CompletionSchemas.cs @@ -7,7 +7,7 @@ public static class CompletionSchemas { public const string CompletionKindSchema = "completion_kind"; public const string InstrumentationKindSchema = "instrument_type"; - public const string InstrumentationStatusSchema = "inst101"; + public const string InstrumentationStatusSchema = "instrument_status"; public const string BackfillTypeSchema = "backfill_type"; public const string BackfillMaterialSchema = "backfill_material"; public const string CasingTypeSchema = "casing_type"; diff --git a/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js b/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js index 4fb5b667f..8a5d8d8ad 100644 --- a/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js +++ b/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js @@ -1,7 +1,7 @@ export const completionSchemaConstants = { completionKind: "completion_kind", instrumentationKind: "instrument_type", - instrumentationStatus: "inst101", + instrumentationStatus: "instrument_status", backfillType: "backfill_type", backfillMaterial: "backfill_material", casingType: "casing_type", From 77496adf1eb1f0e8601fb3b0719e3575580ba7cc Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:06:26 +0100 Subject: [PATCH 06/36] Rename mcla101 to uscs_type --- src/api-legacy/v1/borehole/profile/layer/get.py | 6 +++--- src/api-legacy/v1/borehole/stratigraphy/layer/get.py | 6 +++--- .../v1/borehole/stratigraphy/layer/patch.py | 6 +++--- src/api/BdmsContextExtensions.cs | 12 ++++++------ src/api/Models/Layer.cs | 8 ++++---- .../stratigrafy/profile/view/profileViewComponent.js | 2 +- .../profileAttributes/profileAttributes.js | 2 +- .../profileLayersList/profileLayersList.js | 2 +- .../commons/form/profile/data/stratigraphydata.js | 6 +++--- .../src/commons/search/data/lithologySearchData.js | 6 +++--- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/api-legacy/v1/borehole/profile/layer/get.py b/src/api-legacy/v1/borehole/profile/layer/get.py index 8d7d6347f..7a0673946 100644 --- a/src/api-legacy/v1/borehole/profile/layer/get.py +++ b/src/api-legacy/v1/borehole/profile/layer/get.py @@ -198,7 +198,7 @@ class GetGeologyLayer(Action): layer.uscs_1_id_cli AS uscs_1, layer.uscs_2_id_cli AS uscs_2, COALESCE( - mcla101, '{}'::int[] + uscs_type, '{}'::int[] ) AS uscs_3, COALESCE( uscs_original_lay, '' @@ -314,11 +314,11 @@ class GetGeologyLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mcla101 + id_lay_fk, array_agg(id_cli_fk) as uscs_type FROM bdms.layer_codelist WHERE - code_cli = 'mcla101' + code_cli = 'uscs_type' GROUP BY id_lay_fk ) us3 ON us3.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py index 21e283a6e..f0512c6ee 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py @@ -63,7 +63,7 @@ class GetLayer(Action): layer.uscs_1_id_cli AS uscs_1, layer.uscs_2_id_cli AS uscs_2, COALESCE( - mcla101, '{}'::int[] + uscs_type, '{}'::int[] ) AS uscs_3, layer.lithology_top_bedrock_id_cli AS lithology_top_bedrock, COALESCE( @@ -179,11 +179,11 @@ class GetLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mcla101 + id_lay_fk, array_agg(id_cli_fk) as uscs_type FROM bdms.layer_codelist WHERE - code_cli = 'mcla101' + code_cli = 'uscs_type' GROUP BY id_lay_fk ) gsh ON gsh.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index 7f28923ad..b37081f34 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -185,10 +185,10 @@ async def execute(self, id, field, value, user_id): schema = 'mlpr116' elif field == 'uscs_1': - schema = 'mcla101' + schema = 'uscs_type' elif field == 'uscs_2': - schema = 'mcla101' + schema = 'uscs_type' elif field == 'uscs_determination': schema = 'mcla104' @@ -249,7 +249,7 @@ async def execute(self, id, field, value, user_id): schema = 'mlpr115' elif field == 'uscs_3': - schema = 'mcla101' + schema = 'uscs_type' # elif field == 'uscs_determination': # schema = 'mcla104' diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index 6e08b04bf..cb2fb11f2 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -87,13 +87,13 @@ public static void SeedData(this BdmsContext context) List cohesionIds = codelists.Where(c => c.Schema == "mlpr116").Select(s => s.Id).ToList(); List backfillTypeIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Select(s => s.Id).ToList(); List backfillMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Select(s => s.Id).ToList(); - List uscsIds = codelists.Where(c => c.Schema == "mcla101").Select(s => s.Id).ToList(); + List uscsIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); List uscsDeterminationIds = codelists.Where(c => c.Schema == "mcla104").Select(s => s.Id).ToList(); List gradationIds = codelists.Where(c => c.Schema == "gradation").Select(s => s.Id).ToList(); - List soilStateIds = codelists.Where(c => c.Schema == "mcla101").Select(s => s.Id).ToList(); // unclear with codelist - List kirostIds = codelists.Where(c => c.Schema == "mcla101").Select(s => s.Id).ToList(); // unclear with codelist - List grainSize1Ids = codelists.Where(c => c.Schema == "mlpr101").Select(s => s.Id).ToList(); // unclear with codelist - List grainSize2Ids = codelists.Where(c => c.Schema == "mlpr103").Select(s => s.Id).ToList(); // unclear with codelist + List soilStateIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist + List kirostIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist + List grainSize1Ids = codelists.Where(c => c.Schema == "mlpr109").Select(s => s.Id).ToList(); + List grainSize2Ids = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist List referenceElevationTypeIds = codelists.Where(c => c.Schema == "ibor117").Select(s => s.Id).ToList(); List waterIngressReliabilityIds = codelists.Where(c => c.Schema == HydrogeologySchemas.ObservationReliabilitySchema).Select(s => s.Id).ToList(); List waterIngressQuantityIds = codelists.Where(c => c.Schema == HydrogeologySchemas.WateringressQualitySchema).Select(s => s.Id).ToList(); @@ -533,7 +533,7 @@ int GetStratigraphyOrCasingId(int currentLayerId, int startId) .StrictMode(true) .RuleFor(o => o.LayerId, f => f.PickRandom(layerRange)) .RuleFor(o => o.CodelistId, f => f.PickRandom(uscsIds)) - .RuleFor(o => o.SchemaName, "mcla101") + .RuleFor(o => o.SchemaName, "uscs_type") .RuleFor(o => o.Layer, _ => default!) .RuleFor(o => o.Codelist, _ => default!); diff --git a/src/api/Models/Layer.cs b/src/api/Models/Layer.cs index 8a3a8d225..a4e874cef 100644 --- a/src/api/Models/Layer.cs +++ b/src/api/Models/Layer.cs @@ -161,24 +161,24 @@ public class Layer : ILayerDescription, IChangeTracking, IIdentifyable public Codelist? Cohesion { get; set; } /// - /// Gets or sets the id of the 's Uscs 1. + /// Gets or sets the id of the 's uscs type id 1. /// [Column("uscs_1_id_cli")] public int? Uscs1Id { get; set; } /// - /// Gets or sets the 's Uscs 1. + /// Gets or sets the 's uscs type 1. /// public Codelist? Uscs1 { get; set; } /// - /// Gets or sets the id of the 's Uscs 2. + /// Gets or sets the id of the 's uscs type id 2. /// [Column("uscs_2_id_cli")] public int? Uscs2Id { get; set; } /// - /// Gets or sets the 's Uscs 2. + /// Gets or sets the 's uscs type 2. /// public Codelist? Uscs2 { get; set; } diff --git a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js index fcc17b7ae..80672d720 100644 --- a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js +++ b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js @@ -243,7 +243,7 @@ const ProfileView = props => { {getDomainRow(layer.uscs2, "uscs_2")} {getDomainRow(layer.grainSize2, "grain_size_2")} {getDomainRowMultiple( - layer.codelists.filter(c => c.schema === "mcla101"), + layer.codelists.filter(c => c.schema === "uscs_type"), "uscs_3", )} {getDomainRowMultiple( diff --git a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js index 1e85ad566..621b6f091 100644 --- a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js +++ b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js @@ -85,7 +85,7 @@ const ProfileAttributes = props => { if (response?.codelists?.length > 0) { response["uscs_3"] = mapCodelistToAttribute( response.codelists, - "mcla101", + "uscs_type", ); response["grain_shape"] = mapCodelistToAttribute( response.codelists, diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js index b8e02de33..61bbba952 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js +++ b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js @@ -133,7 +133,7 @@ const ProfileLayersList = props => { let uscs3 = []; item?.codelists - .filter(c => c.schema === "mcla101") + .filter(c => c.schema === "uscs_type") .forEach(element => { uscs3.push(element[i18n.language]); }); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index 6df2868d4..7cbf613c9 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -98,7 +98,7 @@ export const stratigraphyData = { type: "Dropdown", label: "uscs_1", value: "uscs1Id", - schema: "mcla101", + schema: "uscs_type", multiple: false, search: false, isVisibleValue: "uscs_1", @@ -118,7 +118,7 @@ export const stratigraphyData = { type: "Dropdown", label: "uscs_2", value: "uscs2Id", - schema: "mcla101", + schema: "uscs_type", multiple: false, search: false, isVisibleValue: "uscs_2", @@ -138,7 +138,7 @@ export const stratigraphyData = { type: "Dropdown", label: "uscs_3", value: "uscs_3", - schema: "mcla101", + schema: "uscs_type", multiple: true, search: false, isVisibleValue: "uscs_3", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index ab82513ad..ff1ecb06f 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -100,7 +100,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "uscs_1", value: "uscs_1", - schema: "mcla101", + schema: "uscs_type", multiple: false, search: false, isVisibleValue: "layer.uscs_1", @@ -120,7 +120,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "uscs_2", value: "uscs_2", - schema: "mcla101", + schema: "uscs_type", multiple: false, search: false, isVisibleValue: "layer.uscs_2", @@ -140,7 +140,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "uscs_3", value: "uscs_3", - schema: "mcla101", + schema: "uscs_type", multiple: false, search: true, isVisibleValue: "layer.uscs_3", From b7ed019b99bc2ba589e5452599b2a6fd5d9b1b9d Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:08:04 +0100 Subject: [PATCH 07/36] Rename mcla104 to uscs_determination --- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 4 ++-- src/api/BdmsContextExtensions.cs | 2 +- src/client/src/commons/form/profile/data/stratigraphydata.js | 2 +- src/client/src/commons/search/data/lithologySearchData.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index b37081f34..bfdb4c9aa 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -191,7 +191,7 @@ async def execute(self, id, field, value, user_id): schema = 'uscs_type' elif field == 'uscs_determination': - schema = 'mcla104' + schema = 'uscs_determination' elif field == 'lithology_top_bedrock': schema = 'custom.lithology_top_bedrock' @@ -252,7 +252,7 @@ async def execute(self, id, field, value, user_id): schema = 'uscs_type' # elif field == 'uscs_determination': - # schema = 'mcla104' + # schema = 'uscs_determination' elif field == 'debris': schema = 'mcla107' diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index cb2fb11f2..e64656d88 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -88,7 +88,7 @@ public static void SeedData(this BdmsContext context) List backfillTypeIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Select(s => s.Id).ToList(); List backfillMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Select(s => s.Id).ToList(); List uscsIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); - List uscsDeterminationIds = codelists.Where(c => c.Schema == "mcla104").Select(s => s.Id).ToList(); + List uscsDeterminationIds = codelists.Where(c => c.Schema == "uscs_determination").Select(s => s.Id).ToList(); List gradationIds = codelists.Where(c => c.Schema == "gradation").Select(s => s.Id).ToList(); List soilStateIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist List kirostIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index 7cbf613c9..7a2fdaf67 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -88,7 +88,7 @@ export const stratigraphyData = { type: "Dropdown", label: "uscs_determination", value: "uscsDeterminationId", - schema: "mcla104", + schema: "uscs_determination", multiple: false, search: true, isVisibleValue: "uscs_determination", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index ff1ecb06f..4c407e4d6 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -90,7 +90,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "uscs_determination", value: "uscs_determination", - schema: "mcla104", + schema: "uscs_determination", multiple: false, search: true, isVisibleValue: "layer.uscs_determination", From 04b6ce991e3c3324bfb601ba0041cbc9644d6d0d Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:09:38 +0100 Subject: [PATCH 08/36] Rename mcla107 to debris --- src/api-legacy/v1/borehole/profile/layer/get.py | 6 +++--- src/api-legacy/v1/borehole/stratigraphy/layer/get.py | 6 +++--- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 2 +- src/client/cypress/e2e/codeList.cy.js | 4 ++-- .../detail/stratigrafy/profile/view/profileViewComponent.js | 2 +- .../components/profileAttributes/profileAttributes.js | 5 +---- .../components/profileLayersList/profileLayersList.js | 2 +- .../src/commons/form/profile/data/stratigraphydata.js | 2 +- src/client/src/commons/search/data/lithologySearchData.js | 2 +- tests/Controllers/CodeListControllerTest.cs | 2 +- 10 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/api-legacy/v1/borehole/profile/layer/get.py b/src/api-legacy/v1/borehole/profile/layer/get.py index 7a0673946..a68f630f0 100644 --- a/src/api-legacy/v1/borehole/profile/layer/get.py +++ b/src/api-legacy/v1/borehole/profile/layer/get.py @@ -208,7 +208,7 @@ class GetGeologyLayer(Action): ) AS original_lithology, uscs_determination_id_cli AS uscs_determination, COALESCE( - mcla107, '{}'::int[] + debris, '{}'::int[] ) AS debris, layer.lithology_top_bedrock_id_cli AS lithology_top_bedrock, COALESCE( @@ -336,11 +336,11 @@ class GetGeologyLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mcla107 + id_lay_fk, array_agg(id_cli_fk) as debris FROM bdms.layer_codelist WHERE - code_cli = 'mcla107' + code_cli = 'debris' GROUP BY id_lay_fk ) dbr ON dbr.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py index f0512c6ee..abb2988c8 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py @@ -74,7 +74,7 @@ class GetLayer(Action): ) AS original_lithology, uscs_determination_id_cli AS uscs_determination, COALESCE( - mcla107, '{}'::int[] + debris, '{}'::int[] ) AS debris, COALESCE( notes_lay, '' @@ -201,11 +201,11 @@ class GetLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mcla107 + id_lay_fk, array_agg(id_cli_fk) as debris FROM bdms.layer_codelist WHERE - code_cli = 'mcla107' + code_cli = 'debris' GROUP BY id_lay_fk ) dbr ON dbr.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index bfdb4c9aa..1f4753f25 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -255,7 +255,7 @@ async def execute(self, id, field, value, user_id): # schema = 'uscs_determination' elif field == 'debris': - schema = 'mcla107' + schema = 'debris' # elif field == 'lithology_top_bedrock': # schema = 'custom.lithology_top_bedrock' diff --git a/src/client/cypress/e2e/codeList.cy.js b/src/client/cypress/e2e/codeList.cy.js index 4157032a3..865b5bc0f 100644 --- a/src/client/cypress/e2e/codeList.cy.js +++ b/src/client/cypress/e2e/codeList.cy.js @@ -31,8 +31,8 @@ describe("Codelist translations tests", () => { cy.contains("p", "mlpr102").click(); cy.get("div[name=mlpr102]").children().should("have.length", 6); - cy.contains("p", "mcla107").click(); - cy.get("div[name=mcla107]").children().should("have.length", 6); + cy.contains("p", "debris").click(); + cy.get("div[name=debris]").children().should("have.length", 6); // assure input fields are empty cy.get("input[name=german-input]").should("have.value", ""); diff --git a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js index 80672d720..b5b545ee0 100644 --- a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js +++ b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js @@ -259,7 +259,7 @@ const ProfileView = props => { "organic_component", )} {getDomainRowMultiple( - layer.codelists.filter(c => c.schema === "mcla107"), + layer.codelists.filter(c => c.schema === "debris"), "debris", )} {getDomainRow( diff --git a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js index 621b6f091..9d42ff503 100644 --- a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js +++ b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js @@ -99,10 +99,7 @@ const ProfileAttributes = props => { response.codelists, "mlpr108", ); - response["debris"] = mapCodelistToAttribute( - response.codelists, - "mcla107", - ); + response["debris"] = mapCodelistToAttribute(response.codelists, "debris"); response["color"] = mapCodelistToAttribute(response.codelists, "mlpr112"); } setState({ diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js index 61bbba952..e310c8bdb 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js +++ b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js @@ -161,7 +161,7 @@ const ProfileLayersList = props => { let debris = []; item?.codelists - .filter(c => c.schema === "mcla107") + .filter(c => c.schema === "debris") .forEach(element => { debris.push(element[i18n.language]); }); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index 7a2fdaf67..ead76dde7 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -178,7 +178,7 @@ export const stratigraphyData = { type: "Dropdown", label: "debris", value: "debris", - schema: "mcla107", + schema: "debris", multiple: true, search: true, isVisibleValue: "debris", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index 4c407e4d6..f87d95a6f 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -180,7 +180,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "debris", value: "debris", - schema: "mcla107", + schema: "debris", multiple: false, search: true, isVisibleValue: "layer.debris", diff --git a/tests/Controllers/CodeListControllerTest.cs b/tests/Controllers/CodeListControllerTest.cs index 42d7e88a0..0991aa503 100644 --- a/tests/Controllers/CodeListControllerTest.cs +++ b/tests/Controllers/CodeListControllerTest.cs @@ -94,7 +94,7 @@ public async Task EditCodelistWithMinimalCodelist() { Id = id, Geolcode = id, - Schema = "mcla107", + Schema = "debris", De = "Tuff", Code = "Tuf", En = "tufa", From e27654e47bdc7668a4701d2f85f8aa4b9df5560e Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:10:34 +0100 Subject: [PATCH 09/36] Rename mlpr101 to plasticity --- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 2 +- src/api/BdmsContextExtensions.cs | 2 +- src/client/src/commons/form/profile/data/stratigraphydata.js | 2 +- src/client/src/commons/search/data/lithologySearchData.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index 1f4753f25..993c3679a 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -158,7 +158,7 @@ async def execute(self, id, field, value, user_id): schema = 'custom.lithostratigraphy_top_bedrock' elif field == 'plasticity': - schema = 'mlpr101' + schema = 'plasticity' elif field == 'humidity': schema = 'mlpr105' diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index e64656d88..6bdaf53c9 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -79,7 +79,7 @@ public static void SeedData(this BdmsContext context) List instrumentStatusIds = codelists.Where(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Select(s => s.Id).ToList(); List casingTypeIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingTypeSchema).Select(s => s.Id).ToList(); List casingMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Select(s => s.Id).ToList(); - List plasticityIds = codelists.Where(c => c.Schema == "mlpr101").Select(s => s.Id).ToList(); + List plasticityIds = codelists.Where(c => c.Schema == "plasticity").Select(s => s.Id).ToList(); List compactnessIds = codelists.Where(c => c.Schema == "mlpr102").Select(s => s.Id).ToList(); List consistanceIds = codelists.Where(c => c.Schema == "mlpr103").Select(s => s.Id).ToList(); List humidityIds = codelists.Where(c => c.Schema == "mlpr105").Select(s => s.Id).ToList(); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index ead76dde7..5017e5093 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -226,7 +226,7 @@ export const stratigraphyData = { type: "Dropdown", label: "plasticity", value: "plasticityId", - schema: "mlpr101", + schema: "plasticity", multiple: false, search: false, isVisibleValue: "plasticity", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index f87d95a6f..e8be4bf6f 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -229,7 +229,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "plasticity", value: "plasticity", - schema: "mlpr101", + schema: "plasticity", multiple: false, search: false, isVisibleValue: "layer.plasticity", From f45e45499250a4bb5fd6257196fe62d6d9094426 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:12:17 +0100 Subject: [PATCH 10/36] Rename mlpr102 to compactness --- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 2 +- src/api/BdmsContextExtensions.cs | 2 +- src/client/cypress/e2e/codeList.cy.js | 4 ++-- src/client/src/commons/form/profile/data/stratigraphydata.js | 2 +- src/client/src/commons/search/data/lithologySearchData.js | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index 993c3679a..76b6bc0b6 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -173,7 +173,7 @@ async def execute(self, id, field, value, user_id): schema = 'mlpr106' elif field == 'compactness': - schema = 'mlpr102' + schema = 'compactness' elif field == 'grain_size_1': schema = 'mlpr109' diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index 6bdaf53c9..7aebcb564 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -80,7 +80,7 @@ public static void SeedData(this BdmsContext context) List casingTypeIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingTypeSchema).Select(s => s.Id).ToList(); List casingMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Select(s => s.Id).ToList(); List plasticityIds = codelists.Where(c => c.Schema == "plasticity").Select(s => s.Id).ToList(); - List compactnessIds = codelists.Where(c => c.Schema == "mlpr102").Select(s => s.Id).ToList(); + List compactnessIds = codelists.Where(c => c.Schema == "compactness").Select(s => s.Id).ToList(); List consistanceIds = codelists.Where(c => c.Schema == "mlpr103").Select(s => s.Id).ToList(); List humidityIds = codelists.Where(c => c.Schema == "mlpr105").Select(s => s.Id).ToList(); List alterationIds = codelists.Where(c => c.Schema == "mlpr106").Select(s => s.Id).ToList(); diff --git a/src/client/cypress/e2e/codeList.cy.js b/src/client/cypress/e2e/codeList.cy.js index 865b5bc0f..e3635f6cb 100644 --- a/src/client/cypress/e2e/codeList.cy.js +++ b/src/client/cypress/e2e/codeList.cy.js @@ -29,8 +29,8 @@ describe("Codelist translations tests", () => { .find("button") .click(); - cy.contains("p", "mlpr102").click(); - cy.get("div[name=mlpr102]").children().should("have.length", 6); + cy.contains("p", "compactness").click(); + cy.get("div[name=compactness]").children().should("have.length", 6); cy.contains("p", "debris").click(); cy.get("div[name=debris]").children().should("have.length", 6); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index 5017e5093..ccc80cc07 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -236,7 +236,7 @@ export const stratigraphyData = { type: "Dropdown", label: "compactness", value: "compactnessId", - schema: "mlpr102", + schema: "compactness", multiple: false, search: false, isVisibleValue: "compactness", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index e8be4bf6f..1f801cb5a 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -239,7 +239,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "compactness", value: "compactness", - schema: "mlpr102", + schema: "compactness", multiple: false, search: false, isVisibleValue: "layer.compactness", From 3a029401c500d171befa6d2acb24a2709a3c27fa Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:13:23 +0100 Subject: [PATCH 11/36] Rename mlpr103 to consistancy --- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 2 +- src/api/BdmsContextExtensions.cs | 2 +- src/client/src/commons/form/profile/data/stratigraphydata.js | 2 +- src/client/src/commons/search/data/lithologySearchData.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index 76b6bc0b6..a964e786e 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -164,7 +164,7 @@ async def execute(self, id, field, value, user_id): schema = 'mlpr105' elif field == 'consistance': - schema = 'mlpr103' + schema = 'consistency' elif field == 'gradation': schema = 'gradation' diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index 7aebcb564..f0396b22f 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -81,7 +81,7 @@ public static void SeedData(this BdmsContext context) List casingMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Select(s => s.Id).ToList(); List plasticityIds = codelists.Where(c => c.Schema == "plasticity").Select(s => s.Id).ToList(); List compactnessIds = codelists.Where(c => c.Schema == "compactness").Select(s => s.Id).ToList(); - List consistanceIds = codelists.Where(c => c.Schema == "mlpr103").Select(s => s.Id).ToList(); + List consistanceIds = codelists.Where(c => c.Schema == "consistency").Select(s => s.Id).ToList(); List humidityIds = codelists.Where(c => c.Schema == "mlpr105").Select(s => s.Id).ToList(); List alterationIds = codelists.Where(c => c.Schema == "mlpr106").Select(s => s.Id).ToList(); List cohesionIds = codelists.Where(c => c.Schema == "mlpr116").Select(s => s.Id).ToList(); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index ccc80cc07..f7219e9c3 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -216,7 +216,7 @@ export const stratigraphyData = { type: "Dropdown", label: "consistance", value: "consistanceId", - schema: "mlpr103", + schema: "consistency", multiple: false, search: true, isVisibleValue: "consistance", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index 1f801cb5a..c3afa16b8 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -219,7 +219,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "consistance", value: "consistance", - schema: "mlpr103", + schema: "consistency", multiple: false, search: true, isVisibleValue: "layer.consistance", From 4b2a039b3f524107b30d890f29747ad235ff8f5e Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:13:56 +0100 Subject: [PATCH 12/36] Rename mlpr105 to humidity --- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 2 +- src/api/BdmsContextExtensions.cs | 2 +- src/client/src/commons/form/profile/data/stratigraphydata.js | 2 +- src/client/src/commons/search/data/lithologySearchData.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index a964e786e..74adde4ac 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -161,7 +161,7 @@ async def execute(self, id, field, value, user_id): schema = 'plasticity' elif field == 'humidity': - schema = 'mlpr105' + schema = 'humidity' elif field == 'consistance': schema = 'consistency' diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index f0396b22f..d04d0bff5 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -82,7 +82,7 @@ public static void SeedData(this BdmsContext context) List plasticityIds = codelists.Where(c => c.Schema == "plasticity").Select(s => s.Id).ToList(); List compactnessIds = codelists.Where(c => c.Schema == "compactness").Select(s => s.Id).ToList(); List consistanceIds = codelists.Where(c => c.Schema == "consistency").Select(s => s.Id).ToList(); - List humidityIds = codelists.Where(c => c.Schema == "mlpr105").Select(s => s.Id).ToList(); + List humidityIds = codelists.Where(c => c.Schema == "humidity").Select(s => s.Id).ToList(); List alterationIds = codelists.Where(c => c.Schema == "mlpr106").Select(s => s.Id).ToList(); List cohesionIds = codelists.Where(c => c.Schema == "mlpr116").Select(s => s.Id).ToList(); List backfillTypeIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Select(s => s.Id).ToList(); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index f7219e9c3..565b50249 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -266,7 +266,7 @@ export const stratigraphyData = { type: "Dropdown", label: "humidity", value: "humidityId", - schema: "mlpr105", + schema: "humidity", multiple: false, search: false, isVisibleValue: "humidity", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index c3afa16b8..7a51d1f90 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -269,7 +269,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "humidity", value: "humidity", - schema: "mlpr105", + schema: "humidity", multiple: false, search: false, isVisibleValue: "layer.humidity", From 3d97985be2672f38dfc9cd98d2bd2b4c4e4c845b Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:14:35 +0100 Subject: [PATCH 13/36] Rename mlpr106 to alteration --- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 2 +- src/api/BdmsContextExtensions.cs | 2 +- src/client/src/commons/form/profile/data/stratigraphydata.js | 2 +- src/client/src/commons/search/data/lithologySearchData.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index 74adde4ac..c4dccf579 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -170,7 +170,7 @@ async def execute(self, id, field, value, user_id): schema = 'gradation' elif field == 'alteration': - schema = 'mlpr106' + schema = 'alteration' elif field == 'compactness': schema = 'compactness' diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index d04d0bff5..45d9e7c3d 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -83,7 +83,7 @@ public static void SeedData(this BdmsContext context) List compactnessIds = codelists.Where(c => c.Schema == "compactness").Select(s => s.Id).ToList(); List consistanceIds = codelists.Where(c => c.Schema == "consistency").Select(s => s.Id).ToList(); List humidityIds = codelists.Where(c => c.Schema == "humidity").Select(s => s.Id).ToList(); - List alterationIds = codelists.Where(c => c.Schema == "mlpr106").Select(s => s.Id).ToList(); + List alterationIds = codelists.Where(c => c.Schema == "alteration").Select(s => s.Id).ToList(); List cohesionIds = codelists.Where(c => c.Schema == "mlpr116").Select(s => s.Id).ToList(); List backfillTypeIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Select(s => s.Id).ToList(); List backfillMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Select(s => s.Id).ToList(); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index 565b50249..734400e5e 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -276,7 +276,7 @@ export const stratigraphyData = { type: "Dropdown", label: "alteration", value: "alterationId", - schema: "mlpr106", + schema: "alteration", multiple: false, search: false, isVisibleValue: "alteration", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index 7a51d1f90..21a738171 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -279,7 +279,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "alteration", value: "alteration", - schema: "mlpr106", + schema: "alteration", multiple: false, search: false, isVisibleValue: "layer.alteration", From 88a93786579bc9149947e3c70b1de16815f43385 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:18:06 +0100 Subject: [PATCH 14/36] Rename mlpr108 to organic_components --- src/api-legacy/v1/borehole/profile/layer/get.py | 6 +++--- src/api-legacy/v1/borehole/stratigraphy/layer/get.py | 6 +++--- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 2 +- .../detail/stratigrafy/profile/view/profileViewComponent.js | 2 +- .../components/profileAttributes/profileAttributes.js | 2 +- .../components/profileLayersList/profileLayersList.js | 2 +- .../src/commons/form/profile/data/stratigraphydata.js | 2 +- src/client/src/commons/search/data/lithologySearchData.js | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/api-legacy/v1/borehole/profile/layer/get.py b/src/api-legacy/v1/borehole/profile/layer/get.py index a68f630f0..9274b9804 100644 --- a/src/api-legacy/v1/borehole/profile/layer/get.py +++ b/src/api-legacy/v1/borehole/profile/layer/get.py @@ -183,7 +183,7 @@ class GetGeologyLayer(Action): mlpr113, '{}'::int[] ) AS jointing,*/ COALESCE( - mlpr108, '{}'::int[] + organic_components, '{}'::int[] ) AS organic_component, striae_lay AS striae, layer.grain_size_1_id_cli AS grain_size_1, @@ -292,11 +292,11 @@ class GetGeologyLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr108 + id_lay_fk, array_agg(id_cli_fk) as organic_components FROM bdms.layer_codelist WHERE - code_cli = 'mlpr108' + code_cli = 'organic_components' GROUP BY id_lay_fk ) oco ON oco.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py index abb2988c8..4dd3196be 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py @@ -48,7 +48,7 @@ class GetLayer(Action): layer.alteration_id_cli AS alteration, layer.compactness_id_cli AS compactness, COALESCE( - mlpr108, '{}'::int[] + organic_components, '{}'::int[] ) AS organic_component, striae_lay AS striae, layer.grain_size_1_id_cli AS grain_size_1, @@ -157,11 +157,11 @@ class GetLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr108 + id_lay_fk, array_agg(id_cli_fk) as organic_components FROM bdms.layer_codelist WHERE - code_cli = 'mlpr108' + code_cli = 'organic_components' GROUP BY id_lay_fk ) oco ON oco.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index c4dccf579..15f8d4fab 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -240,7 +240,7 @@ async def execute(self, id, field, value, user_id): schema = 'mlpr112' elif field == 'organic_component': - schema = 'mlpr108' + schema = 'organic_components' elif field == 'grain_shape': schema = 'mlpr110' diff --git a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js index b5b545ee0..0c4e1b747 100644 --- a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js +++ b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js @@ -255,7 +255,7 @@ const ProfileView = props => { "grain_granularity", )} {getDomainRowMultiple( - layer.codelists.filter(c => c.schema === "mlpr108"), + layer.codelists.filter(c => c.schema === "organic_components"), "organic_component", )} {getDomainRowMultiple( diff --git a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js index 9d42ff503..b992ba37d 100644 --- a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js +++ b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js @@ -97,7 +97,7 @@ const ProfileAttributes = props => { ); response["organic_component"] = mapCodelistToAttribute( response.codelists, - "mlpr108", + "organic_components", ); response["debris"] = mapCodelistToAttribute(response.codelists, "debris"); response["color"] = mapCodelistToAttribute(response.codelists, "mlpr112"); diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js index e310c8bdb..3bf7fad9f 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js +++ b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js @@ -154,7 +154,7 @@ const ProfileLayersList = props => { let organicCompounds = []; item?.codelists - .filter(c => c.schema === "mlpr108") + .filter(c => c.schema === "organic_components") .forEach(element => { organicCompounds.push(element[i18n.language]); }); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index 734400e5e..8c9f7ed96 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -168,7 +168,7 @@ export const stratigraphyData = { type: "Dropdown", label: "organic_component", value: "organic_component", - schema: "mlpr108", + schema: "organic_components", multiple: true, search: true, isVisibleValue: "organic_component", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index 21a738171..65201102c 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -170,7 +170,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "organic_component", value: "organic_component", - schema: "mlpr108", + schema: "organic_components", multiple: false, search: true, isVisibleValue: "layer.organic_component", From 839fe6989cb941f693a996f868d28538fe540ea2 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:18:59 +0100 Subject: [PATCH 15/36] Rename mlpr109 to grain_size --- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 4 ++-- src/api/BdmsContextExtensions.cs | 2 +- src/client/src/commons/form/profile/data/stratigraphydata.js | 4 ++-- src/client/src/commons/search/data/lithologySearchData.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index 15f8d4fab..4014f9c1a 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -176,10 +176,10 @@ async def execute(self, id, field, value, user_id): schema = 'compactness' elif field == 'grain_size_1': - schema = 'mlpr109' + schema = 'grain_size' elif field == 'grain_size_2': - schema = 'mlpr109' + schema = 'grain_size' elif field == 'cohesion': schema = 'mlpr116' diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index 45d9e7c3d..c9e59f639 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -92,7 +92,7 @@ public static void SeedData(this BdmsContext context) List gradationIds = codelists.Where(c => c.Schema == "gradation").Select(s => s.Id).ToList(); List soilStateIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist List kirostIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist - List grainSize1Ids = codelists.Where(c => c.Schema == "mlpr109").Select(s => s.Id).ToList(); + List grainSize1Ids = codelists.Where(c => c.Schema == "grain_size").Select(s => s.Id).ToList(); List grainSize2Ids = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist List referenceElevationTypeIds = codelists.Where(c => c.Schema == "ibor117").Select(s => s.Id).ToList(); List waterIngressReliabilityIds = codelists.Where(c => c.Schema == HydrogeologySchemas.ObservationReliabilitySchema).Select(s => s.Id).ToList(); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index 8c9f7ed96..594adc4fb 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -108,7 +108,7 @@ export const stratigraphyData = { type: "Dropdown", label: "grain_size_1", value: "grainSize1Id", - schema: "mlpr109", + schema: "grain_size", multiple: false, search: false, isVisibleValue: "grain_size_1", @@ -128,7 +128,7 @@ export const stratigraphyData = { type: "Dropdown", label: "grain_size_2", value: "grainSize2Id", - schema: "mlpr109", + schema: "grain_size", multiple: false, search: false, isVisibleValue: "grain_size_2", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index 65201102c..71ae948d4 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -110,7 +110,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "grain_size_1", value: "grain_size_1", - schema: "mlpr109", + schema: "grain_size", multiple: false, search: false, isVisibleValue: "layer.grain_size_1", @@ -130,7 +130,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "grain_size_2", value: "grain_size_2", - schema: "mlpr109", + schema: "grain_size", multiple: false, search: false, isVisibleValue: "layer.grain_size_2", From 4374cff766828ca2e6887bc34f3c103604fd69e3 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:19:52 +0100 Subject: [PATCH 16/36] Rename mlpr110 to grain_shape --- src/api-legacy/v1/borehole/profile/layer/get.py | 6 +++--- src/api-legacy/v1/borehole/stratigraphy/layer/get.py | 6 +++--- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 2 +- .../detail/stratigrafy/profile/view/profileViewComponent.js | 2 +- .../components/profileAttributes/profileAttributes.js | 2 +- .../components/profileLayersList/profileLayersList.js | 2 +- .../src/commons/form/profile/data/stratigraphydata.js | 2 +- src/client/src/commons/search/data/lithologySearchData.js | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/api-legacy/v1/borehole/profile/layer/get.py b/src/api-legacy/v1/borehole/profile/layer/get.py index 9274b9804..c8e543c4b 100644 --- a/src/api-legacy/v1/borehole/profile/layer/get.py +++ b/src/api-legacy/v1/borehole/profile/layer/get.py @@ -189,7 +189,7 @@ class GetGeologyLayer(Action): layer.grain_size_1_id_cli AS grain_size_1, layer.grain_size_2_id_cli AS grain_size_2, COALESCE( - mlpr110, '{}'::int[] + grain_shape, '{}'::int[] ) AS grain_shape, COALESCE( mlpr115, '{}'::int[] @@ -303,11 +303,11 @@ class GetGeologyLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr110 + id_lay_fk, array_agg(id_cli_fk) as grain_shape FROM bdms.layer_codelist WHERE - code_cli = 'mlpr110' + code_cli = 'grain_shape' GROUP BY id_lay_fk ) gsh ON gsh.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py index 4dd3196be..9d8a56580 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py @@ -54,7 +54,7 @@ class GetLayer(Action): layer.grain_size_1_id_cli AS grain_size_1, layer.grain_size_2_id_cli AS grain_size_2, COALESCE( - mlpr110, '{}'::int[] + grain_shape, '{}'::int[] ) AS grain_shape, COALESCE( mlpr115, '{}'::int[] @@ -168,11 +168,11 @@ class GetLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr110 + id_lay_fk, array_agg(id_cli_fk) as grain_shape FROM bdms.layer_codelist WHERE - code_cli = 'mlpr110' + code_cli = 'grain_shape' GROUP BY id_lay_fk ) us3 ON us3.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index 4014f9c1a..29bd56f79 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -243,7 +243,7 @@ async def execute(self, id, field, value, user_id): schema = 'organic_components' elif field == 'grain_shape': - schema = 'mlpr110' + schema = 'grain_shape' elif field == 'grain_granularity': schema = 'mlpr115' diff --git a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js index 0c4e1b747..060e0d8ef 100644 --- a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js +++ b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js @@ -247,7 +247,7 @@ const ProfileView = props => { "uscs_3", )} {getDomainRowMultiple( - layer.codelists.filter(c => c.schema === "mlpr110"), + layer.codelists.filter(c => c.schema === "grain_shape"), "grain_shape", )} {getDomainRowMultiple( diff --git a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js index b992ba37d..720ebf602 100644 --- a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js +++ b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js @@ -89,7 +89,7 @@ const ProfileAttributes = props => { ); response["grain_shape"] = mapCodelistToAttribute( response.codelists, - "mlpr110", + "grain_shape", ); response["grain_granularity"] = mapCodelistToAttribute( response.codelists, diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js index 3bf7fad9f..93de6ace3 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js +++ b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js @@ -140,7 +140,7 @@ const ProfileLayersList = props => { let grainshape = []; item?.codelists - .filter(c => c.schema === "mlpr110") + .filter(c => c.schema === "grain_shape") .forEach(element => { grainshape.push(element[i18n.language]); }); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index 594adc4fb..beaaa9af1 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -148,7 +148,7 @@ export const stratigraphyData = { type: "Dropdown", label: "grain_shape", value: "grain_shape", - schema: "mlpr110", + schema: "grain_shape", multiple: true, search: true, isVisibleValue: "grain_shape", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index 71ae948d4..27722a341 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -150,7 +150,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "grain_shape", value: "grain_shape", - schema: "mlpr110", + schema: "grain_shape", multiple: false, search: true, isVisibleValue: "layer.grain_shape", From 30ab275e883ee5f8fc1930d0c644cba3c00334e4 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:32:47 +0100 Subject: [PATCH 17/36] Rename qt_description to description_quality --- src/api-legacy/v1/action.py | 4 ++-- src/api-legacy/v1/borehole/profile/layer/get.py | 2 +- .../v1/borehole/stratigraphy/layer/get.py | 2 +- .../v1/borehole/stratigraphy/layer/patch.py | 4 ++-- src/api/BdmsContext.cs | 2 +- src/api/BdmsContextExtensions.cs | 14 +++++++------- src/api/Controllers/FaciesDescriptionController.cs | 4 ++-- src/api/Controllers/LayerController.cs | 2 +- .../LithologicalDescriptionController.cs | 4 ++-- src/api/Controllers/UploadController.cs | 2 +- src/api/Controllers/UserController.cs | 2 +- src/api/Models/FaciesDescription.cs | 4 ++-- src/api/Models/Layer.cs | 4 ++-- src/api/Models/LithologicalDescription.cs | 4 ++-- src/client/public/locale/common.json | 2 +- src/client/public/locale/de/common.json | 2 +- src/client/public/locale/en/common.json | 2 +- src/client/public/locale/fr/common.json | 2 +- src/client/public/locale/it/common.json | 2 +- .../profile/view/profileViewComponent.js | 2 +- .../profileAttributes/profileAttributes.js | 2 +- .../descriptionLayers/descriptionDisplay.js | 4 ++-- .../descriptionLayers/descriptionInput.js | 10 +++++----- .../descriptionLayers/descriptionLayers.js | 14 +++++++------- .../commons/form/profile/data/stratigraphydata.js | 6 +++--- .../src/commons/search/data/lithologySearchData.js | 8 ++++---- .../src/commons/search/editor/searchEditorState.js | 2 +- src/client/src/commons/search/searchState.js | 2 +- .../settings/data/lithologyFieldEditorData.js | 4 ++-- .../settings/data/lithologyFilterEditorData.js | 4 ++-- tests/Controllers/CodeListControllerTest.cs | 4 ++-- .../Controllers/FaciesDescriptionControllerTest.cs | 12 ++++++------ tests/Controllers/LayerControllerTest.cs | 6 +++--- .../LithologicalDescriptionControllerTest.cs | 12 ++++++------ tests/Controllers/UploadControllerTest.cs | 2 +- 35 files changed, 79 insertions(+), 79 deletions(-) diff --git a/src/api-legacy/v1/action.py b/src/api-legacy/v1/action.py index ec60e6d42..b78648548 100644 --- a/src/api-legacy/v1/action.py +++ b/src/api-legacy/v1/action.py @@ -389,8 +389,8 @@ def filterProfileLayers(self, filter={}): cohesion_id_cli = %s """ % self.getIdx()) - if 'qt_description' in keys and filter['qt_description'] not in ['', None]: - params.append(filter['qt_description']) + if 'description_quality' in keys and filter['description_quality'] not in ['', None]: + params.append(filter['description_quality']) where.append(""" qt_description_id_cli = %s """ % self.getIdx()) diff --git a/src/api-legacy/v1/borehole/profile/layer/get.py b/src/api-legacy/v1/borehole/profile/layer/get.py index c8e543c4b..8f8b1f6a6 100644 --- a/src/api-legacy/v1/borehole/profile/layer/get.py +++ b/src/api-legacy/v1/borehole/profile/layer/get.py @@ -167,7 +167,7 @@ class GetGeologyLayer(Action): depth_from_lay AS depth_from, depth_to_lay AS depth_to, last_lay AS last, - layer.qt_description_id_cli AS qt_description, + layer.qt_description_id_cli AS description_quality, layer.lithology_id_cli AS lithology, layer.lithostratigraphy_id_cli AS lithostratigraphy, COALESCE( diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py index 9d8a56580..9716fe9a8 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py @@ -35,7 +35,7 @@ class GetLayer(Action): depth_from_lay AS depth_from, depth_to_lay AS depth_to, last_lay AS last, - layer.qt_description_id_cli AS qt_description, + layer.qt_description_id_cli AS description_quality, layer.lithology_id_cli AS lithology, layer.lithostratigraphy_id_cli AS lithostratigraphy, COALESCE( diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index 29bd56f79..e4967c04e 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -20,7 +20,7 @@ def get_column(field): elif field == 'last': column = 'last_lay' - elif field == 'qt_description': + elif field == 'description_quality': column = 'qt_description_id_cli' elif field == 'lithology': @@ -132,7 +132,7 @@ async def execute(self, id, field, value, user_id): """ % column, value, user_id, id) elif field in [ - 'qt_description', + 'description_quality', 'lithology', 'lithostratigraphy', 'plasticity', diff --git a/src/api/BdmsContext.cs b/src/api/BdmsContext.cs index 1d7e053c5..82931d5bf 100644 --- a/src/api/BdmsContext.cs +++ b/src/api/BdmsContext.cs @@ -159,7 +159,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity().HasOne(l => l.LithologyTopBedrock).WithMany().HasForeignKey(l => l.LithologyTopBedrockId); modelBuilder.Entity().HasOne(l => l.Lithostratigraphy).WithMany().HasForeignKey(l => l.LithostratigraphyId); modelBuilder.Entity().HasOne(l => l.Plasticity).WithMany().HasForeignKey(l => l.PlasticityId); - modelBuilder.Entity().HasOne(l => l.QtDescription).WithMany().HasForeignKey(l => l.QtDescriptionId); + modelBuilder.Entity().HasOne(l => l.DescriptionQuality).WithMany().HasForeignKey(l => l.DescriptionQualityId); modelBuilder.Entity().HasOne(l => l.Uscs1).WithMany().HasForeignKey(l => l.Uscs1Id); modelBuilder.Entity().HasOne(l => l.Uscs2).WithMany().HasForeignKey(l => l.Uscs2Id); modelBuilder.Entity().HasOne(l => l.UscsDetermination).WithMany().HasForeignKey(l => l.UscsDeterminationId); diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index c9e59f639..40ad9a632 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -63,7 +63,7 @@ public static void SeedData(this BdmsContext context) List hrsIds = codelists.Where(c => c.Schema == "hrs").Select(s => s.Id).ToList(); List restrictionIds = codelists.Where(c => c.Schema == "restriction").Select(s => s.Id).ToList(); List locationPrecisionIds = codelists.Where(c => c.Schema == "location_precision").Select(s => s.Id).ToList(); - List qtDescriptionIds = codelists.Where(c => c.Schema == "qt_description").Select(s => s.Id).ToList(); + List descriptionQualityIds = codelists.Where(c => c.Schema == "description_quality").Select(s => s.Id).ToList(); List drillingMethodIds = codelists.Where(c => c.Schema == "drilling_method").Select(s => s.Id).ToList(); List cuttingsIds = codelists.Where(c => c.Schema == "borehole_cuttings_core").Select(s => s.Id).ToList(); List qtDepthIds = codelists.Where(c => c.Schema == "depth_precision").Select(s => s.Id).ToList(); @@ -342,8 +342,8 @@ int GetStratigraphyOrCasingId(int currentLayerId, int startId) .RuleFor(o => o.Lithostratigraphy, _ => default!) .RuleFor(o => o.PlasticityId, f => f.PickRandom(plasticityIds).OrNull(f, .05f)) .RuleFor(o => o.Plasticity, _ => default!) - .RuleFor(o => o.QtDescriptionId, f => f.PickRandom(qtDescriptionIds).OrNull(f, .05f)) - .RuleFor(o => o.QtDescription, _ => default!) + .RuleFor(o => o.DescriptionQualityId, f => f.PickRandom(descriptionQualityIds).OrNull(f, .05f)) + .RuleFor(o => o.DescriptionQuality, _ => default!) .RuleFor(o => o.StratigraphyId, f => GetStratigraphyOrCasingId(layer_ids, 7_000_000)) .RuleFor(o => o.Stratigraphy, _ => default!) .RuleFor(o => o.IsStriae, f => f.Random.Bool()) @@ -402,8 +402,8 @@ int GetStratigraphyOrCasingId(int currentLayerId, int startId) .StrictMode(true) .RuleFor(o => o.FromDepth, f => (lithologicalDescription_ids % 10) * 10) .RuleFor(o => o.ToDepth, f => ((lithologicalDescription_ids % 10) + 1) * 10) - .RuleFor(o => o.QtDescriptionId, f => f.PickRandom(qtDescriptionIds).OrNull(f, .05f)) - .RuleFor(o => o.QtDescription, _ => default!) + .RuleFor(o => o.DescriptionQualityId, f => f.PickRandom(descriptionQualityIds).OrNull(f, .05f)) + .RuleFor(o => o.DescriptionQuality, _ => default!) .RuleFor(o => o.StratigraphyId, f => GetStratigraphyOrCasingId(lithologicalDescription_ids, 9_000_000)) .RuleFor(o => o.Stratigraphy, _ => default!) .RuleFor(o => o.Description, f => f.Random.Words(3).OrNull(f, .05f)) @@ -435,8 +435,8 @@ int GetStratigraphyOrCasingId(int currentLayerId, int startId) .StrictMode(true) .RuleFor(o => o.FromDepth, f => (faciesDescription_ids % 10) * 10) .RuleFor(o => o.ToDepth, f => ((faciesDescription_ids % 10) + 1) * 10) - .RuleFor(o => o.QtDescriptionId, f => f.PickRandom(qtDescriptionIds).OrNull(f, .05f)) - .RuleFor(o => o.QtDescription, _ => default!) + .RuleFor(o => o.DescriptionQualityId, f => f.PickRandom(descriptionQualityIds).OrNull(f, .05f)) + .RuleFor(o => o.DescriptionQuality, _ => default!) .RuleFor(o => o.StratigraphyId, f => GetStratigraphyOrCasingId(faciesDescription_ids, 10_000_000)) .RuleFor(o => o.Stratigraphy, _ => default!) .RuleFor(o => o.Description, f => f.Random.Words(3).OrNull(f, .05f)) diff --git a/src/api/Controllers/FaciesDescriptionController.cs b/src/api/Controllers/FaciesDescriptionController.cs index 7108e121d..1b29c328f 100644 --- a/src/api/Controllers/FaciesDescriptionController.cs +++ b/src/api/Controllers/FaciesDescriptionController.cs @@ -24,7 +24,7 @@ public FaciesDescriptionController(BdmsContext context, ILogger> GetAsync([FromQuery] int? stratigraphyId = null) { var faciesDescriptions = Context.FaciesDescriptions - .Include(l => l.QtDescription) + .Include(l => l.DescriptionQuality) .AsNoTracking(); if (stratigraphyId != null) @@ -44,7 +44,7 @@ public async Task> GetAsync([FromQuery] int? stra public async Task> GetByIdAsync(int id) { var faciesDescription = await Context.FaciesDescriptions - .Include(l => l.QtDescription) + .Include(l => l.DescriptionQuality) .AsNoTracking() .SingleOrDefaultAsync(l => l.Id == id) .ConfigureAwait(false); diff --git a/src/api/Controllers/LayerController.cs b/src/api/Controllers/LayerController.cs index 56c748087..d24eb1292 100644 --- a/src/api/Controllers/LayerController.cs +++ b/src/api/Controllers/LayerController.cs @@ -127,7 +127,7 @@ public override async Task> CreateAsync(Layer entity) private IQueryable GetLayersWithIncludes() { return Context.Layers - .Include(l => l.QtDescription) + .Include(l => l.DescriptionQuality) .Include(l => l.Lithology) .Include(l => l.Plasticity) .Include(l => l.Consistance) diff --git a/src/api/Controllers/LithologicalDescriptionController.cs b/src/api/Controllers/LithologicalDescriptionController.cs index 4bf471be4..4e7c966d8 100644 --- a/src/api/Controllers/LithologicalDescriptionController.cs +++ b/src/api/Controllers/LithologicalDescriptionController.cs @@ -24,7 +24,7 @@ public LithologicalDescriptionController(BdmsContext context, ILogger> GetAsync([FromQuery] int? stratigraphyId = null) { var lithologicalDescriptions = Context.LithologicalDescriptions - .Include(l => l.QtDescription) + .Include(l => l.DescriptionQuality) .AsNoTracking(); if (stratigraphyId != null) @@ -44,7 +44,7 @@ public async Task> GetAsync([FromQuery] int public async Task> GetByIdAsync(int id) { var lithologicalDescription = await Context.LithologicalDescriptions - .Include(l => l.QtDescription) + .Include(l => l.DescriptionQuality) .AsNoTracking() .SingleOrDefaultAsync(l => l.Id == id) .ConfigureAwait(false); diff --git a/src/api/Controllers/UploadController.cs b/src/api/Controllers/UploadController.cs index b149a2d34..650c9e7d5 100644 --- a/src/api/Controllers/UploadController.cs +++ b/src/api/Controllers/UploadController.cs @@ -573,7 +573,7 @@ public CsvImportLithologyMap() Map(m => m.Updated).Optional(); Map(m => m.IsUndefined).Optional(); Map(m => m.IsLast).Optional(); - Map(m => m.QtDescriptionId).Optional(); + Map(m => m.DescriptionQualityId).Optional(); Map(m => m.LithologyId).Optional(); Map(m => m.PlasticityId).Optional(); Map(m => m.ConsistanceId).Optional(); diff --git a/src/api/Controllers/UserController.cs b/src/api/Controllers/UserController.cs index 89fb9c9e8..7fb5cda25 100644 --- a/src/api/Controllers/UserController.cs +++ b/src/api/Controllers/UserController.cs @@ -68,7 +68,7 @@ public ActionResult ResetAllSettings() context.Database.ExecuteSqlRaw("UPDATE bdms.users SET settings_usr = '{{\"filter\": {{\"custom\": {{\"borehole_identifier\": true, \"project_name\": true, \"landuse\": true, \"alternate_name\": true, \"canton\": true, \"city\": true}}, \"restriction\": true, \"mapfilter\": true, \"restriction_until\": true, \"extended\": {{ \"original_name\": true, \"method\": true, \"status\": true}}, \"kind\": true, \"elevation_z\": true, \"length\": true, \"drilling_date\": true, \"zoom2selected\": true}}, \"boreholetable\": {{ \"orderby\": \"original_name\", \"direction\": \"ASC\"}}, \"eboreholetable\": {{ \"orderby\": \"creation\", \"direction\": \"DESC\"}}, \"map\": {{ \"explorer\": {{ }}, \"editor\": {{ }} }}, \"appearance\": {{ \"explorer\": 1}}}}' WHERE username = 'admin';"); // Reset codelist settings to initial state - context.Database.ExecuteSqlRaw("UPDATE bdms.codelist SET conf_cli = '{{\"text\": \"lithology_id_cli\", \"color\": \"lithostratigraphy\", \"title\": \"lithostratigraphy_id_cli\", \"fields\": {{\"color\": true, \"notes\": true, \"debris\": true, \"striae\": true, \"uscs_1\": true, \"uscs_2\": true, \"uscs_3\": true, \"geology\": true, \"cohesion\": true, \"humidity\": true, \"jointing\": true, \"lithology\": true, \"alteration\": true, \"plasticity\": true, \"soil_state\": true, \"compactness\": true, \"consistance\": true, \"description\": true, \"grain_shape\": true, \"lit_pet_deb\": true, \"grain_size_1\": true, \"grain_size_2\": true, \"tectonic_unit\": true, \"uscs_original\": true, \"qt_description\": true, \"grain_granularity\": true, \"lithostratigraphy\": true, \"organic_component\": true, \"chronostratigraphy\": true, \"further_properties\": true, \"uscs_determination\": true}}, \"textNS\": \"custom.lithology_top_bedrock\", \"colorNS\": \"custom.lithostratigraphy_top_bedrock\", \"pattern\": \"lithology\", \"titleNS\": \"custom.chro_str_top_bedrock\", \"patternNS\": \"custom.lithology_top_bedrock\"}}' WHERE conf_cli IS NOT NULL and schema_cli = 'layer_kind';"); + context.Database.ExecuteSqlRaw("UPDATE bdms.codelist SET conf_cli = '{{\"text\": \"lithology_id_cli\", \"color\": \"lithostratigraphy\", \"title\": \"lithostratigraphy_id_cli\", \"fields\": {{\"color\": true, \"notes\": true, \"debris\": true, \"striae\": true, \"uscs_1\": true, \"uscs_2\": true, \"uscs_3\": true, \"geology\": true, \"cohesion\": true, \"humidity\": true, \"jointing\": true, \"lithology\": true, \"alteration\": true, \"plasticity\": true, \"soil_state\": true, \"compactness\": true, \"consistance\": true, \"description\": true, \"grain_shape\": true, \"lit_pet_deb\": true, \"grain_size_1\": true, \"grain_size_2\": true, \"tectonic_unit\": true, \"uscs_original\": true, \"description_quality\": true, \"grain_granularity\": true, \"lithostratigraphy\": true, \"organic_component\": true, \"chronostratigraphy\": true, \"further_properties\": true, \"uscs_determination\": true}}, \"textNS\": \"custom.lithology_top_bedrock\", \"colorNS\": \"custom.lithostratigraphy_top_bedrock\", \"pattern\": \"lithology\", \"titleNS\": \"custom.chro_str_top_bedrock\", \"patternNS\": \"custom.lithology_top_bedrock\"}}' WHERE conf_cli IS NOT NULL and schema_cli = 'layer_kind';"); return Ok(); } diff --git a/src/api/Models/FaciesDescription.cs b/src/api/Models/FaciesDescription.cs index 8921ca861..eedf86a65 100644 --- a/src/api/Models/FaciesDescription.cs +++ b/src/api/Models/FaciesDescription.cs @@ -53,12 +53,12 @@ public class FaciesDescription : ILayerDescription, IChangeTracking, IIdentifyab /// Gets or sets the id of the quality of the 's description. /// [Column("qt_description_id")] - public int? QtDescriptionId { get; set; } + public int? DescriptionQualityId { get; set; } /// /// Gets or sets the quality of the 's description. /// - public Codelist? QtDescription { get; set; } + public Codelist? DescriptionQuality { get; set; } /// [Column("depth_from")] diff --git a/src/api/Models/Layer.cs b/src/api/Models/Layer.cs index a4e874cef..a94e1cd94 100644 --- a/src/api/Models/Layer.cs +++ b/src/api/Models/Layer.cs @@ -65,12 +65,12 @@ public class Layer : ILayerDescription, IChangeTracking, IIdentifyable /// Gets or sets the id of the quality of the 's description. /// [Column("qt_description_id_cli")] - public int? QtDescriptionId { get; set; } + public int? DescriptionQualityId { get; set; } /// /// Gets or sets the quality of the 's description. /// - public Codelist? QtDescription { get; set; } + public Codelist? DescriptionQuality { get; set; } /// /// Gets or sets the id of the 's lithology. diff --git a/src/api/Models/LithologicalDescription.cs b/src/api/Models/LithologicalDescription.cs index a9a8ffe56..d803d1ff9 100644 --- a/src/api/Models/LithologicalDescription.cs +++ b/src/api/Models/LithologicalDescription.cs @@ -53,12 +53,12 @@ public class LithologicalDescription : ILayerDescription, IChangeTracking, IIden /// Gets or sets the id of the quality of the 's description. /// [Column("qt_description_id")] - public int? QtDescriptionId { get; set; } + public int? DescriptionQualityId { get; set; } /// /// Gets or sets the quality of the 's description. /// - public Codelist? QtDescription { get; set; } + public Codelist? DescriptionQuality { get; set; } /// [Column("depth_from")] diff --git a/src/client/public/locale/common.json b/src/client/public/locale/common.json index 2e3675aa6..9eb9a1d8f 100644 --- a/src/client/public/locale/common.json +++ b/src/client/public/locale/common.json @@ -208,7 +208,7 @@ "organic_component": "", "plasticity": "", "completeness": "", - "qt_description": "", + "description_quality": "", "striae": "", "uscs_1": "", "uscs_2": "", diff --git a/src/client/public/locale/de/common.json b/src/client/public/locale/de/common.json index 5679f81f4..79591433f 100644 --- a/src/client/public/locale/de/common.json +++ b/src/client/public/locale/de/common.json @@ -217,7 +217,7 @@ "organic_component": "Organische Komponenten", "plasticity": "Plastizität", "completeness": "Vollständigkeit der Einträge", - "qt_description": "Qualität der Beschreibung", + "description_quality": "Qualität der Beschreibung", "striae": "Striemung", "uscs_1": "USCS 1", "uscs_2": "USCS 2", diff --git a/src/client/public/locale/en/common.json b/src/client/public/locale/en/common.json index 27c863d38..56495cf50 100644 --- a/src/client/public/locale/en/common.json +++ b/src/client/public/locale/en/common.json @@ -217,7 +217,7 @@ "organic_component": "Organic components", "plasticity": "Plasticity", "completeness": "Completeness of entries", - "qt_description": "Quality of the description", + "description_quality": "Quality of the description", "striae": "Striations", "uscs_1": "USCS 1", "uscs_2": "USCS 2", diff --git a/src/client/public/locale/fr/common.json b/src/client/public/locale/fr/common.json index e5d6583be..d531f1451 100644 --- a/src/client/public/locale/fr/common.json +++ b/src/client/public/locale/fr/common.json @@ -217,7 +217,7 @@ "organic_component": "Composants organiques", "plasticity": "Plasticité", "completeness": "Exhaustivité des informations", - "qt_description": "Qualité de la description", + "description_quality": "Qualité de la description", "striae": "Stries", "uscs_1": "USCS 1", "uscs_2": "USCS 2", diff --git a/src/client/public/locale/it/common.json b/src/client/public/locale/it/common.json index 0f2c6ae76..86284c986 100644 --- a/src/client/public/locale/it/common.json +++ b/src/client/public/locale/it/common.json @@ -217,7 +217,7 @@ "organic_component": "Componenti organici", "plasticity": "Plasticità", "completeness": "Integralità dei dati", - "qt_description": "Qualità della descrizione", + "description_quality": "Qualità della descrizione", "striae": "Strie", "uscs_1": "USCS 1", "uscs_2": "USCS 2", diff --git a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js index 060e0d8ef..5c957e2b5 100644 --- a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js +++ b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js @@ -232,7 +232,7 @@ const ProfileView = props => { ? t("common:no") : null, )} - {getDomainRow(layer.qtDescription, "qt_description")} + {getDomainRow(layer.descriptionQuality, "description_quality")} {getDomainRow(layer.lithology, "lithology")} {getTextRow("original_lithology", layer.originalLithology)} diff --git a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js index 720ebf602..837f27ba7 100644 --- a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js +++ b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js @@ -43,7 +43,7 @@ const ProfileAttributes = props => { depth_from: null, depth_to: null, last: null, - qt_description: null, + description_quality: null, lithology: null, color: [], plasticity: null, diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionDisplay.js b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionDisplay.js index 44029ec73..456248a02 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionDisplay.js +++ b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionDisplay.js @@ -31,8 +31,8 @@ const DescriptionDisplay = props => { {item.id !== null && ( - {t("qt_description")}:{" "} - {item.qtDescription?.[i18n.language] ?? "-"} + {t("description_quality")}:{" "} + {item.descriptionQuality?.[i18n.language] ?? "-"} )} diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.js b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.js index e7abc3f56..7dc5c8545 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.js +++ b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.js @@ -9,7 +9,7 @@ const DescriptionInput = props => { setFromDepth, setDescription, setToDepth, - setQtDescriptionId, + setDescriptionQualityId, selectableDepths, descriptions, } = props; @@ -106,19 +106,19 @@ const DescriptionInput = props => { sx={{ flex: "1", margin: "10px" }} variant="outlined" size="small" - label={t("qt_description")} - defaultValue={item.qtDescriptionId || ""} + label={t("description_quality")} + defaultValue={item.descriptionQualityId || ""} data-cy="qt-decription-select" InputLabelProps={{ shrink: true }} onChange={e => { e.stopPropagation(); - setQtDescriptionId(e.target.value); + setDescriptionQualityId(e.target.value); }}> {t("reset")} {domains?.data - ?.filter(d => d.schema === "qt_description") + ?.filter(d => d.schema === "description_quality") .map(d => ( {d[i18n.language]} ))} diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionLayers.js b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionLayers.js index 4a0573c53..bed9bab9f 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionLayers.js +++ b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionLayers.js @@ -25,7 +25,7 @@ const DescriptionLayers = props => { const [fromDepth, setFromDepth] = useState(null); const [toDepth, setToDepth] = useState(null); const [description, setDescription] = useState(null); - const [qtDescriptionId, setQtDescriptionId] = useState(null); + const [descriptionQualityId, setDescriptionQualityId] = useState(null); const [displayDescriptions, setDisplayDescriptions] = useState(null); const [descriptionIdSelectedForDelete, setDescriptionIdSelectedForDelete] = useState(0); @@ -92,7 +92,7 @@ const DescriptionLayers = props => { ), - qtDescription: null, + descriptionQuality: null, }); } tempDescriptions.push(description); @@ -142,19 +142,19 @@ const DescriptionLayers = props => { draft.fromDepth = parseFloat(fromDepth); draft.toDepth = parseFloat(toDepth); draft.description = description; - draft.qtDescriptionId = parseInt(qtDescriptionId); + draft.descriptionQualityId = parseInt(descriptionQualityId); }); updateMutation.mutate(updatedDescription); } // eslint-disable-next-line - }, [description, qtDescriptionId, toDepth, fromDepth]); + }, [description, descriptionQualityId, toDepth, fromDepth]); const selectItem = item => { if (item) { setFromDepth(item.fromDepth); setToDepth(item.toDepth); setDescription(item.description); - setQtDescriptionId(item.qtDescriptionId); + setDescriptionQualityId(item.descriptionQualityId); } setSelectedDescription(item); }; @@ -273,12 +273,12 @@ const DescriptionLayers = props => { c.Id == id); @@ -121,7 +121,7 @@ public async Task EditFaciesDescriptionWithCompleteFaciesDescription() Assert.AreEqual(1, updatedFaciesDescription.UpdatedById); Assert.AreEqual(6_000_010, updatedFaciesDescription.StratigraphyId); Assert.AreEqual("solid state web-enabled Maryland", updatedFaciesDescription.Description); - Assert.AreEqual(9001, updatedFaciesDescription.QtDescriptionId); + Assert.AreEqual(9001, updatedFaciesDescription.DescriptionQualityId); } [TestMethod] @@ -155,7 +155,7 @@ public async Task CreateAndDeleteAsync() Created = new DateTime(2022, 10, 4, 13, 19, 34).ToUniversalTime(), StratigraphyId = 6_000_010, Description = "SILDOV", - QtDescriptionId = 9003, + DescriptionQualityId = 9003, }; var response = await controller.CreateAsync(faciesDescription); diff --git a/tests/Controllers/LayerControllerTest.cs b/tests/Controllers/LayerControllerTest.cs index 4ce5bc0b6..780afb6a8 100644 --- a/tests/Controllers/LayerControllerTest.cs +++ b/tests/Controllers/LayerControllerTest.cs @@ -232,8 +232,8 @@ public async Task CreateWithCompleteLayer() OriginalUscs = "Bedfordshire", Plasticity = null, PlasticityId = 21101005, - QtDescription = null, - QtDescriptionId = null, + DescriptionQuality = null, + DescriptionQualityId = null, Stratigraphy = null, StratigraphyId = 6_000_008, ToDepth = 100, @@ -271,7 +271,7 @@ public async Task CreateWithCompleteLayer() Assert.AreEqual(layerToAdd.Notes, addedLayer.Notes); Assert.AreEqual(layerToAdd.OriginalUscs, addedLayer.OriginalUscs); Assert.AreEqual(layerToAdd.PlasticityId, addedLayer.PlasticityId); - Assert.AreEqual(layerToAdd.QtDescriptionId, addedLayer.QtDescriptionId); + Assert.AreEqual(layerToAdd.DescriptionQualityId, addedLayer.DescriptionQualityId); Assert.AreEqual(layerToAdd.StratigraphyId, addedLayer.StratigraphyId); Assert.AreEqual(layerToAdd.ToDepth, addedLayer.ToDepth); Assert.AreEqual(layerToAdd.Uscs1Id, addedLayer.Uscs1Id); diff --git a/tests/Controllers/LithologicalDescriptionControllerTest.cs b/tests/Controllers/LithologicalDescriptionControllerTest.cs index 4f3dfb4f6..1108413b5 100644 --- a/tests/Controllers/LithologicalDescriptionControllerTest.cs +++ b/tests/Controllers/LithologicalDescriptionControllerTest.cs @@ -67,7 +67,7 @@ public async Task GetLithologicalDescriptionById() Assert.AreEqual(50, lithologicalDescription.FromDepth); Assert.AreEqual(60, lithologicalDescription.ToDepth); Assert.AreEqual("Metrics Mountains Practical", lithologicalDescription.Description); - Assert.AreEqual(9000, lithologicalDescription.QtDescriptionId); + Assert.AreEqual(9000, lithologicalDescription.DescriptionQualityId); Assert.AreEqual(6_000_001, lithologicalDescription.StratigraphyId); } @@ -85,8 +85,8 @@ public async Task EditLithologicalDescriptionWithCompleteLithologicalDescription ToDepth = 100, Id = 9_000_069, IsLast = true, - QtDescription = null, - QtDescriptionId = 9001, + DescriptionQuality = null, + DescriptionQualityId = 9001, Updated = new DateTime(2021, 3, 31, 16, 55, 02).ToUniversalTime(), UpdatedBy = null, UpdatedById = 5, @@ -101,7 +101,7 @@ public async Task EditLithologicalDescriptionWithCompleteLithologicalDescription Created = new DateTime(2021, 2, 14, 8, 55, 34).ToUniversalTime(), StratigraphyId = 6_000_010, Description = "Freddy ate more cucumber than Maria.", - QtDescriptionId = 9003, + DescriptionQualityId = 9003, }; var lithologicalDescriptionToEdit = context.LithologicalDescriptions.Single(c => c.Id == id); @@ -121,7 +121,7 @@ public async Task EditLithologicalDescriptionWithCompleteLithologicalDescription Assert.AreEqual(1, updatedLithologicalDescription.UpdatedById); Assert.AreEqual(6_000_010, updatedLithologicalDescription.StratigraphyId); Assert.AreEqual("Freddy ate more cucumber than Maria.", updatedLithologicalDescription.Description); - Assert.AreEqual(9003, updatedLithologicalDescription.QtDescriptionId); + Assert.AreEqual(9003, updatedLithologicalDescription.DescriptionQualityId); } [TestMethod] @@ -155,7 +155,7 @@ public async Task CreateAndDeleteAsync() Created = new DateTime(2022, 11, 3, 14, 20, 09).ToUniversalTime(), StratigraphyId = 6_000_010, Description = "SPOLYP", - QtDescriptionId = 9003, + DescriptionQualityId = 9003, }; var response = await controller.CreateAsync(lithologicalDescription); diff --git a/tests/Controllers/UploadControllerTest.cs b/tests/Controllers/UploadControllerTest.cs index 304a07791..be3a6f2df 100644 --- a/tests/Controllers/UploadControllerTest.cs +++ b/tests/Controllers/UploadControllerTest.cs @@ -110,7 +110,7 @@ public async Task UploadLithologyShouldSaveData() var lithology = stratigraphy.Layers.First(l => l.FromDepth == 0.125); Assert.AreEqual(100, lithology.ToDepth); Assert.AreEqual(false, lithology.IsLast); - Assert.AreEqual(9001, lithology.QtDescriptionId); + Assert.AreEqual(9001, lithology.DescriptionQualityId); Assert.AreEqual(15104448, lithology.LithologyId); Assert.AreEqual(15302034, lithology.LithostratigraphyId); Assert.AreEqual("Granite", lithology.OriginalUscs); From 0ac1a9a55bbcec8a00d18bbf4be2b60eae92d5e6 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:34:08 +0100 Subject: [PATCH 18/36] Rename mlpr112 to colour --- src/api-legacy/v1/borehole/profile/layer/get.py | 6 +++--- src/api-legacy/v1/borehole/stratigraphy/layer/get.py | 6 +++--- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 2 +- .../detail/stratigrafy/profile/view/profileViewComponent.js | 2 +- .../components/profileAttributes/profileAttributes.js | 2 +- .../components/profileLayersList/profileLayersList.js | 2 +- .../src/commons/form/profile/data/stratigraphydata.js | 2 +- src/client/src/commons/search/data/lithologySearchData.js | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/api-legacy/v1/borehole/profile/layer/get.py b/src/api-legacy/v1/borehole/profile/layer/get.py index 8f8b1f6a6..f9edd09ed 100644 --- a/src/api-legacy/v1/borehole/profile/layer/get.py +++ b/src/api-legacy/v1/borehole/profile/layer/get.py @@ -171,7 +171,7 @@ class GetGeologyLayer(Action): layer.lithology_id_cli AS lithology, layer.lithostratigraphy_id_cli AS lithostratigraphy, COALESCE( - mlpr112, '{}'::int[] + colour, '{}'::int[] ) AS color, layer.plasticity_id_cli AS plasticity, layer.humidity_id_cli AS humidity, @@ -270,11 +270,11 @@ class GetGeologyLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr112 + id_lay_fk, array_agg(id_cli_fk) as colour FROM bdms.layer_codelist WHERE - code_cli = 'mlpr112' + code_cli = 'colour' GROUP BY id_lay_fk ) clr ON clr.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py index 9716fe9a8..fbf86bbcf 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py @@ -39,7 +39,7 @@ class GetLayer(Action): layer.lithology_id_cli AS lithology, layer.lithostratigraphy_id_cli AS lithostratigraphy, COALESCE( - mlpr112, '{}'::int[] + colour, '{}'::int[] ) AS color, layer.plasticity_id_cli AS plasticity, layer.humidity_id_cli AS humidity, @@ -135,11 +135,11 @@ class GetLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr112 + id_lay_fk, array_agg(id_cli_fk) as colour FROM bdms.layer_codelist WHERE - code_cli = 'mlpr112' + code_cli = 'colour' GROUP BY id_lay_fk ) clr ON clr.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index e4967c04e..9dca3f5ac 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -237,7 +237,7 @@ async def execute(self, id, field, value, user_id): schema = field if field == 'color': - schema = 'mlpr112' + schema = 'colour' elif field == 'organic_component': schema = 'organic_components' diff --git a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js index 5c957e2b5..acd84cf22 100644 --- a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js +++ b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js @@ -275,7 +275,7 @@ const ProfileView = props => { : null, )} {getDomainRowMultiple( - layer.codelists.filter(c => c.schema === "mlpr112"), + layer.codelists.filter(c => c.schema === "colour"), "color", )} {getDomainRow(layer.consistance, "consistance")} diff --git a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js index 837f27ba7..f932011f6 100644 --- a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js +++ b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js @@ -100,7 +100,7 @@ const ProfileAttributes = props => { "organic_components", ); response["debris"] = mapCodelistToAttribute(response.codelists, "debris"); - response["color"] = mapCodelistToAttribute(response.codelists, "mlpr112"); + response["color"] = mapCodelistToAttribute(response.codelists, "colour"); } setState({ isPatching: false, diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js index 93de6ace3..3fd97891b 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js +++ b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js @@ -115,7 +115,7 @@ const ProfileLayersList = props => { const grainSize1 = item?.grainSize1?.[i18n.language] ?? null; let color = []; item?.codelists - .filter(c => c.schema === "mlpr112") + .filter(c => c.schema === "colour") .forEach(element => { color.push(element[i18n.language]); }); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index ca80ee722..63f3db478 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -206,7 +206,7 @@ export const stratigraphyData = { type: "Dropdown", label: "color", value: "color", - schema: "mlpr112", + schema: "colour", multiple: true, search: true, isVisibleValue: "color", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index 0c5bf5422..970d583d9 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -209,7 +209,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "color", value: "color", - schema: "mlpr112", + schema: "colour", multiple: false, search: true, isVisibleValue: "layer.color", From 5439c9ba57190027f102fbe78c96bdd5071b8989 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:35:16 +0100 Subject: [PATCH 19/36] Rename mlpr115 to grain_angularity --- src/api-legacy/v1/borehole/profile/layer/get.py | 6 +++--- src/api-legacy/v1/borehole/stratigraphy/layer/get.py | 6 +++--- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 2 +- .../detail/stratigrafy/profile/view/profileViewComponent.js | 2 +- .../components/profileAttributes/profileAttributes.js | 2 +- .../components/profileLayersList/profileLayersList.js | 2 +- .../src/commons/form/profile/data/stratigraphydata.js | 2 +- src/client/src/commons/search/data/lithologySearchData.js | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/api-legacy/v1/borehole/profile/layer/get.py b/src/api-legacy/v1/borehole/profile/layer/get.py index f9edd09ed..6f990fbec 100644 --- a/src/api-legacy/v1/borehole/profile/layer/get.py +++ b/src/api-legacy/v1/borehole/profile/layer/get.py @@ -192,7 +192,7 @@ class GetGeologyLayer(Action): grain_shape, '{}'::int[] ) AS grain_shape, COALESCE( - mlpr115, '{}'::int[] + grain_angularity, '{}'::int[] ) AS grain_granularity, layer.cohesion_id_cli AS cohesion, layer.uscs_1_id_cli AS uscs_1, @@ -325,11 +325,11 @@ class GetGeologyLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr115 + id_lay_fk, array_agg(id_cli_fk) as grain_angularity FROM bdms.layer_codelist WHERE - code_cli = 'mlpr115' + code_cli = 'grain_angularity' GROUP BY id_lay_fk ) ggr ON ggr.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py index fbf86bbcf..5dd27f259 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/get.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/get.py @@ -57,7 +57,7 @@ class GetLayer(Action): grain_shape, '{}'::int[] ) AS grain_shape, COALESCE( - mlpr115, '{}'::int[] + grain_angularity, '{}'::int[] ) AS grain_granularity, layer.cohesion_id_cli AS cohesion, layer.uscs_1_id_cli AS uscs_1, @@ -190,11 +190,11 @@ class GetLayer(Action): LEFT JOIN ( SELECT - id_lay_fk, array_agg(id_cli_fk) as mlpr115 + id_lay_fk, array_agg(id_cli_fk) as grain_angularity FROM bdms.layer_codelist WHERE - code_cli = 'mlpr115' + code_cli = 'grain_angularity' GROUP BY id_lay_fk ) ggr ON ggr.id_lay_fk = id_lay diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index 9dca3f5ac..b76110ef2 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -246,7 +246,7 @@ async def execute(self, id, field, value, user_id): schema = 'grain_shape' elif field == 'grain_granularity': - schema = 'mlpr115' + schema = 'grain_angularity' elif field == 'uscs_3': schema = 'uscs_type' diff --git a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js index acd84cf22..947c2c8d0 100644 --- a/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js +++ b/src/client/src/commons/detail/stratigrafy/profile/view/profileViewComponent.js @@ -251,7 +251,7 @@ const ProfileView = props => { "grain_shape", )} {getDomainRowMultiple( - layer.codelists.filter(c => c.schema === "mlpr115"), + layer.codelists.filter(c => c.schema === "grain_angularity"), "grain_granularity", )} {getDomainRowMultiple( diff --git a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js index f932011f6..e236428c1 100644 --- a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js +++ b/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.js @@ -93,7 +93,7 @@ const ProfileAttributes = props => { ); response["grain_granularity"] = mapCodelistToAttribute( response.codelists, - "mlpr115", + "grain_angularity", ); response["organic_component"] = mapCodelistToAttribute( response.codelists, diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js index 3fd97891b..56a7c0d24 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js +++ b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.js @@ -147,7 +147,7 @@ const ProfileLayersList = props => { let angularity = []; item?.codelists - .filter(c => c.schema === "mlpr115") + .filter(c => c.schema === "grain_angularity") .forEach(element => { angularity.push(element[i18n.language]); }); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index 63f3db478..108dd7b99 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -158,7 +158,7 @@ export const stratigraphyData = { type: "Dropdown", label: "grain_granularity", value: "grain_granularity", - schema: "mlpr115", + schema: "grain_angularity", multiple: true, search: true, isVisibleValue: "grain_granularity", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index 970d583d9..4d6132093 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -160,7 +160,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "grain_granularity", value: "grain_granularity", - schema: "mlpr115", + schema: "grain_angularity", multiple: false, search: true, isVisibleValue: "layer.grain_granularity", From 826e7f74c82557740c6f93bcca42c0547078d230 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:36:43 +0100 Subject: [PATCH 20/36] Rename mlpr116 to cohesion --- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 2 +- src/api/BdmsContextExtensions.cs | 2 +- src/client/src/commons/form/profile/data/stratigraphydata.js | 2 +- src/client/src/commons/search/data/lithologySearchData.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index b76110ef2..cdcce950f 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -182,7 +182,7 @@ async def execute(self, id, field, value, user_id): schema = 'grain_size' elif field == 'cohesion': - schema = 'mlpr116' + schema = 'cohesion' elif field == 'uscs_1': schema = 'uscs_type' diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index 40ad9a632..b54ec5d00 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -84,7 +84,7 @@ public static void SeedData(this BdmsContext context) List consistanceIds = codelists.Where(c => c.Schema == "consistency").Select(s => s.Id).ToList(); List humidityIds = codelists.Where(c => c.Schema == "humidity").Select(s => s.Id).ToList(); List alterationIds = codelists.Where(c => c.Schema == "alteration").Select(s => s.Id).ToList(); - List cohesionIds = codelists.Where(c => c.Schema == "mlpr116").Select(s => s.Id).ToList(); + List cohesionIds = codelists.Where(c => c.Schema == "cohesion").Select(s => s.Id).ToList(); List backfillTypeIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Select(s => s.Id).ToList(); List backfillMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Select(s => s.Id).ToList(); List uscsIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/commons/form/profile/data/stratigraphydata.js index 108dd7b99..d29226ac8 100644 --- a/src/client/src/commons/form/profile/data/stratigraphydata.js +++ b/src/client/src/commons/form/profile/data/stratigraphydata.js @@ -246,7 +246,7 @@ export const stratigraphyData = { type: "Dropdown", label: "cohesion", value: "cohesionId", - schema: "mlpr116", + schema: "cohesion", multiple: false, search: false, isVisibleValue: "cohesion", diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/commons/search/data/lithologySearchData.js index 4d6132093..a1572fb16 100644 --- a/src/client/src/commons/search/data/lithologySearchData.js +++ b/src/client/src/commons/search/data/lithologySearchData.js @@ -249,7 +249,7 @@ export const lithologySearchData = [ type: "Dropdown", label: "cohesion", value: "cohesion", - schema: "mlpr116", + schema: "cohesion", multiple: false, search: false, isVisibleValue: "layer.cohesion", From 088f16e8463f7898c7ac30d621056c9a4425f286 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 09:38:05 +0100 Subject: [PATCH 21/36] Rename ibor117 to reference_elevation_type --- src/api-legacy/v1/borehole/patch.py | 2 +- src/api/BdmsContextExtensions.cs | 2 +- src/api/Migrations/20240212111401_RenameCodelists.cs | 2 +- src/client/src/commons/detail/meta/metaComponent.js | 2 +- .../src/commons/form/borehole/segments/coordinatesSegment.js | 2 +- src/client/src/commons/form/multiple/multipleForm.js | 5 ++++- src/client/src/commons/search/data/LocationSearchData.js | 2 +- 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/api-legacy/v1/borehole/patch.py b/src/api-legacy/v1/borehole/patch.py index 4cca5c2bf..fc2beaa53 100644 --- a/src/api-legacy/v1/borehole/patch.py +++ b/src/api-legacy/v1/borehole/patch.py @@ -310,7 +310,7 @@ async def execute(self, id, field, value, user): schema = 'elevation_precision' elif field == 'reference_elevation_type': - schema = 'ibor117' + schema = 'reference_elevation_type' elif field == 'qt_total_depth_tvd': schema = 'depth_precision' diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index b54ec5d00..77267d814 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -94,7 +94,7 @@ public static void SeedData(this BdmsContext context) List kirostIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist List grainSize1Ids = codelists.Where(c => c.Schema == "grain_size").Select(s => s.Id).ToList(); List grainSize2Ids = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist - List referenceElevationTypeIds = codelists.Where(c => c.Schema == "ibor117").Select(s => s.Id).ToList(); + List referenceElevationTypeIds = codelists.Where(c => c.Schema == "reference_elevation_type").Select(s => s.Id).ToList(); List waterIngressReliabilityIds = codelists.Where(c => c.Schema == HydrogeologySchemas.ObservationReliabilitySchema).Select(s => s.Id).ToList(); List waterIngressQuantityIds = codelists.Where(c => c.Schema == HydrogeologySchemas.WateringressQualitySchema).Select(s => s.Id).ToList(); List waterIngressConditionsIds = codelists.Where(c => c.Schema == HydrogeologySchemas.WateringressConditionsSchema).Select(s => s.Id).ToList(); diff --git a/src/api/Migrations/20240212111401_RenameCodelists.cs b/src/api/Migrations/20240212111401_RenameCodelists.cs index 0ffdb89ba..249e39a2c 100644 --- a/src/api/Migrations/20240212111401_RenameCodelists.cs +++ b/src/api/Migrations/20240212111401_RenameCodelists.cs @@ -17,7 +17,7 @@ protected override void Up(MigrationBuilder migrationBuilder) UPDATE bdms.codelist SET schema_cli = 'backfill_material' WHERE schema_cli = 'fill200'; UPDATE bdms.codelist SET schema_cli = 'location_precision' WHERE schema_cli = 'qt_location'; UPDATE bdms.codelist SET schema_cli = 'elevation_precision' WHERE schema_cli = 'qt_elevation'; - UPDATE bdms.codelist SET schema_cli = 'reference_elevation_type' WHERE schema_cli = 'ibore117'; + UPDATE bdms.codelist SET schema_cli = 'reference_elevation_type' WHERE schema_cli = 'ibor117'; UPDATE bdms.codelist SET schema_cli = 'instrument_type' WHERE schema_cli = 'inst100'; UPDATE bdms.codelist SET schema_cli = 'instrument_status' WHERE schema_cli = 'inst101'; UPDATE bdms.codelist SET schema_cli = 'uscs_type' WHERE schema_cli = 'mcla101'; diff --git a/src/client/src/commons/detail/meta/metaComponent.js b/src/client/src/commons/detail/meta/metaComponent.js index 6c70b6d67..02d9d775b 100644 --- a/src/client/src/commons/detail/meta/metaComponent.js +++ b/src/client/src/commons/detail/meta/metaComponent.js @@ -274,7 +274,7 @@ class MetaComponent extends React.Component { data.reference_elevation, )} {this.getDomainRow( - "ibor117", + "reference_elevation_type", data.reference_elevation_type, "reference_elevation_type", )} diff --git a/src/client/src/commons/form/borehole/segments/coordinatesSegment.js b/src/client/src/commons/form/borehole/segments/coordinatesSegment.js index d036e0eac..6fa9c2abb 100644 --- a/src/client/src/commons/form/borehole/segments/coordinatesSegment.js +++ b/src/client/src/commons/form/borehole/segments/coordinatesSegment.js @@ -671,7 +671,7 @@ const CoordinatesSegment = props => { onSelected={selected => { updateChange("reference_elevation_type", selected.id, false); }} - schema="ibor117" + schema="reference_elevation_type" selected={borehole.data.reference_elevation_type} readOnly={!isEditable} /> diff --git a/src/client/src/commons/form/multiple/multipleForm.js b/src/client/src/commons/form/multiple/multipleForm.js index bd8cfa4e7..8203d46a7 100644 --- a/src/client/src/commons/form/multiple/multipleForm.js +++ b/src/client/src/commons/form/multiple/multipleForm.js @@ -412,7 +412,10 @@ class MultipleForm extends React.Component { this.getDomain("location_precision"), this.getDomain("elevation_precision"), this.getDomain("reference_elevation_qt", "elevation_precision"), - this.getDomain("reference_elevation_type", "ibor117"), + this.getDomain( + "reference_elevation_type", + "reference_elevation_type", + ), ])} {this.getGroup([ this.getDomain("kind"), diff --git a/src/client/src/commons/search/data/LocationSearchData.js b/src/client/src/commons/search/data/LocationSearchData.js index e21b3a85a..34d2a4643 100644 --- a/src/client/src/commons/search/data/LocationSearchData.js +++ b/src/client/src/commons/search/data/LocationSearchData.js @@ -149,7 +149,7 @@ export const LocationSearchData = [ type: "Dropdown", label: "reference_elevation_type", value: "reference_elevation_type", - schema: "ibor117", + schema: "reference_elevation_type", multiple: false, search: false, isVisibleValue: "reference_elevation_type", From a8b964e248a4c7bdc4ef0c69bd59d58c053e0aeb Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 11:00:22 +0100 Subject: [PATCH 22/36] Revert "wip-first-step-renaming" This reverts commit b5b2baa2b60785cd6a2c8aae97a86d98b7c0d2b9. --- src/api-legacy/v1/borehole/patch.py | 30 +- src/api/BdmsContextExtensions.cs | 20 +- ...20240212111401_RenameCodelists.Designer.cs | 2794 ----------------- .../20240212111401_RenameCodelists.cs | 41 - src/client/cypress/e2e/codeList.cy.js | 34 +- .../src/commons/detail/detailsComponent.js | 4 +- .../src/commons/detail/meta/metaComponent.js | 28 +- .../segments/boreholeDetailSegment.js | 8 +- .../segments/boreholeGeneralSegment.js | 38 +- .../src/commons/form/multiple/multipleForm.js | 18 +- .../commons/search/data/boreholeSearchData.js | 20 +- .../src/commons/table/boreholeEditorTable.js | 2 +- src/client/src/commons/table/boreholeTable.js | 6 +- .../pages/settings/data/boreholeEditorData.js | 6 +- tests/Controllers/BackfillControllerTest.cs | 8 +- tests/Controllers/CasingControllerTest.cs | 8 +- 16 files changed, 110 insertions(+), 2955 deletions(-) delete mode 100644 src/api/Migrations/20240212111401_RenameCodelists.Designer.cs delete mode 100644 src/api/Migrations/20240212111401_RenameCodelists.cs diff --git a/src/api-legacy/v1/borehole/patch.py b/src/api-legacy/v1/borehole/patch.py index fc2beaa53..a4971a135 100644 --- a/src/api-legacy/v1/borehole/patch.py +++ b/src/api-legacy/v1/borehole/patch.py @@ -137,25 +137,25 @@ def get_column(field): elif field == 'hrs': column = 'hrs_id_cli' - elif field == 'drilling_method': + elif field == 'extended.drilling_method': column = 'drilling_method_id_cli' - elif field == 'borehole_cuttings_core': + elif field == 'custom.cuttings': column = 'cuttings_id_cli' - elif field == 'drilling_purpose': + elif field == 'extended.purpose': column = 'purpose_id_cli' - elif field == 'borehole_status': + elif field == 'extended.status': column = 'status_id_cli' - elif field == 'inclination_precision': + elif field == 'custom.qt_bore_inc_dir': column = 'qt_inclination_direction_id_cli' elif field == 'custom.qt_depth': column = 'qt_depth_id_cli' - elif field == 'depth_precision': + elif field == 'custom.qt_top_bedrock': column = 'qt_top_bedrock' elif field == 'custom.qt_top_bedrock_tvd': @@ -207,7 +207,7 @@ async def execute(self, id, field, value, user): 'total_depth_tvd', 'extended.top_bedrock', 'extended.top_bedrock_tvd', - 'depth_precision', + 'custom.qt_top_bedrock', 'custom.qt_top_bedrock_tvd', 'extended.groundwater', 'custom.mistakes', @@ -277,11 +277,11 @@ async def execute(self, id, field, value, user): 'elevation_precision', 'hrs', 'custom.landuse', - 'drilling_method', - 'borehole_cuttings_core', - 'drilling_purpose', - 'borehole_status', - 'inclination_precision', + 'extended.drilling_method', + 'custom.cuttings', + 'extended.purpose', + 'extended.status', + 'custom.qt_bore_inc_dir', 'custom.qt_depth', 'custom.processing_status', 'custom.lithology_top_bedrock', @@ -304,7 +304,7 @@ async def execute(self, id, field, value, user): schema = 'custom.chronostratigraphy_top_bedrock' elif field == 'custom.qt_top_bedrock_tvd': - schema = 'depth_precision' + schema = 'custom.qt_top_bedrock' elif field == 'qt_reference_elevation': schema = 'elevation_precision' @@ -313,10 +313,10 @@ async def execute(self, id, field, value, user): schema = 'reference_elevation_type' elif field == 'qt_total_depth_tvd': - schema = 'depth_precision' + schema = 'custom.qt_top_bedrock' elif field == 'custom.qt_depth': - schema = 'depth_precision' + schema = 'custom.qt_top_bedrock' # Check if domain is extracted from the correct schema if value is not None and schema != ( diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index 91d226ac0..6c01b0588 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -64,20 +64,20 @@ public static void SeedData(this BdmsContext context) List restrictionIds = codelists.Where(c => c.Schema == "restriction").Select(s => s.Id).ToList(); List locationPrecisionIds = codelists.Where(c => c.Schema == "location_precision").Select(s => s.Id).ToList(); List descriptionQualityIds = codelists.Where(c => c.Schema == "description_quality").Select(s => s.Id).ToList(); - List drillingMethodIds = codelists.Where(c => c.Schema == "drilling_method").Select(s => s.Id).ToList(); - List cuttingsIds = codelists.Where(c => c.Schema == "borehole_cuttings_core").Select(s => s.Id).ToList(); - List qtDepthIds = codelists.Where(c => c.Schema == "depth_precision").Select(s => s.Id).ToList(); + List drillingMethodIds = codelists.Where(c => c.Schema == "extended.drilling_method").Select(s => s.Id).ToList(); + List cuttingsIds = codelists.Where(c => c.Schema == "custom.cuttings").Select(s => s.Id).ToList(); + List qtDepthIds = codelists.Where(c => c.Schema == "custom.qt_top_bedrock").Select(s => s.Id).ToList(); List elevationPrecisionIds = codelists.Where(c => c.Schema == "elevation_precision").Select(s => s.Id).ToList(); List layerKindIds = codelists.Where(c => c.Schema == "layer_kind").Select(s => s.Id).ToList(); - List purposeIds = codelists.Where(c => c.Schema == "drilling_purpose").Select(s => s.Id).ToList(); - List statusIds = codelists.Where(c => c.Schema == "borehole_status").Select(s => s.Id).ToList(); + List purposeIds = codelists.Where(c => c.Schema == "extended.purpose").Select(s => s.Id).ToList(); + List statusIds = codelists.Where(c => c.Schema == "extended.status").Select(s => s.Id).ToList(); List lithologyTopBedrockIds = codelists.Where(c => c.Schema == "custom.lithology_top_bedrock").Select(s => s.Id).ToList(); - List qtInclinationDirectionIds = codelists.Where(c => c.Schema == "inclination_precision").Select(s => s.Id).ToList(); + List qtInclinationDirectionIds = codelists.Where(c => c.Schema == "custom.qt_bore_inc_dir").Select(s => s.Id).ToList(); List chronostratigraphyTopBedrockIds = codelists.Where(c => c.Schema == "custom.chronostratigraphy_top_bedrock").Select(s => s.Id).ToList(); List lithostratigraphyTopBedrockIds = codelists.Where(c => c.Schema == "custom.lithostratigraphy_top_bedrock").Select(s => s.Id).ToList(); List instrumentKindIds = codelists.Where(c => c.Schema == CompletionSchemas.InstrumentationKindSchema).Select(s => s.Id).ToList(); List instrumentStatusIds = codelists.Where(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Select(s => s.Id).ToList(); - List casingTypeIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingTypeSchema).Select(s => s.Id).ToList(); + List casingKindIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingKindSchema).Select(s => s.Id).ToList(); List casingMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Select(s => s.Id).ToList(); List plasticityIds = codelists.Where(c => c.Schema == "plasticity").Select(s => s.Id).ToList(); List compactnessIds = codelists.Where(c => c.Schema == "compactness").Select(s => s.Id).ToList(); @@ -85,7 +85,7 @@ public static void SeedData(this BdmsContext context) List humidityIds = codelists.Where(c => c.Schema == "humidity").Select(s => s.Id).ToList(); List alterationIds = codelists.Where(c => c.Schema == "alteration").Select(s => s.Id).ToList(); List cohesionIds = codelists.Where(c => c.Schema == "cohesion").Select(s => s.Id).ToList(); - List backfillTypeIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Select(s => s.Id).ToList(); + List backfillKindIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillKindSchema).Select(s => s.Id).ToList(); List backfillMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Select(s => s.Id).ToList(); List uscsIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); List uscsDeterminationIds = codelists.Where(c => c.Schema == "uscs_determination").Select(s => s.Id).ToList(); @@ -576,7 +576,7 @@ int GetStratigraphyOrCasingId(int currentLayerId, int startId) .RuleFor(c => c.Name, f => f.Random.Word()) .RuleFor(c => c.FromDepth, f => (casing_ids % 10) * 10) .RuleFor(c => c.ToDepth, f => ((casing_ids % 10) + 1) * 10) - .RuleFor(c => c.KindId, f => f.PickRandom(casingTypeIds)) + .RuleFor(c => c.KindId, f => f.PickRandom(casingKindIds)) .RuleFor(c => c.Kind, _ => default!) .RuleFor(c => c.MaterialId, f => f.PickRandom(casingMaterialIds)) .RuleFor(c => c.Material, _ => default!) @@ -649,7 +649,7 @@ Instrumentation SeededInstrumentation(Completion completion) .RuleFor(b => b.Completion, _ => default!) .RuleFor(b => b.FromDepth, f => (backfill_ids % 10) * 10) .RuleFor(b => b.ToDepth, f => ((backfill_ids % 10) + 1) * 10) - .RuleFor(b => b.KindId, f => f.PickRandom(backfillTypeIds)) + .RuleFor(b => b.KindId, f => f.PickRandom(backfillKindIds)) .RuleFor(b => b.Kind, _ => default!) .RuleFor(b => b.MaterialId, f => f.PickRandom(backfillMaterialIds)) .RuleFor(b => b.Material, _ => default!) diff --git a/src/api/Migrations/20240212111401_RenameCodelists.Designer.cs b/src/api/Migrations/20240212111401_RenameCodelists.Designer.cs deleted file mode 100644 index 20f10893b..000000000 --- a/src/api/Migrations/20240212111401_RenameCodelists.Designer.cs +++ /dev/null @@ -1,2794 +0,0 @@ -// -using System; -using BDMS; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using NetTopologySuite.Geometries; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace BDMS.Migrations -{ - [DbContext(typeof(BdmsContext))] - [Migration("20240212111401_RenameCodelists")] - partial class RenameCodelists - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasDefaultSchema("bdms") - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "ltree"); - NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "postgis"); - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("BDMS.Models.Backfill", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CompletionId") - .HasColumnType("integer") - .HasColumnName("completion_id"); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("creator"); - - b.Property("FromDepth") - .HasColumnType("double precision") - .HasColumnName("from_depth"); - - b.Property("TypeId") - .HasColumnType("integer") - .HasColumnName("kind_id"); - - b.Property("MaterialId") - .HasColumnType("integer") - .HasColumnName("material_id"); - - b.Property("Notes") - .HasColumnType("text") - .HasColumnName("notes"); - - b.Property("ToDepth") - .HasColumnType("double precision") - .HasColumnName("to_depth"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("update"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updater"); - - b.HasKey("Id"); - - b.HasIndex("CompletionId"); - - b.HasIndex("CreatedById"); - - b.HasIndex("TypeId"); - - b.HasIndex("MaterialId"); - - b.HasIndex("UpdatedById"); - - b.ToTable("backfill", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Borehole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_bho"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AlternateName") - .HasColumnType("text") - .HasColumnName("alternate_name_bho"); - - b.Property("Canton") - .HasColumnType("text") - .HasColumnName("canton_bho"); - - b.Property("ChronostratigraphyId") - .HasColumnType("integer") - .HasColumnName("chronostrat_id_cli"); - - b.Property("Country") - .HasColumnType("text") - .HasColumnName("country_bho"); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_bho"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("created_by_bho"); - - b.Property("CuttingsId") - .HasColumnType("integer") - .HasColumnName("cuttings_id_cli"); - - b.Property("DrillingDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("drilling_date_bho"); - - b.Property("DrillingDiameter") - .HasColumnType("double precision") - .HasColumnName("drilling_diameter_bho"); - - b.Property("DrillingMethodId") - .HasColumnType("integer") - .HasColumnName("drilling_method_id_cli"); - - b.Property("ElevationZ") - .HasColumnType("double precision") - .HasColumnName("elevation_z_bho"); - - b.Property("Geometry") - .HasColumnType("geometry") - .HasColumnName("geom_bho"); - - b.Property("HasGroundwater") - .HasColumnType("boolean") - .HasColumnName("groundwater_bho"); - - b.Property("HrsId") - .HasColumnType("integer") - .HasColumnName("hrs_id_cli"); - - b.Property("Inclination") - .HasColumnType("double precision") - .HasColumnName("inclination_bho"); - - b.Property("InclinationDirection") - .HasColumnType("double precision") - .HasColumnName("inclination_direction_bho"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("public_bho"); - - b.Property("TypeId") - .HasColumnType("integer") - .HasColumnName("kind_id_cli"); - - b.Property("LithologyTopBedrockId") - .HasColumnType("integer") - .HasColumnName("lithology_top_bedrock_id_cli"); - - b.Property("LithostratigraphyId") - .HasColumnType("integer") - .HasColumnName("lithostrat_id_cli"); - - b.Property("LocationX") - .HasColumnType("double precision") - .HasColumnName("location_x_bho"); - - b.Property("LocationXLV03") - .HasColumnType("double precision") - .HasColumnName("location_x_lv03_bho"); - - b.Property("LocationY") - .HasColumnType("double precision") - .HasColumnName("location_y_bho"); - - b.Property("LocationYLV03") - .HasColumnType("double precision") - .HasColumnName("location_y_lv03_bho"); - - b.Property("Locked") - .HasColumnType("timestamp with time zone") - .HasColumnName("locked_bho"); - - b.Property("LockedById") - .HasColumnType("integer") - .HasColumnName("locked_by_bho"); - - b.Property("Municipality") - .HasColumnType("text") - .HasColumnName("municipality_bho"); - - b.Property("NationalInterest") - .HasColumnType("boolean") - .HasColumnName("national_interest"); - - b.Property("OriginalName") - .HasColumnType("text") - .HasColumnName("original_name_bho"); - - b.Property("OriginalReferenceSystem") - .HasColumnType("integer") - .HasColumnName("srs_id_cli"); - - b.Property("ProjectName") - .HasColumnType("text") - .HasColumnName("project_name_bho"); - - b.Property("PurposeId") - .HasColumnType("integer") - .HasColumnName("purpose_id_cli"); - - b.Property("QtDepthId") - .HasColumnType("integer") - .HasColumnName("qt_depth_id_cli"); - - b.Property("QtElevationId") - .HasColumnType("integer") - .HasColumnName("qt_elevation_id_cli"); - - b.Property("QtInclinationDirectionId") - .HasColumnType("integer") - .HasColumnName("qt_inclination_direction_id_cli"); - - b.Property("LocationPrecisionId") - .HasColumnType("integer") - .HasColumnName("qt_location_id_cli"); - - b.Property("QtReferenceElevationId") - .HasColumnType("integer") - .HasColumnName("qt_reference_elevation_id_cli"); - - b.Property("QtTopBedrock") - .HasColumnType("double precision") - .HasColumnName("qt_top_bedrock"); - - b.Property("QtTopBedrockTvd") - .HasColumnType("double precision") - .HasColumnName("qt_top_bedrock_tvd"); - - b.Property("QtTotalDepthTvdId") - .HasColumnType("integer") - .HasColumnName("qt_total_depth_tvd_id_cli"); - - b.Property("ReferenceElevation") - .HasColumnType("double precision") - .HasColumnName("reference_elevation_bho"); - - b.Property("ReferenceElevationTypeId") - .HasColumnType("integer") - .HasColumnName("reference_elevation_type_id_cli"); - - b.Property("Remarks") - .HasColumnType("text") - .HasColumnName("remarks_bho"); - - b.Property("RestrictionId") - .HasColumnType("integer") - .HasColumnName("restriction_id_cli"); - - b.Property("RestrictionUntil") - .HasColumnType("timestamp with time zone") - .HasColumnName("restriction_until_bho"); - - b.Property("SpudDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("spud_date_bho"); - - b.Property("StatusId") - .HasColumnType("integer") - .HasColumnName("status_id_cli"); - - b.Property("TopBedrock") - .HasColumnType("double precision") - .HasColumnName("top_bedrock_bho"); - - b.Property("TopBedrockTvd") - .HasColumnType("double precision") - .HasColumnName("top_bedrock_tvd_bho"); - - b.Property("TotalDepth") - .HasColumnType("double precision") - .HasColumnName("total_depth_bho"); - - b.Property("TotalDepthTvd") - .HasColumnType("double precision") - .HasColumnName("total_depth_tvd_bho"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_bho"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updated_by_bho"); - - b.Property("WorkgroupId") - .HasColumnType("integer") - .HasColumnName("id_wgp_fk"); - - b.HasKey("Id"); - - b.HasIndex("ChronostratigraphyId"); - - b.HasIndex("CreatedById"); - - b.HasIndex("CuttingsId"); - - b.HasIndex("DrillingMethodId"); - - b.HasIndex("HrsId"); - - b.HasIndex("TypeId"); - - b.HasIndex("LithologyTopBedrockId"); - - b.HasIndex("LithostratigraphyId"); - - b.HasIndex("LockedById"); - - b.HasIndex("PurposeId"); - - b.HasIndex("QtDepthId"); - - b.HasIndex("QtElevationId"); - - b.HasIndex("QtInclinationDirectionId"); - - b.HasIndex("LocationPrecisionId"); - - b.HasIndex("QtReferenceElevationId"); - - b.HasIndex("QtTotalDepthTvdId"); - - b.HasIndex("ReferenceElevationTypeId"); - - b.HasIndex("RestrictionId"); - - b.HasIndex("StatusId"); - - b.HasIndex("UpdatedById"); - - b.HasIndex("WorkgroupId"); - - b.ToTable("borehole", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.BoreholeCodelist", b => - { - b.Property("BoreholeId") - .HasColumnType("integer") - .HasColumnName("id_bho_fk"); - - b.Property("CodelistId") - .HasColumnType("integer") - .HasColumnName("id_cli_fk"); - - b.Property("SchemaName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("code_cli"); - - b.Property("Value") - .IsRequired() - .HasColumnType("text") - .HasColumnName("value_bco"); - - b.HasKey("BoreholeId", "CodelistId"); - - b.HasIndex("CodelistId"); - - b.ToTable("borehole_codelist", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.BoreholeFile", b => - { - b.Property("BoreholeId") - .HasColumnType("integer") - .HasColumnName("id_bho_fk"); - - b.Property("FileId") - .HasColumnType("integer") - .HasColumnName("id_fil_fk"); - - b.Property("Attached") - .HasColumnType("timestamp with time zone") - .HasColumnName("attached_bfi"); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_bfi"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("created_by_bfi"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description_bfi"); - - b.Property("Public") - .HasColumnType("boolean") - .HasColumnName("public_bfi"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("update_bfi"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updater_bfi"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("id_usr_fk"); - - b.HasKey("BoreholeId", "FileId"); - - b.HasIndex("CreatedById"); - - b.HasIndex("FileId"); - - b.HasIndex("UpdatedById"); - - b.HasIndex("UserId"); - - b.ToTable("borehole_files", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Casing", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CompletionId") - .HasColumnType("integer") - .HasColumnName("completion_id"); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("creator"); - - b.Property("DateFinish") - .HasColumnType("date") - .HasColumnName("date_finish"); - - b.Property("DateStart") - .HasColumnType("date") - .HasColumnName("date_start"); - - b.Property("FromDepth") - .HasColumnType("double precision") - .HasColumnName("from_depth"); - - b.Property("InnerDiameter") - .HasColumnType("double precision") - .HasColumnName("inner_diameter"); - - b.Property("TypeId") - .HasColumnType("integer") - .HasColumnName("kind_id"); - - b.Property("MaterialId") - .HasColumnType("integer") - .HasColumnName("material_id"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Notes") - .HasColumnType("text") - .HasColumnName("notes"); - - b.Property("OuterDiameter") - .HasColumnType("double precision") - .HasColumnName("outer_diameter"); - - b.Property("ToDepth") - .HasColumnType("double precision") - .HasColumnName("to_depth"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("update"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updater"); - - b.HasKey("Id"); - - b.HasIndex("CompletionId"); - - b.HasIndex("CreatedById"); - - b.HasIndex("TypeId"); - - b.HasIndex("MaterialId"); - - b.HasIndex("UpdatedById"); - - b.ToTable("casing", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.ChronostratigraphyLayer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_chr"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChronostratigraphyId") - .HasColumnType("integer") - .HasColumnName("chronostratigraphy_id"); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("creator"); - - b.Property("FromDepth") - .HasColumnType("double precision") - .HasColumnName("depth_from"); - - b.Property("IsLast") - .HasColumnType("boolean") - .HasColumnName("is_last"); - - b.Property("StratigraphyId") - .HasColumnType("integer") - .HasColumnName("id_sty_fk"); - - b.Property("ToDepth") - .HasColumnType("double precision") - .HasColumnName("depth_to"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("update"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updater"); - - b.HasKey("Id"); - - b.HasIndex("ChronostratigraphyId"); - - b.HasIndex("CreatedById"); - - b.HasIndex("StratigraphyId"); - - b.HasIndex("UpdatedById"); - - b.ToTable("chronostratigraphy", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Codelist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_cli"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Code") - .IsRequired() - .HasColumnType("text") - .HasColumnName("code_cli"); - - b.Property("Conf") - .HasColumnType("text") - .HasColumnName("conf_cli"); - - b.Property("De") - .HasColumnType("text") - .HasColumnName("text_cli_de"); - - b.Property("DescriptionDe") - .HasColumnType("text") - .HasColumnName("description_cli_de"); - - b.Property("DescriptionEn") - .IsRequired() - .HasColumnType("text") - .HasColumnName("description_cli_en"); - - b.Property("DescriptionFr") - .HasColumnType("text") - .HasColumnName("description_cli_fr"); - - b.Property("DescriptionIt") - .HasColumnType("text") - .HasColumnName("description_cli_it"); - - b.Property("DescriptionRo") - .HasColumnType("text") - .HasColumnName("description_cli_ro"); - - b.Property("En") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text_cli_en"); - - b.Property("Fr") - .HasColumnType("text") - .HasColumnName("text_cli_fr"); - - b.Property("Geolcode") - .HasColumnType("integer") - .HasColumnName("geolcode"); - - b.Property("IsDefault") - .HasColumnType("boolean") - .HasColumnName("default_cli"); - - b.Property("It") - .HasColumnType("text") - .HasColumnName("text_cli_it"); - - b.Property("Order") - .HasColumnType("integer") - .HasColumnName("order_cli"); - - b.Property("Path") - .HasColumnType("ltree") - .HasColumnName("path_cli"); - - b.Property("Ro") - .HasColumnType("text") - .HasColumnName("text_cli_ro"); - - b.Property("Schema") - .HasColumnType("text") - .HasColumnName("schema_cli"); - - b.HasKey("Id"); - - b.ToTable("codelist", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Completion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AbandonDate") - .HasColumnType("date") - .HasColumnName("abandon_date"); - - b.Property("BoreholeId") - .HasColumnType("integer") - .HasColumnName("borehole_id"); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("creator"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("TypeId") - .HasColumnType("integer") - .HasColumnName("kind_id"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Notes") - .HasColumnType("text") - .HasColumnName("notes"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("update"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updater"); - - b.HasKey("Id"); - - b.HasIndex("BoreholeId"); - - b.HasIndex("CreatedById"); - - b.HasIndex("TypeId"); - - b.HasIndex("UpdatedById"); - - b.ToTable("completion", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Config", b => - { - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name_cfg"); - - b.Property("Value") - .HasColumnType("text") - .HasColumnName("value_cfg"); - - b.HasKey("Name"); - - b.ToTable("config", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Content", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_cnt"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Creation") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation_cnt"); - - b.Property("Expired") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_cnt"); - - b.Property("IsDraft") - .HasColumnType("boolean") - .HasColumnName("draft_cnt"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text") - .HasColumnName("name_cnt"); - - b.Property("TextDe") - .HasColumnType("text") - .HasColumnName("text_cnt_de"); - - b.Property("TextEn") - .HasColumnType("text") - .HasColumnName("text_cnt_en"); - - b.Property("TextFr") - .HasColumnType("text") - .HasColumnName("text_cnt_fr"); - - b.Property("TextIt") - .HasColumnType("text") - .HasColumnName("text_cnt_it"); - - b.Property("TextRo") - .HasColumnType("text") - .HasColumnName("text_cnt_ro"); - - b.Property("TitelRo") - .HasColumnType("text") - .HasColumnName("title_cnt_ro"); - - b.Property("TitleDe") - .HasColumnType("text") - .HasColumnName("title_cnt_de"); - - b.Property("TitleEn") - .HasColumnType("text") - .HasColumnName("title_cnt_en"); - - b.Property("TitleFr") - .HasColumnType("text") - .HasColumnName("title_cnt_fr"); - - b.Property("TitleIt") - .HasColumnType("text") - .HasColumnName("title_cnt_it"); - - b.HasKey("Id"); - - b.ToTable("contents", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.FaciesDescription", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_fac"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("creator"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("FromDepth") - .HasColumnType("double precision") - .HasColumnName("depth_from"); - - b.Property("IsLast") - .HasColumnType("boolean") - .HasColumnName("is_last"); - - b.Property("QtDescriptionId") - .HasColumnType("integer") - .HasColumnName("qt_description_id"); - - b.Property("StratigraphyId") - .HasColumnType("integer") - .HasColumnName("id_sty_fk"); - - b.Property("ToDepth") - .HasColumnType("double precision") - .HasColumnName("depth_to"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("update"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updater"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("QtDescriptionId"); - - b.HasIndex("StratigraphyId"); - - b.HasIndex("UpdatedById"); - - b.ToTable("facies_description", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Feedback", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_feb"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_feb"); - - b.Property("IsFrw") - .HasColumnType("boolean") - .HasColumnName("frw_feb"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message_feb"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag_feb"); - - b.Property("User") - .IsRequired() - .HasColumnType("text") - .HasColumnName("user_feb"); - - b.HasKey("Id"); - - b.ToTable("feedbacks", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.File", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_fil"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("uploaded_fil"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("id_usr_fk"); - - b.Property("Hash") - .IsRequired() - .HasColumnType("text") - .HasColumnName("hash_fil"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text") - .HasColumnName("name_fil"); - - b.Property("NameUuid") - .HasColumnType("text") - .HasColumnName("name_uuid_fil"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type_fil"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_fil"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updated_by_fil"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("UpdatedById"); - - b.ToTable("files", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.HydrotestCodelist", b => - { - b.Property("HydrotestId") - .HasColumnType("integer") - .HasColumnName("id_ht_fk"); - - b.Property("CodelistId") - .HasColumnType("integer") - .HasColumnName("id_cli_fk"); - - b.HasKey("HydrotestId", "CodelistId"); - - b.HasIndex("CodelistId"); - - b.ToTable("hydrotest_codelist", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.HydrotestResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("creator"); - - b.Property("HydrotestId") - .HasColumnType("integer") - .HasColumnName("hydrotest_id"); - - b.Property("MaxValue") - .HasColumnType("double precision") - .HasColumnName("max_value"); - - b.Property("MinValue") - .HasColumnType("double precision") - .HasColumnName("min_value"); - - b.Property("ParameterId") - .HasColumnType("integer") - .HasColumnName("parameter"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("update"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updater"); - - b.Property("Value") - .HasColumnType("double precision") - .HasColumnName("value"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("HydrotestId"); - - b.HasIndex("ParameterId"); - - b.HasIndex("UpdatedById"); - - b.ToTable("hydrotest_result", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Instrumentation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CasingId") - .HasColumnType("integer") - .HasColumnName("casing_id"); - - b.Property("CompletionId") - .HasColumnType("integer") - .HasColumnName("completion_id"); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("creator"); - - b.Property("FromDepth") - .HasColumnType("double precision") - .HasColumnName("from_depth"); - - b.Property("TypeId") - .HasColumnType("integer") - .HasColumnName("kind_id"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Notes") - .HasColumnType("text") - .HasColumnName("notes"); - - b.Property("StatusId") - .HasColumnType("integer") - .HasColumnName("status_id"); - - b.Property("ToDepth") - .HasColumnType("double precision") - .HasColumnName("to_depth"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("update"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updater"); - - b.HasKey("Id"); - - b.HasIndex("CasingId"); - - b.HasIndex("CompletionId"); - - b.HasIndex("CreatedById"); - - b.HasIndex("TypeId"); - - b.HasIndex("StatusId"); - - b.HasIndex("UpdatedById"); - - b.ToTable("instrumentation", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Layer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_lay"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AlterationId") - .HasColumnType("integer") - .HasColumnName("alteration_id_cli"); - - b.Property("CohesionId") - .HasColumnType("integer") - .HasColumnName("cohesion_id_cli"); - - b.Property("CompactnessId") - .HasColumnType("integer") - .HasColumnName("compactness_id_cli"); - - b.Property("ConsistanceId") - .HasColumnType("integer") - .HasColumnName("consistance_id_cli"); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation_lay"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("creator_lay"); - - b.Property("FromDepth") - .HasColumnType("double precision") - .HasColumnName("depth_from_lay"); - - b.Property("GradationId") - .HasColumnType("integer") - .HasColumnName("gradation_id_cli"); - - b.Property("GrainSize1Id") - .HasColumnType("integer") - .HasColumnName("grain_size_1_id_cli"); - - b.Property("GrainSize2Id") - .HasColumnType("integer") - .HasColumnName("grain_size_2_id_cli"); - - b.Property("HumidityId") - .HasColumnType("integer") - .HasColumnName("humidity_id_cli"); - - b.Property("IsLast") - .HasColumnType("boolean") - .HasColumnName("last_lay"); - - b.Property("IsStriae") - .HasColumnType("boolean") - .HasColumnName("striae_lay"); - - b.Property("IsUndefined") - .HasColumnType("boolean") - .HasColumnName("undefined_lay"); - - b.Property("LithologyId") - .HasColumnType("integer") - .HasColumnName("lithology_id_cli"); - - b.Property("LithologyTopBedrockId") - .HasColumnType("integer") - .HasColumnName("lithology_top_bedrock_id_cli"); - - b.Property("LithostratigraphyId") - .HasColumnType("integer") - .HasColumnName("lithostratigraphy_id_cli"); - - b.Property("Notes") - .HasColumnType("text") - .HasColumnName("notes_lay"); - - b.Property("OriginalLithology") - .HasColumnType("text") - .HasColumnName("original_lithology"); - - b.Property("OriginalUscs") - .HasColumnType("text") - .HasColumnName("uscs_original_lay"); - - b.Property("PlasticityId") - .HasColumnType("integer") - .HasColumnName("plasticity_id_cli"); - - b.Property("QtDescriptionId") - .HasColumnType("integer") - .HasColumnName("qt_description_id_cli"); - - b.Property("StratigraphyId") - .HasColumnType("integer") - .HasColumnName("id_sty_fk"); - - b.Property("ToDepth") - .HasColumnType("double precision") - .HasColumnName("depth_to_lay"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("update_lay"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updater_lay"); - - b.Property("Uscs1Id") - .HasColumnType("integer") - .HasColumnName("uscs_1_id_cli"); - - b.Property("Uscs2Id") - .HasColumnType("integer") - .HasColumnName("uscs_2_id_cli"); - - b.Property("UscsDeterminationId") - .HasColumnType("integer") - .HasColumnName("uscs_determination_id_cli"); - - b.HasKey("Id"); - - b.HasIndex("AlterationId"); - - b.HasIndex("CohesionId"); - - b.HasIndex("CompactnessId"); - - b.HasIndex("ConsistanceId"); - - b.HasIndex("CreatedById"); - - b.HasIndex("GradationId"); - - b.HasIndex("GrainSize1Id"); - - b.HasIndex("GrainSize2Id"); - - b.HasIndex("HumidityId"); - - b.HasIndex("LithologyId"); - - b.HasIndex("LithologyTopBedrockId"); - - b.HasIndex("LithostratigraphyId"); - - b.HasIndex("PlasticityId"); - - b.HasIndex("QtDescriptionId"); - - b.HasIndex("StratigraphyId"); - - b.HasIndex("UpdatedById"); - - b.HasIndex("Uscs1Id"); - - b.HasIndex("Uscs2Id"); - - b.HasIndex("UscsDeterminationId"); - - b.ToTable("layer", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.LayerCodelist", b => - { - b.Property("LayerId") - .HasColumnType("integer") - .HasColumnName("id_lay_fk"); - - b.Property("CodelistId") - .HasColumnType("integer") - .HasColumnName("id_cli_fk"); - - b.Property("SchemaName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("code_cli"); - - b.HasKey("LayerId", "CodelistId"); - - b.HasIndex("CodelistId"); - - b.ToTable("layer_codelist", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.LithologicalDescription", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_ldp"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("creator"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("FromDepth") - .HasColumnType("double precision") - .HasColumnName("depth_from"); - - b.Property("IsLast") - .HasColumnType("boolean") - .HasColumnName("is_last"); - - b.Property("QtDescriptionId") - .HasColumnType("integer") - .HasColumnName("qt_description_id"); - - b.Property("StratigraphyId") - .HasColumnType("integer") - .HasColumnName("id_sty_fk"); - - b.Property("ToDepth") - .HasColumnType("double precision") - .HasColumnName("depth_to"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("update"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updater"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("QtDescriptionId"); - - b.HasIndex("StratigraphyId"); - - b.HasIndex("UpdatedById"); - - b.ToTable("lithological_description", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.LithostratigraphyLayer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("creator"); - - b.Property("FromDepth") - .HasColumnType("double precision") - .HasColumnName("depth_from"); - - b.Property("IsLast") - .HasColumnType("boolean") - .HasColumnName("is_last"); - - b.Property("LithostratigraphyId") - .HasColumnType("integer") - .HasColumnName("lithostratigraphy_id"); - - b.Property("StratigraphyId") - .HasColumnType("integer") - .HasColumnName("stratigraphy_id"); - - b.Property("ToDepth") - .HasColumnType("double precision") - .HasColumnName("depth_to"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("update"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updater"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("LithostratigraphyId"); - - b.HasIndex("StratigraphyId"); - - b.HasIndex("UpdatedById"); - - b.ToTable("lithostratigraphy", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Observation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("BoreholeId") - .HasColumnType("integer") - .HasColumnName("borehole_id"); - - b.Property("CasingId") - .HasColumnType("integer") - .HasColumnName("casing_id"); - - b.Property("Comment") - .HasColumnType("text") - .HasColumnName("comment"); - - b.Property("CompletionFinished") - .HasColumnType("boolean") - .HasColumnName("completion_finished"); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("creator"); - - b.Property("Duration") - .HasColumnType("double precision") - .HasColumnName("duration"); - - b.Property("EndTime") - .HasColumnType("timestamp with time zone") - .HasColumnName("end_time"); - - b.Property("FromDepthM") - .HasColumnType("double precision") - .HasColumnName("from_depth_m"); - - b.Property("FromDepthMasl") - .HasColumnType("double precision") - .HasColumnName("from_depth_masl"); - - b.Property("ReliabilityId") - .HasColumnType("integer") - .HasColumnName("reliability"); - - b.Property("StartTime") - .HasColumnType("timestamp with time zone") - .HasColumnName("start_time"); - - b.Property("ToDepthM") - .HasColumnType("double precision") - .HasColumnName("to_depth_m"); - - b.Property("ToDepthMasl") - .HasColumnType("double precision") - .HasColumnName("to_depth_masl"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("observation_type"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("update"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updater"); - - b.HasKey("Id"); - - b.HasIndex("BoreholeId"); - - b.HasIndex("CasingId"); - - b.HasIndex("CreatedById"); - - b.HasIndex("ReliabilityId"); - - b.HasIndex("UpdatedById"); - - b.ToTable("observation", "bdms"); - - b.UseTptMappingStrategy(); - }); - - modelBuilder.Entity("BDMS.Models.Stratigraphy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_sty"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("BoreholeId") - .HasColumnType("integer") - .HasColumnName("id_bho_fk"); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation_sty"); - - b.Property("CreatedById") - .HasColumnType("integer") - .HasColumnName("author_sty"); - - b.Property("Date") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_sty"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("primary_sty"); - - b.Property("TypeId") - .HasColumnType("integer") - .HasColumnName("kind_id_cli"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name_sty"); - - b.Property("Notes") - .HasColumnType("text") - .HasColumnName("notes_sty"); - - b.Property("Updated") - .HasColumnType("timestamp with time zone") - .HasColumnName("update_sty"); - - b.Property("UpdatedById") - .HasColumnType("integer") - .HasColumnName("updater_sty"); - - b.HasKey("Id"); - - b.HasIndex("BoreholeId"); - - b.HasIndex("CreatedById"); - - b.HasIndex("TypeId"); - - b.HasIndex("UpdatedById"); - - b.ToTable("stratigraphy", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Term", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_tes"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Creation") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation_tes"); - - b.Property("Expiration") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_tes"); - - b.Property("IsDraft") - .HasColumnType("boolean") - .HasColumnName("draft_tes"); - - b.Property("TextDe") - .HasColumnType("text") - .HasColumnName("text_tes_de"); - - b.Property("TextEn") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text_tes_en"); - - b.Property("TextFr") - .HasColumnType("text") - .HasColumnName("text_tes_fr"); - - b.Property("TextIt") - .HasColumnType("text") - .HasColumnName("text_tes_it"); - - b.Property("TextRo") - .HasColumnType("text") - .HasColumnName("text_tes_ro"); - - b.HasKey("Id"); - - b.ToTable("terms", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_usr"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DisabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("disabled_usr"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("firstname"); - - b.Property("IsAdmin") - .HasColumnType("boolean") - .HasColumnName("admin_usr"); - - b.Property("IsViewer") - .HasColumnType("boolean") - .HasColumnName("viewer_usr"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("lastname"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text") - .HasColumnName("username"); - - b.Property("SubjectId") - .IsRequired() - .HasColumnType("text") - .HasColumnName("subject_id"); - - b.HasKey("Id"); - - b.ToTable("users", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.UserEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_evs"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_evs"); - - b.Property("Payload") - .HasColumnType("jsonb") - .HasColumnName("payload_evs"); - - b.Property("Topic") - .IsRequired() - .HasColumnType("text") - .HasColumnName("topic_evs"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("id_usr_fk"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("events", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.UserWorkgroupRole", b => - { - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("id_usr_fk"); - - b.Property("WorkgroupId") - .HasColumnType("integer") - .HasColumnName("id_wgp_fk"); - - b.Property("Role") - .HasColumnType("int") - .HasColumnName("id_rol_fk"); - - b.HasKey("UserId", "WorkgroupId", "Role"); - - b.ToTable("users_roles", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Workflow", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_wkf"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("BoreholeId") - .HasColumnType("integer") - .HasColumnName("id_bho_fk"); - - b.Property("Finished") - .HasColumnType("timestamp with time zone") - .HasColumnName("finished_wkf"); - - b.Property("Notes") - .HasColumnType("text") - .HasColumnName("notes_wkf"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("id_rol_fk"); - - b.Property("Started") - .HasColumnType("timestamp with time zone") - .HasColumnName("started_wkf"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("id_usr_fk"); - - b.HasKey("Id"); - - b.HasIndex("BoreholeId"); - - b.HasIndex("UserId"); - - b.ToTable("workflow", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Workgroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_wgp"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Created") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_wgp"); - - b.Property("Disabled") - .HasColumnType("timestamp with time zone") - .HasColumnName("disabled_wgp"); - - b.Property("IsSupplier") - .HasColumnType("boolean") - .HasColumnName("supplier_wgp"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text") - .HasColumnName("name_wgp"); - - b.Property("Settings") - .HasColumnType("json") - .HasColumnName("settings_wgp"); - - b.HasKey("Id"); - - b.ToTable("workgroups", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.FieldMeasurement", b => - { - b.HasBaseType("BDMS.Models.Observation"); - - b.Property("ParameterId") - .HasColumnType("integer") - .HasColumnName("parameter"); - - b.Property("SampleTypeId") - .HasColumnType("integer") - .HasColumnName("sample_type"); - - b.Property("Value") - .HasColumnType("double precision") - .HasColumnName("value"); - - b.HasIndex("ParameterId"); - - b.HasIndex("SampleTypeId"); - - b.ToTable("field_measurement", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.GroundwaterLevelMeasurement", b => - { - b.HasBaseType("BDMS.Models.Observation"); - - b.Property("TypeId") - .HasColumnType("integer") - .HasColumnName("kind"); - - b.Property("LevelM") - .HasColumnType("double precision") - .HasColumnName("level_m"); - - b.Property("LevelMasl") - .HasColumnType("double precision") - .HasColumnName("level_masl"); - - b.HasIndex("TypeId"); - - b.ToTable("groundwater_level_measurement", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Hydrotest", b => - { - b.HasBaseType("BDMS.Models.Observation"); - - b.ToTable("hydrotest", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.WaterIngress", b => - { - b.HasBaseType("BDMS.Models.Observation"); - - b.Property("ConditionsId") - .HasColumnType("integer") - .HasColumnName("conditions"); - - b.Property("QuantityId") - .HasColumnType("integer") - .HasColumnName("quantity"); - - b.HasIndex("ConditionsId"); - - b.HasIndex("QuantityId"); - - b.ToTable("water_ingress", "bdms"); - }); - - modelBuilder.Entity("BDMS.Models.Backfill", b => - { - b.HasOne("BDMS.Models.Completion", "Completion") - .WithMany("Backfills") - .HasForeignKey("CompletionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.Codelist", "Kind") - .WithMany() - .HasForeignKey("TypeId"); - - b.HasOne("BDMS.Models.Codelist", "Material") - .WithMany() - .HasForeignKey("MaterialId"); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.Navigation("Completion"); - - b.Navigation("CreatedBy"); - - b.Navigation("Kind"); - - b.Navigation("Material"); - - b.Navigation("UpdatedBy"); - }); - - modelBuilder.Entity("BDMS.Models.Borehole", b => - { - b.HasOne("BDMS.Models.Codelist", "Chronostratigraphy") - .WithMany() - .HasForeignKey("ChronostratigraphyId"); - - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.Codelist", "Cuttings") - .WithMany() - .HasForeignKey("CuttingsId"); - - b.HasOne("BDMS.Models.Codelist", "DrillingMethod") - .WithMany() - .HasForeignKey("DrillingMethodId"); - - b.HasOne("BDMS.Models.Codelist", "Hrs") - .WithMany() - .HasForeignKey("HrsId"); - - b.HasOne("BDMS.Models.Codelist", "Kind") - .WithMany() - .HasForeignKey("TypeId"); - - b.HasOne("BDMS.Models.Codelist", "LithologyTopBedrock") - .WithMany() - .HasForeignKey("LithologyTopBedrockId"); - - b.HasOne("BDMS.Models.Codelist", "Lithostratigraphy") - .WithMany() - .HasForeignKey("LithostratigraphyId"); - - b.HasOne("BDMS.Models.User", "LockedBy") - .WithMany() - .HasForeignKey("LockedById"); - - b.HasOne("BDMS.Models.Codelist", "Purpose") - .WithMany() - .HasForeignKey("PurposeId"); - - b.HasOne("BDMS.Models.Codelist", "QtDepth") - .WithMany() - .HasForeignKey("QtDepthId"); - - b.HasOne("BDMS.Models.Codelist", "QtElevation") - .WithMany() - .HasForeignKey("QtElevationId"); - - b.HasOne("BDMS.Models.Codelist", "QtInclinationDirection") - .WithMany() - .HasForeignKey("QtInclinationDirectionId"); - - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") - .WithMany() - .HasForeignKey("LocationPrecisionId"); - - b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") - .WithMany() - .HasForeignKey("QtReferenceElevationId"); - - b.HasOne("BDMS.Models.Codelist", "QtTotalDepthTvd") - .WithMany() - .HasForeignKey("QtTotalDepthTvdId"); - - b.HasOne("BDMS.Models.Codelist", "ReferenceElevationType") - .WithMany() - .HasForeignKey("ReferenceElevationTypeId"); - - b.HasOne("BDMS.Models.Codelist", "Restriction") - .WithMany() - .HasForeignKey("RestrictionId"); - - b.HasOne("BDMS.Models.Codelist", "Status") - .WithMany() - .HasForeignKey("StatusId"); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.HasOne("BDMS.Models.Workgroup", "Workgroup") - .WithMany("Boreholes") - .HasForeignKey("WorkgroupId"); - - b.Navigation("Chronostratigraphy"); - - b.Navigation("CreatedBy"); - - b.Navigation("Cuttings"); - - b.Navigation("DrillingMethod"); - - b.Navigation("Hrs"); - - b.Navigation("Kind"); - - b.Navigation("LithologyTopBedrock"); - - b.Navigation("Lithostratigraphy"); - - b.Navigation("LockedBy"); - - b.Navigation("Purpose"); - - b.Navigation("QtDepth"); - - b.Navigation("QtElevation"); - - b.Navigation("QtInclinationDirection"); - - b.Navigation("LocationPrecision"); - - b.Navigation("QtReferenceElevation"); - - b.Navigation("QtTotalDepthTvd"); - - b.Navigation("ReferenceElevationType"); - - b.Navigation("Restriction"); - - b.Navigation("Status"); - - b.Navigation("UpdatedBy"); - - b.Navigation("Workgroup"); - }); - - modelBuilder.Entity("BDMS.Models.BoreholeCodelist", b => - { - b.HasOne("BDMS.Models.Borehole", "Borehole") - .WithMany("BoreholeCodelists") - .HasForeignKey("BoreholeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.Codelist", "Codelist") - .WithMany("BoreholeCodelists") - .HasForeignKey("CodelistId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Borehole"); - - b.Navigation("Codelist"); - }); - - modelBuilder.Entity("BDMS.Models.BoreholeFile", b => - { - b.HasOne("BDMS.Models.Borehole", "Borehole") - .WithMany("BoreholeFiles") - .HasForeignKey("BoreholeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.File", "File") - .WithMany("BoreholeFiles") - .HasForeignKey("FileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.HasOne("BDMS.Models.User", "User") - .WithMany() - .HasForeignKey("UserId"); - - b.Navigation("Borehole"); - - b.Navigation("CreatedBy"); - - b.Navigation("File"); - - b.Navigation("UpdatedBy"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("BDMS.Models.Casing", b => - { - b.HasOne("BDMS.Models.Completion", "Completion") - .WithMany("Casings") - .HasForeignKey("CompletionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.Codelist", "Kind") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.Codelist", "Material") - .WithMany() - .HasForeignKey("MaterialId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.Navigation("Completion"); - - b.Navigation("CreatedBy"); - - b.Navigation("Kind"); - - b.Navigation("Material"); - - b.Navigation("UpdatedBy"); - }); - - modelBuilder.Entity("BDMS.Models.ChronostratigraphyLayer", b => - { - b.HasOne("BDMS.Models.Codelist", "Chronostratigraphy") - .WithMany() - .HasForeignKey("ChronostratigraphyId"); - - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") - .WithMany("ChronostratigraphyLayers") - .HasForeignKey("StratigraphyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.Navigation("Chronostratigraphy"); - - b.Navigation("CreatedBy"); - - b.Navigation("Stratigraphy"); - - b.Navigation("UpdatedBy"); - }); - - modelBuilder.Entity("BDMS.Models.Completion", b => - { - b.HasOne("BDMS.Models.Borehole", "Borehole") - .WithMany("Completions") - .HasForeignKey("BoreholeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.Codelist", "Kind") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.Navigation("Borehole"); - - b.Navigation("CreatedBy"); - - b.Navigation("Kind"); - - b.Navigation("UpdatedBy"); - }); - - modelBuilder.Entity("BDMS.Models.FaciesDescription", b => - { - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.Codelist", "QtDescription") - .WithMany() - .HasForeignKey("QtDescriptionId"); - - b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") - .WithMany("FaciesDescriptions") - .HasForeignKey("StratigraphyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.Navigation("CreatedBy"); - - b.Navigation("QtDescription"); - - b.Navigation("Stratigraphy"); - - b.Navigation("UpdatedBy"); - }); - - modelBuilder.Entity("BDMS.Models.File", b => - { - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.Navigation("CreatedBy"); - - b.Navigation("UpdatedBy"); - }); - - modelBuilder.Entity("BDMS.Models.HydrotestCodelist", b => - { - b.HasOne("BDMS.Models.Codelist", "Codelist") - .WithMany("HydrotestCodelists") - .HasForeignKey("CodelistId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.Hydrotest", "Hydrotest") - .WithMany("HydrotestCodelists") - .HasForeignKey("HydrotestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Codelist"); - - b.Navigation("Hydrotest"); - }); - - modelBuilder.Entity("BDMS.Models.HydrotestResult", b => - { - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.Hydrotest", "Hydrotest") - .WithMany("HydrotestResults") - .HasForeignKey("HydrotestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.Codelist", "Parameter") - .WithMany() - .HasForeignKey("ParameterId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.Navigation("CreatedBy"); - - b.Navigation("Hydrotest"); - - b.Navigation("Parameter"); - - b.Navigation("UpdatedBy"); - }); - - modelBuilder.Entity("BDMS.Models.Instrumentation", b => - { - b.HasOne("BDMS.Models.Casing", "Casing") - .WithMany("Instrumentations") - .HasForeignKey("CasingId"); - - b.HasOne("BDMS.Models.Completion", "Completion") - .WithMany("Instrumentations") - .HasForeignKey("CompletionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.Codelist", "Kind") - .WithMany() - .HasForeignKey("TypeId"); - - b.HasOne("BDMS.Models.Codelist", "Status") - .WithMany() - .HasForeignKey("StatusId"); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.Navigation("Casing"); - - b.Navigation("Completion"); - - b.Navigation("CreatedBy"); - - b.Navigation("Kind"); - - b.Navigation("Status"); - - b.Navigation("UpdatedBy"); - }); - - modelBuilder.Entity("BDMS.Models.Layer", b => - { - b.HasOne("BDMS.Models.Codelist", "Alteration") - .WithMany() - .HasForeignKey("AlterationId"); - - b.HasOne("BDMS.Models.Codelist", "Cohesion") - .WithMany() - .HasForeignKey("CohesionId"); - - b.HasOne("BDMS.Models.Codelist", "Compactness") - .WithMany() - .HasForeignKey("CompactnessId"); - - b.HasOne("BDMS.Models.Codelist", "Consistance") - .WithMany() - .HasForeignKey("ConsistanceId"); - - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.Codelist", "Gradation") - .WithMany() - .HasForeignKey("GradationId"); - - b.HasOne("BDMS.Models.Codelist", "GrainSize1") - .WithMany() - .HasForeignKey("GrainSize1Id"); - - b.HasOne("BDMS.Models.Codelist", "GrainSize2") - .WithMany() - .HasForeignKey("GrainSize2Id"); - - b.HasOne("BDMS.Models.Codelist", "Humidity") - .WithMany() - .HasForeignKey("HumidityId"); - - b.HasOne("BDMS.Models.Codelist", "Lithology") - .WithMany() - .HasForeignKey("LithologyId"); - - b.HasOne("BDMS.Models.Codelist", "LithologyTopBedrock") - .WithMany() - .HasForeignKey("LithologyTopBedrockId"); - - b.HasOne("BDMS.Models.Codelist", "Lithostratigraphy") - .WithMany() - .HasForeignKey("LithostratigraphyId"); - - b.HasOne("BDMS.Models.Codelist", "Plasticity") - .WithMany() - .HasForeignKey("PlasticityId"); - - b.HasOne("BDMS.Models.Codelist", "QtDescription") - .WithMany() - .HasForeignKey("QtDescriptionId"); - - b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") - .WithMany("Layers") - .HasForeignKey("StratigraphyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.HasOne("BDMS.Models.Codelist", "Uscs1") - .WithMany() - .HasForeignKey("Uscs1Id"); - - b.HasOne("BDMS.Models.Codelist", "Uscs2") - .WithMany() - .HasForeignKey("Uscs2Id"); - - b.HasOne("BDMS.Models.Codelist", "UscsDetermination") - .WithMany() - .HasForeignKey("UscsDeterminationId"); - - b.Navigation("Alteration"); - - b.Navigation("Cohesion"); - - b.Navigation("Compactness"); - - b.Navigation("Consistance"); - - b.Navigation("CreatedBy"); - - b.Navigation("Gradation"); - - b.Navigation("GrainSize1"); - - b.Navigation("GrainSize2"); - - b.Navigation("Humidity"); - - b.Navigation("Lithology"); - - b.Navigation("LithologyTopBedrock"); - - b.Navigation("Lithostratigraphy"); - - b.Navigation("Plasticity"); - - b.Navigation("QtDescription"); - - b.Navigation("Stratigraphy"); - - b.Navigation("UpdatedBy"); - - b.Navigation("Uscs1"); - - b.Navigation("Uscs2"); - - b.Navigation("UscsDetermination"); - }); - - modelBuilder.Entity("BDMS.Models.LayerCodelist", b => - { - b.HasOne("BDMS.Models.Codelist", "Codelist") - .WithMany("LayerCodelists") - .HasForeignKey("CodelistId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.Layer", "Layer") - .WithMany("LayerCodelists") - .HasForeignKey("LayerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Codelist"); - - b.Navigation("Layer"); - }); - - modelBuilder.Entity("BDMS.Models.LithologicalDescription", b => - { - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.Codelist", "QtDescription") - .WithMany() - .HasForeignKey("QtDescriptionId"); - - b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") - .WithMany("LithologicalDescriptions") - .HasForeignKey("StratigraphyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.Navigation("CreatedBy"); - - b.Navigation("QtDescription"); - - b.Navigation("Stratigraphy"); - - b.Navigation("UpdatedBy"); - }); - - modelBuilder.Entity("BDMS.Models.LithostratigraphyLayer", b => - { - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.Codelist", "Lithostratigraphy") - .WithMany() - .HasForeignKey("LithostratigraphyId"); - - b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") - .WithMany("LithostratigraphyLayers") - .HasForeignKey("StratigraphyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.Navigation("CreatedBy"); - - b.Navigation("Lithostratigraphy"); - - b.Navigation("Stratigraphy"); - - b.Navigation("UpdatedBy"); - }); - - modelBuilder.Entity("BDMS.Models.Observation", b => - { - b.HasOne("BDMS.Models.Borehole", "Borehole") - .WithMany() - .HasForeignKey("BoreholeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.Casing", "Casing") - .WithMany("Observations") - .HasForeignKey("CasingId"); - - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.Codelist", "Reliability") - .WithMany() - .HasForeignKey("ReliabilityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.Navigation("Borehole"); - - b.Navigation("Casing"); - - b.Navigation("CreatedBy"); - - b.Navigation("Reliability"); - - b.Navigation("UpdatedBy"); - }); - - modelBuilder.Entity("BDMS.Models.Stratigraphy", b => - { - b.HasOne("BDMS.Models.Borehole", "Borehole") - .WithMany("Stratigraphies") - .HasForeignKey("BoreholeId"); - - b.HasOne("BDMS.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById"); - - b.HasOne("BDMS.Models.Codelist", "Kind") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "UpdatedBy") - .WithMany() - .HasForeignKey("UpdatedById"); - - b.Navigation("Borehole"); - - b.Navigation("CreatedBy"); - - b.Navigation("Kind"); - - b.Navigation("UpdatedBy"); - }); - - modelBuilder.Entity("BDMS.Models.UserEvent", b => - { - b.HasOne("BDMS.Models.User", "User") - .WithMany("BoringEvents") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("BDMS.Models.UserWorkgroupRole", b => - { - b.HasOne("BDMS.Models.User", null) - .WithMany("WorkgroupRoles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("BDMS.Models.Workflow", b => - { - b.HasOne("BDMS.Models.Borehole", "Borehole") - .WithMany("Workflows") - .HasForeignKey("BoreholeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Borehole"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("BDMS.Models.FieldMeasurement", b => - { - b.HasOne("BDMS.Models.Observation", null) - .WithOne() - .HasForeignKey("BDMS.Models.FieldMeasurement", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.Codelist", "Parameter") - .WithMany() - .HasForeignKey("ParameterId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.Codelist", "SampleType") - .WithMany() - .HasForeignKey("SampleTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Parameter"); - - b.Navigation("SampleType"); - }); - - modelBuilder.Entity("BDMS.Models.GroundwaterLevelMeasurement", b => - { - b.HasOne("BDMS.Models.Observation", null) - .WithOne() - .HasForeignKey("BDMS.Models.GroundwaterLevelMeasurement", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.Codelist", "Kind") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Kind"); - }); - - modelBuilder.Entity("BDMS.Models.Hydrotest", b => - { - b.HasOne("BDMS.Models.Observation", null) - .WithOne() - .HasForeignKey("BDMS.Models.Hydrotest", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("BDMS.Models.WaterIngress", b => - { - b.HasOne("BDMS.Models.Codelist", "Conditions") - .WithMany() - .HasForeignKey("ConditionsId"); - - b.HasOne("BDMS.Models.Observation", null) - .WithOne() - .HasForeignKey("BDMS.Models.WaterIngress", "Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BDMS.Models.Codelist", "Quantity") - .WithMany() - .HasForeignKey("QuantityId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Conditions"); - - b.Navigation("Quantity"); - }); - - modelBuilder.Entity("BDMS.Models.Borehole", b => - { - b.Navigation("BoreholeCodelists"); - - b.Navigation("BoreholeFiles"); - - b.Navigation("Completions"); - - b.Navigation("Stratigraphies"); - - b.Navigation("Workflows"); - }); - - modelBuilder.Entity("BDMS.Models.Casing", b => - { - b.Navigation("Instrumentations"); - - b.Navigation("Observations"); - }); - - modelBuilder.Entity("BDMS.Models.Codelist", b => - { - b.Navigation("BoreholeCodelists"); - - b.Navigation("HydrotestCodelists"); - - b.Navigation("LayerCodelists"); - }); - - modelBuilder.Entity("BDMS.Models.Completion", b => - { - b.Navigation("Backfills"); - - b.Navigation("Casings"); - - b.Navigation("Instrumentations"); - }); - - modelBuilder.Entity("BDMS.Models.File", b => - { - b.Navigation("BoreholeFiles"); - }); - - modelBuilder.Entity("BDMS.Models.Layer", b => - { - b.Navigation("LayerCodelists"); - }); - - modelBuilder.Entity("BDMS.Models.Stratigraphy", b => - { - b.Navigation("ChronostratigraphyLayers"); - - b.Navigation("FaciesDescriptions"); - - b.Navigation("Layers"); - - b.Navigation("LithologicalDescriptions"); - - b.Navigation("LithostratigraphyLayers"); - }); - - modelBuilder.Entity("BDMS.Models.User", b => - { - b.Navigation("BoringEvents"); - - b.Navigation("WorkgroupRoles"); - }); - - modelBuilder.Entity("BDMS.Models.Workgroup", b => - { - b.Navigation("Boreholes"); - }); - - modelBuilder.Entity("BDMS.Models.Hydrotest", b => - { - b.Navigation("HydrotestCodelists"); - - b.Navigation("HydrotestResults"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/api/Migrations/20240212111401_RenameCodelists.cs b/src/api/Migrations/20240212111401_RenameCodelists.cs deleted file mode 100644 index 249e39a2c..000000000 --- a/src/api/Migrations/20240212111401_RenameCodelists.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BDMS.Migrations; - -/// -public partial class RenameCodelists : Migration -{ - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.Sql(@" - UPDATE bdms.codelist SET schema_cli = 'casing_type' WHERE schema_cli = 'casi200'; - UPDATE bdms.codelist SET schema_cli = 'casing_material' WHERE schema_cli = 'casi201'; - UPDATE bdms.codelist SET schema_cli = 'backfill_type' WHERE schema_cli = 'fill100'; - UPDATE bdms.codelist SET schema_cli = 'backfill_material' WHERE schema_cli = 'fill200'; - UPDATE bdms.codelist SET schema_cli = 'location_precision' WHERE schema_cli = 'qt_location'; - UPDATE bdms.codelist SET schema_cli = 'elevation_precision' WHERE schema_cli = 'qt_elevation'; - UPDATE bdms.codelist SET schema_cli = 'reference_elevation_type' WHERE schema_cli = 'ibor117'; - UPDATE bdms.codelist SET schema_cli = 'instrument_type' WHERE schema_cli = 'inst100'; - UPDATE bdms.codelist SET schema_cli = 'instrument_status' WHERE schema_cli = 'inst101'; - UPDATE bdms.codelist SET schema_cli = 'uscs_type' WHERE schema_cli = 'mcla101'; - UPDATE bdms.codelist SET schema_cli = 'uscs_determination' WHERE schema_cli = 'mcla104'; - UPDATE bdms.codelist SET schema_cli = 'debris' WHERE schema_cli = 'mcla107'; - UPDATE bdms.codelist SET schema_cli = 'plasticity' WHERE schema_cli = 'mlpr101'; - UPDATE bdms.codelist SET schema_cli = 'compactness' WHERE schema_cli = 'mlpr102'; - UPDATE bdms.codelist SET schema_cli = 'consistency' WHERE schema_cli = 'mlpr103'; - UPDATE bdms.codelist SET schema_cli = 'humidity' WHERE schema_cli = 'mlpr105'; - UPDATE bdms.codelist SET schema_cli = 'alteration' WHERE schema_cli = 'mlpr106'; - UPDATE bdms.codelist SET schema_cli = 'organic_components' WHERE schema_cli = 'mlpr108'; - UPDATE bdms.codelist SET schema_cli = 'grain_size' WHERE schema_cli = 'mlpr109'; - UPDATE bdms.codelist SET schema_cli = 'grain_shape' WHERE schema_cli = 'mlpr110'; - UPDATE bdms.codelist SET schema_cli = 'description_quality' WHERE schema_cli = 'qt_description'; - UPDATE bdms.codelist SET schema_cli = 'colour' WHERE schema_cli = 'mlpr112'; - UPDATE bdms.codelist SET schema_cli = 'grain_angularity' WHERE schema_cli = 'mlpr115'; - UPDATE bdms.codelist SET schema_cli = 'cohesion' WHERE schema_cli = 'mlpr116'; - DELETE FROM bdms.codelist WHERE schema_cli = 'casi100'; - DELETE FROM bdms.codelist WHERE schema_cli = 'casi101';"); - } -} diff --git a/src/client/cypress/e2e/codeList.cy.js b/src/client/cypress/e2e/codeList.cy.js index e3635f6cb..308b76511 100644 --- a/src/client/cypress/e2e/codeList.cy.js +++ b/src/client/cypress/e2e/codeList.cy.js @@ -1,7 +1,4 @@ -import { - loginAsAdmin, - loginAsEditorInViewerMode, -} from "../e2e/helpers/testHelpers"; +import { loginAsAdmin, loginAsEditorInViewerMode } from "../e2e/helpers/testHelpers"; describe("Codelist translations tests", () => { it("Admin can open codelist translation section", () => { @@ -98,14 +95,10 @@ describe("Codelist translations tests", () => { .find("button") .click(); - cy.contains("p", "borehole_cuttings_core").click(); - cy.get("div[name='borehole_cuttings_core']") - .children() - .should("have.length", 5); - cy.get("div[name='borehole_cuttings_core']").first().should("contain", 1); - cy.get("div[name='borehole_cuttings_core']") - .first() - .should("contain", "Bohrkern"); + cy.contains("p", "custom.cuttings").click(); + cy.get("div[name='custom.cuttings']").children().should("have.length", 5); + cy.get("div[name='custom.cuttings']").first().should("contain", 1); + cy.get("div[name='custom.cuttings']").first().should("contain", "Bohrkern"); // click on record. cy.contains("div", "Bohrkern").click(); @@ -117,22 +110,17 @@ describe("Codelist translations tests", () => { cy.get("input[name=order-input]").click().clear().type("6"); cy.contains("button", "Save").click(); - cy.get("div[name='borehole_cuttings_core']") - .children() - .should("have.length", 5); - cy.get("div[name='borehole_cuttings_core']") + cy.get("div[name='custom.cuttings']").children().should("have.length", 5); + cy.get("div[name='custom.cuttings']") .children() .first() .should("contain", 2); - cy.get("div[name='borehole_cuttings_core']") + cy.get("div[name='custom.cuttings']") .children() .first() .should("contain", "Bohrklein"); - cy.get("div[name='borehole_cuttings_core']") - .children() - .eq(4) - .should("contain", 6); - cy.get("div[name='borehole_cuttings_core']") + cy.get("div[name='custom.cuttings']").children().eq(4).should("contain", 6); + cy.get("div[name='custom.cuttings']") .children() .eq(4) .should("contain", "Bohrkern"); @@ -142,6 +130,6 @@ describe("Codelist translations tests", () => { cy.contains("button", "Save").click(); // order was updated - cy.get("div[name='borehole_cuttings_core']").first().should("contain", 1); + cy.get("div[name='custom.cuttings']").first().should("contain", 1); }); }); diff --git a/src/client/src/commons/detail/detailsComponent.js b/src/client/src/commons/detail/detailsComponent.js index 5045c7292..b29148623 100644 --- a/src/client/src/commons/detail/detailsComponent.js +++ b/src/client/src/commons/detail/detailsComponent.js @@ -148,8 +148,8 @@ class DetailsComponent extends React.Component { fontSize: "1.1em", }}>
{this.getDomainRow("kind", data.kind)} {this.getDomainRow( - "drilling_purpose", - data.drilling_purpose, + "extended.purpose", + data.extended.purpose, "purpose", )} {this.getTextRow("spud_date", data.spud_date)} @@ -331,27 +331,27 @@ class MetaComponent extends React.Component { data.inclination !== null ? data.inclination : null, )} {this.getDomainRow( - "inclination_precision", - data.inclination_precision, + "custom.qt_bore_inc_dir", + data.custom.qt_bore_inc_dir, "qt_bore_inc_dir", )}
{this.getDomainRow( - "drilling_method", - data.drilling_method, + "extended.drilling_method", + data.extended.drilling_method, "drilling_method", )} {this.getDomainRow( - "borehole_cuttings_core", - data.borehole_cuttings_core, + "custom.cuttings", + data.custom.cuttings, "cuttings", )} {this.getTextRow("drilling_end_date", data.drilling_date)} {this.getDomainRow( - "borehole_status", - data.borehole_status, + "extended.status", + data.extended.status, "boreholestatus", )} {this.getTextRow( @@ -402,18 +402,20 @@ class MetaComponent extends React.Component {
{this.getDomainRow( - "depth_precision", + "custom.qt_top_bedrock", data.custom.qt_depth, "qt_depth", )} {this.getDomainRow( - "depth_precision", + "custom.qt_top_bedrock", data.qt_total_depth_tvd, "total_depth_tvd_qt", )} {this.getNumericTextRow( "qt_top_bedrock", - data.depth_precision !== null ? data.depth_precision : null, + data.custom.qt_top_bedrock !== null + ? data.custom.qt_top_bedrock + : null, )} {this.getNumericTextRow( "top_bedrock_tvd_qt", diff --git a/src/client/src/commons/form/borehole/segments/boreholeDetailSegment.js b/src/client/src/commons/form/borehole/segments/boreholeDetailSegment.js index 8499dc524..ec7f4b0f7 100644 --- a/src/client/src/commons/form/borehole/segments/boreholeDetailSegment.js +++ b/src/client/src/commons/form/borehole/segments/boreholeDetailSegment.js @@ -48,7 +48,7 @@ const BoreholeDetailSegment = props => { onSelected={selected => { updateChange("custom.qt_depth", selected.id, false); }} - schema="depth_precision" + schema="custom.qt_top_bedrock" selected={borehole.data.custom.qt_depth} readOnly={!isEditable} /> @@ -88,7 +88,7 @@ const BoreholeDetailSegment = props => { onSelected={selected => { updateChange("qt_total_depth_tvd", selected.id, false); }} - schema="depth_precision" + schema="custom.qt_top_bedrock" selected={borehole.data.qt_total_depth_tvd} readOnly={!isEditable} /> @@ -129,12 +129,12 @@ const BoreholeDetailSegment = props => { autoCorrect="off" onChange={e => { updateNumber( - "depth_precision", + "custom.qt_top_bedrock", e.target.value === "" ? null : parseIfString(e.target.value), ); }} spellCheck="false" - value={borehole.data.depth_precision} + value={borehole.data.custom.qt_top_bedrock} thousandSeparator="'" readOnly={!isEditable} /> diff --git a/src/client/src/commons/form/borehole/segments/boreholeGeneralSegment.js b/src/client/src/commons/form/borehole/segments/boreholeGeneralSegment.js index e81d9f488..dcab19aae 100644 --- a/src/client/src/commons/form/borehole/segments/boreholeGeneralSegment.js +++ b/src/client/src/commons/form/borehole/segments/boreholeGeneralSegment.js @@ -45,10 +45,14 @@ const BoreholeGeneralSegment = props => { { - updateChange("drilling_method", selected.id, false); + updateChange( + "extended.drilling_method", + selected.id, + false, + ); }} - schema="drilling_method" - selected={borehole.data.drilling_method} + schema="extended.drilling_method" + selected={borehole.data.extended.drilling_method} readOnly={!isEditable} /> @@ -58,10 +62,10 @@ const BoreholeGeneralSegment = props => { { - updateChange("drilling_purpose", selected.id, false); + updateChange("extended.purpose", selected.id, false); }} - schema="drilling_purpose" - selected={borehole.data.drilling_purpose} + schema="extended.purpose" + selected={borehole.data.extended.purpose} readOnly={!isEditable} /> @@ -79,14 +83,10 @@ const BoreholeGeneralSegment = props => { { - updateChange( - "borehole_cuttings_core", - selected.id, - false, - ); + updateChange("custom.cuttings", selected.id, false); }} - schema="borehole_cuttings_core" - selected={borehole.data.borehole_cuttings_core} + schema="custom.cuttings" + selected={borehole.data.custom.cuttings} readOnly={!isEditable} /> @@ -177,10 +177,10 @@ const BoreholeGeneralSegment = props => { { - updateChange("borehole_status", selected.id, false); + updateChange("extended.status", selected.id, false); }} - schema="borehole_status" - selected={borehole.data.borehole_status} + schema="extended.status" + selected={borehole.data.extended.status} readOnly={!isEditable} /> @@ -238,10 +238,10 @@ const BoreholeGeneralSegment = props => { { - updateChange("inclination_precision", selected.id, false); + updateChange("custom.qt_bore_inc_dir", selected.id, false); }} - schema="inclination_precision" - selected={borehole.data.inclination_precision} + schema="custom.qt_bore_inc_dir" + selected={borehole.data.custom.qt_bore_inc_dir} readOnly={!isEditable} /> diff --git a/src/client/src/commons/form/multiple/multipleForm.js b/src/client/src/commons/form/multiple/multipleForm.js index 8203d46a7..8c536d017 100644 --- a/src/client/src/commons/form/multiple/multipleForm.js +++ b/src/client/src/commons/form/multiple/multipleForm.js @@ -55,22 +55,22 @@ class MultipleForm extends React.Component { value: null, }, kind: { api: "kind", value: null }, - drilling_method: { api: "drilling_method", value: null }, - purpose: { api: "drilling_purpose", value: null }, - cuttings: { api: "borehole_cuttings_core", value: null }, + drilling_method: { api: "extended.drilling_method", value: null }, + purpose: { api: "extended.purpose", value: null }, + cuttings: { api: "custom.cuttings", value: null }, spud_date: { api: "spud_date", value: null }, drilling_end_date: { api: "drilling_date", value: null }, drill_diameter: { api: "custom.drill_diameter", value: null }, - boreholestatus: { api: "borehole_status", value: null }, + boreholestatus: { api: "extended.status", value: null }, inclination: { api: "inclination", value: null }, inclination_direction: { api: "inclination_direction", value: null }, - qt_bore_inc_dir: { api: "inclination_precision", value: null }, + qt_bore_inc_dir: { api: "custom.qt_bore_inc_dir", value: null }, totaldepth: { api: "total_depth", value: null }, - qt_depth: { api: "depth_precision", value: null }, + qt_depth: { api: "custom.qt_top_bedrock", value: null }, total_depth_tvd: { api: "total_depth_tvd", value: null }, total_depth_tvd_qt: { api: "qt_total_depth_tvd", value: null }, top_bedrock: { api: "extended.top_bedrock", value: null }, - qt_top_bedrock: { api: "depth_precision", value: null }, + qt_top_bedrock: { api: "custom.qt_top_bedrock", value: null }, top_bedrock_tvd: { api: "extended.top_bedrock_tvd", value: null }, top_bedrock_tvd_qt: { api: "custom.qt_top_bedrock_tvd", value: null }, groundwater: { api: "extended.groundwater", value: null }, @@ -442,7 +442,7 @@ class MultipleForm extends React.Component { ])} {this.getGroup([ this.getInput("total_depth_tvd", "number"), - this.getDomain("total_depth_tvd_qt", "depth_precision"), + this.getDomain("total_depth_tvd_qt", "custom.qt_top_bedrock"), ])} {this.getGroup([ this.getInput("top_bedrock", "number"), @@ -450,7 +450,7 @@ class MultipleForm extends React.Component { ])} {this.getGroup([ this.getInput("top_bedrock_tvd", "number"), - this.getDomain("top_bedrock_tvd_qt", "depth_precision"), + this.getDomain("top_bedrock_tvd_qt", "custom.qt_top_bedrock"), ])} {this.getRadio("groundwater")} {this.getDomain( diff --git a/src/client/src/commons/search/data/boreholeSearchData.js b/src/client/src/commons/search/data/boreholeSearchData.js index 6dacaba7f..628c5c230 100644 --- a/src/client/src/commons/search/data/boreholeSearchData.js +++ b/src/client/src/commons/search/data/boreholeSearchData.js @@ -16,7 +16,7 @@ export const boreholeSearchData = [ type: "Dropdown", label: "drilling_method", value: "method", - schema: "drilling_method", + schema: "extended.drilling_method", multiple: false, search: false, isVisibleValue: "extended.method", @@ -26,20 +26,20 @@ export const boreholeSearchData = [ type: "Dropdown", label: "purpose", value: "purpose", - schema: "drilling_purpose", + schema: "extended.purpose", multiple: false, search: false, - isVisibleValue: "drilling_purpose", + isVisibleValue: "extended.purpose", }, { id: 3, type: "Dropdown", label: "cuttings", value: "cuttings", - schema: "borehole_cuttings_core", + schema: "custom.cuttings", multiple: false, search: false, - isVisibleValue: "borehole_cuttings_core", + isVisibleValue: "custom.cuttings", }, { id: 4, @@ -104,10 +104,10 @@ export const boreholeSearchData = [ type: "Dropdown", label: "boreholestatus", value: "status", - schema: "borehole_status", + schema: "extended.status", multiple: false, search: false, - isVisibleValue: "borehole_status", + isVisibleValue: "extended.status", }, { id: 11, @@ -160,7 +160,7 @@ export const boreholeSearchData = [ type: "Dropdown", label: "qt_bore_inc_dir", value: "qt_inclination_direction", - schema: "inclination_precision", + schema: "custom.qt_bore_inc_dir", multiple: false, search: false, isVisibleValue: "qt_bore_inc_dir", @@ -258,7 +258,7 @@ export const boreholeSearchData = [ type: "Dropdown", label: "qt_depth", value: "qt_depth", - schema: "depth_precision", + schema: "custom.qt_top_bedrock", multiple: false, search: false, isVisibleValue: "qt_depth", @@ -268,7 +268,7 @@ export const boreholeSearchData = [ type: "Dropdown", label: "total_depth_tvd_qt", value: "qt_total_depth_tvd", - schema: "depth_precision", + schema: "custom.qt_top_bedrock", multiple: false, search: false, isVisibleValue: "total_depth_tvd_qt", diff --git a/src/client/src/commons/table/boreholeEditorTable.js b/src/client/src/commons/table/boreholeEditorTable.js index e8739f7d4..7d18b6660 100644 --- a/src/client/src/commons/table/boreholeEditorTable.js +++ b/src/client/src/commons/table/boreholeEditorTable.js @@ -322,7 +322,7 @@ class BoreholeEditorTable extends TTable { , - + , {_.isNil(item.total_depth) ? null : ( diff --git a/src/client/src/commons/table/boreholeTable.js b/src/client/src/commons/table/boreholeTable.js index be1bf5c66..97943180e 100644 --- a/src/client/src/commons/table/boreholeTable.js +++ b/src/client/src/commons/table/boreholeTable.js @@ -190,12 +190,12 @@ class BoreholeTable extends TableComponent { color: "#787878", fontSize: "0.8em", }}> - {_.isNil(item.drilling_purpose) ? null : ( + {_.isNil(item.extended.purpose) ? null : ( ( ) diff --git a/src/client/src/pages/settings/data/boreholeEditorData.js b/src/client/src/pages/settings/data/boreholeEditorData.js index 55f9957c6..b103852e7 100644 --- a/src/client/src/pages/settings/data/boreholeEditorData.js +++ b/src/client/src/pages/settings/data/boreholeEditorData.js @@ -12,12 +12,12 @@ export const boreholeEditorData = [ { id: 2, label: "purpose", - value: "drilling_purpose", + value: "extended.purpose", }, { id: 3, label: "cuttings", - value: "borehole_cuttings_core", + value: "custom.cuttings", }, { id: 4, @@ -37,7 +37,7 @@ export const boreholeEditorData = [ { id: 7, label: "boreholestatus", - value: "borehole_status", + value: "extended.status", }, { id: 8, diff --git a/tests/Controllers/BackfillControllerTest.cs b/tests/Controllers/BackfillControllerTest.cs index 74421e42f..ac5500a34 100644 --- a/tests/Controllers/BackfillControllerTest.cs +++ b/tests/Controllers/BackfillControllerTest.cs @@ -68,7 +68,7 @@ public async Task CreateAsync() { CompletionId = completionId, MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id, - KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id, + KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id, Notes = "ARGONSHIP", FromDepth = 0, ToDepth = 100, @@ -84,7 +84,7 @@ public async Task CreateAsync() Assert.AreEqual(0, backfill.FromDepth); Assert.AreEqual(100, backfill.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id, backfill.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id, backfill.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id, backfill.KindId); } [TestMethod] @@ -94,7 +94,7 @@ public async Task EditAsync() var completionId = backfill.CompletionId; backfill.MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id; - backfill.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id; + backfill.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id; backfill.Notes = "COLLAR"; backfill.FromDepth = 50; backfill.ToDepth = 200; @@ -109,7 +109,7 @@ public async Task EditAsync() Assert.AreEqual(50, backfill.FromDepth); Assert.AreEqual(200, backfill.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id, backfill.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id, backfill.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id, backfill.KindId); } [TestMethod] diff --git a/tests/Controllers/CasingControllerTest.cs b/tests/Controllers/CasingControllerTest.cs index da97b3dea..c3889c4cf 100644 --- a/tests/Controllers/CasingControllerTest.cs +++ b/tests/Controllers/CasingControllerTest.cs @@ -72,7 +72,7 @@ public async Task CreateAsync() FromDepth = 0, ToDepth = 100, MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id, - KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id, + KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id, DateStart = new DateOnly(2021, 1, 1), DateFinish = new DateOnly(2021, 1, 2), InnerDiameter = 3, @@ -90,7 +90,7 @@ public async Task CreateAsync() Assert.AreEqual(0, casing.FromDepth); Assert.AreEqual(100, casing.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id, casing.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id, casing.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id, casing.KindId); Assert.AreEqual(3, casing.InnerDiameter); Assert.AreEqual(4, casing.OuterDiameter); Assert.AreEqual(new DateOnly(2021, 1, 1), casing.DateStart); @@ -104,7 +104,7 @@ public async Task EditAsync() var completionId = casing.CompletionId; casing.MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id; - casing.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id; + casing.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id; casing.Notes = "COLLAR"; casing.FromDepth = 50; casing.ToDepth = 200; @@ -119,7 +119,7 @@ public async Task EditAsync() Assert.AreEqual(50, casing.FromDepth); Assert.AreEqual(200, casing.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id, casing.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id, casing.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id, casing.KindId); } [TestMethod] From 00cba77704eeb148ff9128a82ddb1d2cc9de3386 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 11:42:20 +0100 Subject: [PATCH 23/36] Fix migration and backend testes --- src/api/BdmsContextExtensions.cs | 4 +- ...20240214101707_RenameCodelists.Designer.cs | 2794 +++++++++++++++++ .../20240214101707_RenameCodelists.cs | 41 + .../Migrations/BdmsContextModelSnapshot.cs | 104 +- tests/Controllers/BackfillControllerTest.cs | 8 +- tests/Controllers/CasingControllerTest.cs | 8 +- tests/Controllers/CodeListControllerTest.cs | 4 +- 7 files changed, 2899 insertions(+), 64 deletions(-) create mode 100644 src/api/Migrations/20240214101707_RenameCodelists.Designer.cs create mode 100644 src/api/Migrations/20240214101707_RenameCodelists.cs diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index 6c01b0588..545a61445 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -77,7 +77,7 @@ public static void SeedData(this BdmsContext context) List lithostratigraphyTopBedrockIds = codelists.Where(c => c.Schema == "custom.lithostratigraphy_top_bedrock").Select(s => s.Id).ToList(); List instrumentKindIds = codelists.Where(c => c.Schema == CompletionSchemas.InstrumentationKindSchema).Select(s => s.Id).ToList(); List instrumentStatusIds = codelists.Where(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Select(s => s.Id).ToList(); - List casingKindIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingKindSchema).Select(s => s.Id).ToList(); + List casingKindIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingTypeSchema).Select(s => s.Id).ToList(); List casingMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Select(s => s.Id).ToList(); List plasticityIds = codelists.Where(c => c.Schema == "plasticity").Select(s => s.Id).ToList(); List compactnessIds = codelists.Where(c => c.Schema == "compactness").Select(s => s.Id).ToList(); @@ -85,7 +85,7 @@ public static void SeedData(this BdmsContext context) List humidityIds = codelists.Where(c => c.Schema == "humidity").Select(s => s.Id).ToList(); List alterationIds = codelists.Where(c => c.Schema == "alteration").Select(s => s.Id).ToList(); List cohesionIds = codelists.Where(c => c.Schema == "cohesion").Select(s => s.Id).ToList(); - List backfillKindIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillKindSchema).Select(s => s.Id).ToList(); + List backfillKindIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Select(s => s.Id).ToList(); List backfillMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Select(s => s.Id).ToList(); List uscsIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); List uscsDeterminationIds = codelists.Where(c => c.Schema == "uscs_determination").Select(s => s.Id).ToList(); diff --git a/src/api/Migrations/20240214101707_RenameCodelists.Designer.cs b/src/api/Migrations/20240214101707_RenameCodelists.Designer.cs new file mode 100644 index 000000000..204aefafe --- /dev/null +++ b/src/api/Migrations/20240214101707_RenameCodelists.Designer.cs @@ -0,0 +1,2794 @@ +// +using System; +using BDMS; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using NetTopologySuite.Geometries; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace BDMS.Migrations +{ + [DbContext(typeof(BdmsContext))] + [Migration("20240214101707_RenameCodelists")] + partial class RenameCodelists + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasDefaultSchema("bdms") + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "ltree"); + NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "postgis"); + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("BDMS.Models.Backfill", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CompletionId") + .HasColumnType("integer") + .HasColumnName("completion_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("from_depth"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind_id"); + + b.Property("MaterialId") + .HasColumnType("integer") + .HasColumnName("material_id"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("to_depth"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CompletionId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("KindId"); + + b.HasIndex("MaterialId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("backfill", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Borehole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_bho"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AlternateName") + .HasColumnType("text") + .HasColumnName("alternate_name_bho"); + + b.Property("Canton") + .HasColumnType("text") + .HasColumnName("canton_bho"); + + b.Property("ChronostratigraphyId") + .HasColumnType("integer") + .HasColumnName("chronostrat_id_cli"); + + b.Property("Country") + .HasColumnType("text") + .HasColumnName("country_bho"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_bho"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("created_by_bho"); + + b.Property("CuttingsId") + .HasColumnType("integer") + .HasColumnName("cuttings_id_cli"); + + b.Property("DrillingDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("drilling_date_bho"); + + b.Property("DrillingDiameter") + .HasColumnType("double precision") + .HasColumnName("drilling_diameter_bho"); + + b.Property("DrillingMethodId") + .HasColumnType("integer") + .HasColumnName("drilling_method_id_cli"); + + b.Property("ElevationPrecisionId") + .HasColumnType("integer") + .HasColumnName("qt_elevation_id_cli"); + + b.Property("ElevationZ") + .HasColumnType("double precision") + .HasColumnName("elevation_z_bho"); + + b.Property("Geometry") + .HasColumnType("geometry") + .HasColumnName("geom_bho"); + + b.Property("HasGroundwater") + .HasColumnType("boolean") + .HasColumnName("groundwater_bho"); + + b.Property("HrsId") + .HasColumnType("integer") + .HasColumnName("hrs_id_cli"); + + b.Property("Inclination") + .HasColumnType("double precision") + .HasColumnName("inclination_bho"); + + b.Property("InclinationDirection") + .HasColumnType("double precision") + .HasColumnName("inclination_direction_bho"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("public_bho"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind_id_cli"); + + b.Property("LithologyTopBedrockId") + .HasColumnType("integer") + .HasColumnName("lithology_top_bedrock_id_cli"); + + b.Property("LithostratigraphyId") + .HasColumnType("integer") + .HasColumnName("lithostrat_id_cli"); + + b.Property("LocationPrecisionId") + .HasColumnType("integer") + .HasColumnName("qt_location_id_cli"); + + b.Property("LocationX") + .HasColumnType("double precision") + .HasColumnName("location_x_bho"); + + b.Property("LocationXLV03") + .HasColumnType("double precision") + .HasColumnName("location_x_lv03_bho"); + + b.Property("LocationY") + .HasColumnType("double precision") + .HasColumnName("location_y_bho"); + + b.Property("LocationYLV03") + .HasColumnType("double precision") + .HasColumnName("location_y_lv03_bho"); + + b.Property("Locked") + .HasColumnType("timestamp with time zone") + .HasColumnName("locked_bho"); + + b.Property("LockedById") + .HasColumnType("integer") + .HasColumnName("locked_by_bho"); + + b.Property("Municipality") + .HasColumnType("text") + .HasColumnName("municipality_bho"); + + b.Property("NationalInterest") + .HasColumnType("boolean") + .HasColumnName("national_interest"); + + b.Property("OriginalName") + .HasColumnType("text") + .HasColumnName("original_name_bho"); + + b.Property("OriginalReferenceSystem") + .HasColumnType("integer") + .HasColumnName("srs_id_cli"); + + b.Property("ProjectName") + .HasColumnType("text") + .HasColumnName("project_name_bho"); + + b.Property("PurposeId") + .HasColumnType("integer") + .HasColumnName("purpose_id_cli"); + + b.Property("QtDepthId") + .HasColumnType("integer") + .HasColumnName("qt_depth_id_cli"); + + b.Property("QtInclinationDirectionId") + .HasColumnType("integer") + .HasColumnName("qt_inclination_direction_id_cli"); + + b.Property("QtReferenceElevationId") + .HasColumnType("integer") + .HasColumnName("qt_reference_elevation_id_cli"); + + b.Property("QtTopBedrock") + .HasColumnType("double precision") + .HasColumnName("qt_top_bedrock"); + + b.Property("QtTopBedrockTvd") + .HasColumnType("double precision") + .HasColumnName("qt_top_bedrock_tvd"); + + b.Property("QtTotalDepthTvdId") + .HasColumnType("integer") + .HasColumnName("qt_total_depth_tvd_id_cli"); + + b.Property("ReferenceElevation") + .HasColumnType("double precision") + .HasColumnName("reference_elevation_bho"); + + b.Property("ReferenceElevationTypeId") + .HasColumnType("integer") + .HasColumnName("reference_elevation_type_id_cli"); + + b.Property("Remarks") + .HasColumnType("text") + .HasColumnName("remarks_bho"); + + b.Property("RestrictionId") + .HasColumnType("integer") + .HasColumnName("restriction_id_cli"); + + b.Property("RestrictionUntil") + .HasColumnType("timestamp with time zone") + .HasColumnName("restriction_until_bho"); + + b.Property("SpudDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("spud_date_bho"); + + b.Property("StatusId") + .HasColumnType("integer") + .HasColumnName("status_id_cli"); + + b.Property("TopBedrock") + .HasColumnType("double precision") + .HasColumnName("top_bedrock_bho"); + + b.Property("TopBedrockTvd") + .HasColumnType("double precision") + .HasColumnName("top_bedrock_tvd_bho"); + + b.Property("TotalDepth") + .HasColumnType("double precision") + .HasColumnName("total_depth_bho"); + + b.Property("TotalDepthTvd") + .HasColumnType("double precision") + .HasColumnName("total_depth_tvd_bho"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("updated_bho"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updated_by_bho"); + + b.Property("WorkgroupId") + .HasColumnType("integer") + .HasColumnName("id_wgp_fk"); + + b.HasKey("Id"); + + b.HasIndex("ChronostratigraphyId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("CuttingsId"); + + b.HasIndex("DrillingMethodId"); + + b.HasIndex("ElevationPrecisionId"); + + b.HasIndex("HrsId"); + + b.HasIndex("KindId"); + + b.HasIndex("LithologyTopBedrockId"); + + b.HasIndex("LithostratigraphyId"); + + b.HasIndex("LocationPrecisionId"); + + b.HasIndex("LockedById"); + + b.HasIndex("PurposeId"); + + b.HasIndex("QtDepthId"); + + b.HasIndex("QtInclinationDirectionId"); + + b.HasIndex("QtReferenceElevationId"); + + b.HasIndex("QtTotalDepthTvdId"); + + b.HasIndex("ReferenceElevationTypeId"); + + b.HasIndex("RestrictionId"); + + b.HasIndex("StatusId"); + + b.HasIndex("UpdatedById"); + + b.HasIndex("WorkgroupId"); + + b.ToTable("borehole", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.BoreholeCodelist", b => + { + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("id_bho_fk"); + + b.Property("CodelistId") + .HasColumnType("integer") + .HasColumnName("id_cli_fk"); + + b.Property("SchemaName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("code_cli"); + + b.Property("Value") + .IsRequired() + .HasColumnType("text") + .HasColumnName("value_bco"); + + b.HasKey("BoreholeId", "CodelistId"); + + b.HasIndex("CodelistId"); + + b.ToTable("borehole_codelist", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.BoreholeFile", b => + { + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("id_bho_fk"); + + b.Property("FileId") + .HasColumnType("integer") + .HasColumnName("id_fil_fk"); + + b.Property("Attached") + .HasColumnType("timestamp with time zone") + .HasColumnName("attached_bfi"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_bfi"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("created_by_bfi"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description_bfi"); + + b.Property("Public") + .HasColumnType("boolean") + .HasColumnName("public_bfi"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update_bfi"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater_bfi"); + + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.HasKey("BoreholeId", "FileId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("FileId"); + + b.HasIndex("UpdatedById"); + + b.HasIndex("UserId"); + + b.ToTable("borehole_files", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Casing", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CompletionId") + .HasColumnType("integer") + .HasColumnName("completion_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("DateFinish") + .HasColumnType("date") + .HasColumnName("date_finish"); + + b.Property("DateStart") + .HasColumnType("date") + .HasColumnName("date_start"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("from_depth"); + + b.Property("InnerDiameter") + .HasColumnType("double precision") + .HasColumnName("inner_diameter"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind_id"); + + b.Property("MaterialId") + .HasColumnType("integer") + .HasColumnName("material_id"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes"); + + b.Property("OuterDiameter") + .HasColumnType("double precision") + .HasColumnName("outer_diameter"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("to_depth"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CompletionId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("KindId"); + + b.HasIndex("MaterialId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("casing", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.ChronostratigraphyLayer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_chr"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChronostratigraphyId") + .HasColumnType("integer") + .HasColumnName("chronostratigraphy_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("is_last"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("id_sty_fk"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("ChronostratigraphyId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("chronostratigraphy", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Codelist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_cli"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Code") + .IsRequired() + .HasColumnType("text") + .HasColumnName("code_cli"); + + b.Property("Conf") + .HasColumnType("text") + .HasColumnName("conf_cli"); + + b.Property("De") + .HasColumnType("text") + .HasColumnName("text_cli_de"); + + b.Property("DescriptionDe") + .HasColumnType("text") + .HasColumnName("description_cli_de"); + + b.Property("DescriptionEn") + .IsRequired() + .HasColumnType("text") + .HasColumnName("description_cli_en"); + + b.Property("DescriptionFr") + .HasColumnType("text") + .HasColumnName("description_cli_fr"); + + b.Property("DescriptionIt") + .HasColumnType("text") + .HasColumnName("description_cli_it"); + + b.Property("DescriptionRo") + .HasColumnType("text") + .HasColumnName("description_cli_ro"); + + b.Property("En") + .IsRequired() + .HasColumnType("text") + .HasColumnName("text_cli_en"); + + b.Property("Fr") + .HasColumnType("text") + .HasColumnName("text_cli_fr"); + + b.Property("Geolcode") + .HasColumnType("integer") + .HasColumnName("geolcode"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("default_cli"); + + b.Property("It") + .HasColumnType("text") + .HasColumnName("text_cli_it"); + + b.Property("Order") + .HasColumnType("integer") + .HasColumnName("order_cli"); + + b.Property("Path") + .HasColumnType("ltree") + .HasColumnName("path_cli"); + + b.Property("Ro") + .HasColumnType("text") + .HasColumnName("text_cli_ro"); + + b.Property("Schema") + .HasColumnType("text") + .HasColumnName("schema_cli"); + + b.HasKey("Id"); + + b.ToTable("codelist", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Completion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AbandonDate") + .HasColumnType("date") + .HasColumnName("abandon_date"); + + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("borehole_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("IsPrimary") + .HasColumnType("boolean") + .HasColumnName("is_primary"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("BoreholeId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("KindId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("completion", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Config", b => + { + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name_cfg"); + + b.Property("Value") + .HasColumnType("text") + .HasColumnName("value_cfg"); + + b.HasKey("Name"); + + b.ToTable("config", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Content", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_cnt"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Creation") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_cnt"); + + b.Property("Expired") + .HasColumnType("timestamp with time zone") + .HasColumnName("expired_cnt"); + + b.Property("IsDraft") + .HasColumnType("boolean") + .HasColumnName("draft_cnt"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name_cnt"); + + b.Property("TextDe") + .HasColumnType("text") + .HasColumnName("text_cnt_de"); + + b.Property("TextEn") + .HasColumnType("text") + .HasColumnName("text_cnt_en"); + + b.Property("TextFr") + .HasColumnType("text") + .HasColumnName("text_cnt_fr"); + + b.Property("TextIt") + .HasColumnType("text") + .HasColumnName("text_cnt_it"); + + b.Property("TextRo") + .HasColumnType("text") + .HasColumnName("text_cnt_ro"); + + b.Property("TitelRo") + .HasColumnType("text") + .HasColumnName("title_cnt_ro"); + + b.Property("TitleDe") + .HasColumnType("text") + .HasColumnName("title_cnt_de"); + + b.Property("TitleEn") + .HasColumnType("text") + .HasColumnName("title_cnt_en"); + + b.Property("TitleFr") + .HasColumnType("text") + .HasColumnName("title_cnt_fr"); + + b.Property("TitleIt") + .HasColumnType("text") + .HasColumnName("title_cnt_it"); + + b.HasKey("Id"); + + b.ToTable("contents", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.FaciesDescription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_fac"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("DescriptionQualityId") + .HasColumnType("integer") + .HasColumnName("qt_description_id"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("is_last"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("id_sty_fk"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("DescriptionQualityId"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("facies_description", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Feedback", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_feb"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_feb"); + + b.Property("IsFrw") + .HasColumnType("boolean") + .HasColumnName("frw_feb"); + + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message_feb"); + + b.Property("Tag") + .HasColumnType("text") + .HasColumnName("tag_feb"); + + b.Property("User") + .IsRequired() + .HasColumnType("text") + .HasColumnName("user_feb"); + + b.HasKey("Id"); + + b.ToTable("feedbacks", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.File", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_fil"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("uploaded_fil"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.Property("Hash") + .IsRequired() + .HasColumnType("text") + .HasColumnName("hash_fil"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name_fil"); + + b.Property("NameUuid") + .HasColumnType("text") + .HasColumnName("name_uuid_fil"); + + b.Property("Type") + .IsRequired() + .HasColumnType("text") + .HasColumnName("type_fil"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("updated_fil"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updated_by_fil"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("UpdatedById"); + + b.ToTable("files", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.HydrotestCodelist", b => + { + b.Property("HydrotestId") + .HasColumnType("integer") + .HasColumnName("id_ht_fk"); + + b.Property("CodelistId") + .HasColumnType("integer") + .HasColumnName("id_cli_fk"); + + b.HasKey("HydrotestId", "CodelistId"); + + b.HasIndex("CodelistId"); + + b.ToTable("hydrotest_codelist", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.HydrotestResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("HydrotestId") + .HasColumnType("integer") + .HasColumnName("hydrotest_id"); + + b.Property("MaxValue") + .HasColumnType("double precision") + .HasColumnName("max_value"); + + b.Property("MinValue") + .HasColumnType("double precision") + .HasColumnName("min_value"); + + b.Property("ParameterId") + .HasColumnType("integer") + .HasColumnName("parameter"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.Property("Value") + .HasColumnType("double precision") + .HasColumnName("value"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("HydrotestId"); + + b.HasIndex("ParameterId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("hydrotest_result", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Instrumentation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CasingId") + .HasColumnType("integer") + .HasColumnName("casing_id"); + + b.Property("CompletionId") + .HasColumnType("integer") + .HasColumnName("completion_id"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("from_depth"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes"); + + b.Property("StatusId") + .HasColumnType("integer") + .HasColumnName("status_id"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("to_depth"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CasingId"); + + b.HasIndex("CompletionId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("KindId"); + + b.HasIndex("StatusId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("instrumentation", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Layer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_lay"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AlterationId") + .HasColumnType("integer") + .HasColumnName("alteration_id_cli"); + + b.Property("CohesionId") + .HasColumnType("integer") + .HasColumnName("cohesion_id_cli"); + + b.Property("CompactnessId") + .HasColumnType("integer") + .HasColumnName("compactness_id_cli"); + + b.Property("ConsistanceId") + .HasColumnType("integer") + .HasColumnName("consistance_id_cli"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_lay"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator_lay"); + + b.Property("DescriptionQualityId") + .HasColumnType("integer") + .HasColumnName("qt_description_id_cli"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from_lay"); + + b.Property("GradationId") + .HasColumnType("integer") + .HasColumnName("gradation_id_cli"); + + b.Property("GrainSize1Id") + .HasColumnType("integer") + .HasColumnName("grain_size_1_id_cli"); + + b.Property("GrainSize2Id") + .HasColumnType("integer") + .HasColumnName("grain_size_2_id_cli"); + + b.Property("HumidityId") + .HasColumnType("integer") + .HasColumnName("humidity_id_cli"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("last_lay"); + + b.Property("IsStriae") + .HasColumnType("boolean") + .HasColumnName("striae_lay"); + + b.Property("IsUndefined") + .HasColumnType("boolean") + .HasColumnName("undefined_lay"); + + b.Property("LithologyId") + .HasColumnType("integer") + .HasColumnName("lithology_id_cli"); + + b.Property("LithologyTopBedrockId") + .HasColumnType("integer") + .HasColumnName("lithology_top_bedrock_id_cli"); + + b.Property("LithostratigraphyId") + .HasColumnType("integer") + .HasColumnName("lithostratigraphy_id_cli"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes_lay"); + + b.Property("OriginalLithology") + .HasColumnType("text") + .HasColumnName("original_lithology"); + + b.Property("OriginalUscs") + .HasColumnType("text") + .HasColumnName("uscs_original_lay"); + + b.Property("PlasticityId") + .HasColumnType("integer") + .HasColumnName("plasticity_id_cli"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("id_sty_fk"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to_lay"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update_lay"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater_lay"); + + b.Property("Uscs1Id") + .HasColumnType("integer") + .HasColumnName("uscs_1_id_cli"); + + b.Property("Uscs2Id") + .HasColumnType("integer") + .HasColumnName("uscs_2_id_cli"); + + b.Property("UscsDeterminationId") + .HasColumnType("integer") + .HasColumnName("uscs_determination_id_cli"); + + b.HasKey("Id"); + + b.HasIndex("AlterationId"); + + b.HasIndex("CohesionId"); + + b.HasIndex("CompactnessId"); + + b.HasIndex("ConsistanceId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("DescriptionQualityId"); + + b.HasIndex("GradationId"); + + b.HasIndex("GrainSize1Id"); + + b.HasIndex("GrainSize2Id"); + + b.HasIndex("HumidityId"); + + b.HasIndex("LithologyId"); + + b.HasIndex("LithologyTopBedrockId"); + + b.HasIndex("LithostratigraphyId"); + + b.HasIndex("PlasticityId"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.HasIndex("Uscs1Id"); + + b.HasIndex("Uscs2Id"); + + b.HasIndex("UscsDeterminationId"); + + b.ToTable("layer", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.LayerCodelist", b => + { + b.Property("LayerId") + .HasColumnType("integer") + .HasColumnName("id_lay_fk"); + + b.Property("CodelistId") + .HasColumnType("integer") + .HasColumnName("id_cli_fk"); + + b.Property("SchemaName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("code_cli"); + + b.HasKey("LayerId", "CodelistId"); + + b.HasIndex("CodelistId"); + + b.ToTable("layer_codelist", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.LithologicalDescription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_ldp"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("DescriptionQualityId") + .HasColumnType("integer") + .HasColumnName("qt_description_id"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("is_last"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("id_sty_fk"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("DescriptionQualityId"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("lithological_description", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.LithostratigraphyLayer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("FromDepth") + .HasColumnType("double precision") + .HasColumnName("depth_from"); + + b.Property("IsLast") + .HasColumnType("boolean") + .HasColumnName("is_last"); + + b.Property("LithostratigraphyId") + .HasColumnType("integer") + .HasColumnName("lithostratigraphy_id"); + + b.Property("StratigraphyId") + .HasColumnType("integer") + .HasColumnName("stratigraphy_id"); + + b.Property("ToDepth") + .HasColumnType("double precision") + .HasColumnName("depth_to"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("LithostratigraphyId"); + + b.HasIndex("StratigraphyId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("lithostratigraphy", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Observation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("borehole_id"); + + b.Property("CasingId") + .HasColumnType("integer") + .HasColumnName("casing_id"); + + b.Property("Comment") + .HasColumnType("text") + .HasColumnName("comment"); + + b.Property("CompletionFinished") + .HasColumnType("boolean") + .HasColumnName("completion_finished"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("creator"); + + b.Property("Duration") + .HasColumnType("double precision") + .HasColumnName("duration"); + + b.Property("EndTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("end_time"); + + b.Property("FromDepthM") + .HasColumnType("double precision") + .HasColumnName("from_depth_m"); + + b.Property("FromDepthMasl") + .HasColumnType("double precision") + .HasColumnName("from_depth_masl"); + + b.Property("ReliabilityId") + .HasColumnType("integer") + .HasColumnName("reliability"); + + b.Property("StartTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("start_time"); + + b.Property("ToDepthM") + .HasColumnType("double precision") + .HasColumnName("to_depth_m"); + + b.Property("ToDepthMasl") + .HasColumnType("double precision") + .HasColumnName("to_depth_masl"); + + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("observation_type"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater"); + + b.HasKey("Id"); + + b.HasIndex("BoreholeId"); + + b.HasIndex("CasingId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("ReliabilityId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("observation", "bdms"); + + b.UseTptMappingStrategy(); + }); + + modelBuilder.Entity("BDMS.Models.Stratigraphy", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_sty"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("id_bho_fk"); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_sty"); + + b.Property("CreatedById") + .HasColumnType("integer") + .HasColumnName("author_sty"); + + b.Property("Date") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_sty"); + + b.Property("IsPrimary") + .HasColumnType("boolean") + .HasColumnName("primary_sty"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind_id_cli"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name_sty"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes_sty"); + + b.Property("Updated") + .HasColumnType("timestamp with time zone") + .HasColumnName("update_sty"); + + b.Property("UpdatedById") + .HasColumnType("integer") + .HasColumnName("updater_sty"); + + b.HasKey("Id"); + + b.HasIndex("BoreholeId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("KindId"); + + b.HasIndex("UpdatedById"); + + b.ToTable("stratigraphy", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Term", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_tes"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Creation") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_tes"); + + b.Property("Expiration") + .HasColumnType("timestamp with time zone") + .HasColumnName("expired_tes"); + + b.Property("IsDraft") + .HasColumnType("boolean") + .HasColumnName("draft_tes"); + + b.Property("TextDe") + .HasColumnType("text") + .HasColumnName("text_tes_de"); + + b.Property("TextEn") + .IsRequired() + .HasColumnType("text") + .HasColumnName("text_tes_en"); + + b.Property("TextFr") + .HasColumnType("text") + .HasColumnName("text_tes_fr"); + + b.Property("TextIt") + .HasColumnType("text") + .HasColumnName("text_tes_it"); + + b.Property("TextRo") + .HasColumnType("text") + .HasColumnName("text_tes_ro"); + + b.HasKey("Id"); + + b.ToTable("terms", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_usr"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DisabledAt") + .HasColumnType("timestamp with time zone") + .HasColumnName("disabled_usr"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("firstname"); + + b.Property("IsAdmin") + .HasColumnType("boolean") + .HasColumnName("admin_usr"); + + b.Property("IsViewer") + .HasColumnType("boolean") + .HasColumnName("viewer_usr"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("lastname"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("username"); + + b.Property("SubjectId") + .IsRequired() + .HasColumnType("text") + .HasColumnName("subject_id"); + + b.HasKey("Id"); + + b.ToTable("users", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.UserEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_evs"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_evs"); + + b.Property("Payload") + .HasColumnType("jsonb") + .HasColumnName("payload_evs"); + + b.Property("Topic") + .IsRequired() + .HasColumnType("text") + .HasColumnName("topic_evs"); + + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("events", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.UserWorkgroupRole", b => + { + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.Property("WorkgroupId") + .HasColumnType("integer") + .HasColumnName("id_wgp_fk"); + + b.Property("Role") + .HasColumnType("int") + .HasColumnName("id_rol_fk"); + + b.HasKey("UserId", "WorkgroupId", "Role"); + + b.ToTable("users_roles", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Workflow", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_wkf"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("BoreholeId") + .HasColumnType("integer") + .HasColumnName("id_bho_fk"); + + b.Property("Finished") + .HasColumnType("timestamp with time zone") + .HasColumnName("finished_wkf"); + + b.Property("Notes") + .HasColumnType("text") + .HasColumnName("notes_wkf"); + + b.Property("Role") + .HasColumnType("integer") + .HasColumnName("id_rol_fk"); + + b.Property("Started") + .HasColumnType("timestamp with time zone") + .HasColumnName("started_wkf"); + + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("id_usr_fk"); + + b.HasKey("Id"); + + b.HasIndex("BoreholeId"); + + b.HasIndex("UserId"); + + b.ToTable("workflow", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Workgroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_wgp"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Created") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_wgp"); + + b.Property("Disabled") + .HasColumnType("timestamp with time zone") + .HasColumnName("disabled_wgp"); + + b.Property("IsSupplier") + .HasColumnType("boolean") + .HasColumnName("supplier_wgp"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name_wgp"); + + b.Property("Settings") + .HasColumnType("json") + .HasColumnName("settings_wgp"); + + b.HasKey("Id"); + + b.ToTable("workgroups", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.FieldMeasurement", b => + { + b.HasBaseType("BDMS.Models.Observation"); + + b.Property("ParameterId") + .HasColumnType("integer") + .HasColumnName("parameter"); + + b.Property("SampleTypeId") + .HasColumnType("integer") + .HasColumnName("sample_type"); + + b.Property("Value") + .HasColumnType("double precision") + .HasColumnName("value"); + + b.HasIndex("ParameterId"); + + b.HasIndex("SampleTypeId"); + + b.ToTable("field_measurement", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.GroundwaterLevelMeasurement", b => + { + b.HasBaseType("BDMS.Models.Observation"); + + b.Property("KindId") + .HasColumnType("integer") + .HasColumnName("kind"); + + b.Property("LevelM") + .HasColumnType("double precision") + .HasColumnName("level_m"); + + b.Property("LevelMasl") + .HasColumnType("double precision") + .HasColumnName("level_masl"); + + b.HasIndex("KindId"); + + b.ToTable("groundwater_level_measurement", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Hydrotest", b => + { + b.HasBaseType("BDMS.Models.Observation"); + + b.ToTable("hydrotest", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.WaterIngress", b => + { + b.HasBaseType("BDMS.Models.Observation"); + + b.Property("ConditionsId") + .HasColumnType("integer") + .HasColumnName("conditions"); + + b.Property("QuantityId") + .HasColumnType("integer") + .HasColumnName("quantity"); + + b.HasIndex("ConditionsId"); + + b.HasIndex("QuantityId"); + + b.ToTable("water_ingress", "bdms"); + }); + + modelBuilder.Entity("BDMS.Models.Backfill", b => + { + b.HasOne("BDMS.Models.Completion", "Completion") + .WithMany("Backfills") + .HasForeignKey("CompletionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId"); + + b.HasOne("BDMS.Models.Codelist", "Material") + .WithMany() + .HasForeignKey("MaterialId"); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Completion"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("Material"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Borehole", b => + { + b.HasOne("BDMS.Models.Codelist", "Chronostratigraphy") + .WithMany() + .HasForeignKey("ChronostratigraphyId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Cuttings") + .WithMany() + .HasForeignKey("CuttingsId"); + + b.HasOne("BDMS.Models.Codelist", "DrillingMethod") + .WithMany() + .HasForeignKey("DrillingMethodId"); + + b.HasOne("BDMS.Models.Codelist", "ElevationPrecision") + .WithMany() + .HasForeignKey("ElevationPrecisionId"); + + b.HasOne("BDMS.Models.Codelist", "Hrs") + .WithMany() + .HasForeignKey("HrsId"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId"); + + b.HasOne("BDMS.Models.Codelist", "LithologyTopBedrock") + .WithMany() + .HasForeignKey("LithologyTopBedrockId"); + + b.HasOne("BDMS.Models.Codelist", "Lithostratigraphy") + .WithMany() + .HasForeignKey("LithostratigraphyId"); + + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + .WithMany() + .HasForeignKey("LocationPrecisionId"); + + b.HasOne("BDMS.Models.User", "LockedBy") + .WithMany() + .HasForeignKey("LockedById"); + + b.HasOne("BDMS.Models.Codelist", "Purpose") + .WithMany() + .HasForeignKey("PurposeId"); + + b.HasOne("BDMS.Models.Codelist", "QtDepth") + .WithMany() + .HasForeignKey("QtDepthId"); + + b.HasOne("BDMS.Models.Codelist", "QtInclinationDirection") + .WithMany() + .HasForeignKey("QtInclinationDirectionId"); + + b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") + .WithMany() + .HasForeignKey("QtReferenceElevationId"); + + b.HasOne("BDMS.Models.Codelist", "QtTotalDepthTvd") + .WithMany() + .HasForeignKey("QtTotalDepthTvdId"); + + b.HasOne("BDMS.Models.Codelist", "ReferenceElevationType") + .WithMany() + .HasForeignKey("ReferenceElevationTypeId"); + + b.HasOne("BDMS.Models.Codelist", "Restriction") + .WithMany() + .HasForeignKey("RestrictionId"); + + b.HasOne("BDMS.Models.Codelist", "Status") + .WithMany() + .HasForeignKey("StatusId"); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.HasOne("BDMS.Models.Workgroup", "Workgroup") + .WithMany("Boreholes") + .HasForeignKey("WorkgroupId"); + + b.Navigation("Chronostratigraphy"); + + b.Navigation("CreatedBy"); + + b.Navigation("Cuttings"); + + b.Navigation("DrillingMethod"); + + b.Navigation("ElevationPrecision"); + + b.Navigation("Hrs"); + + b.Navigation("Kind"); + + b.Navigation("LithologyTopBedrock"); + + b.Navigation("Lithostratigraphy"); + + b.Navigation("LocationPrecision"); + + b.Navigation("LockedBy"); + + b.Navigation("Purpose"); + + b.Navigation("QtDepth"); + + b.Navigation("QtInclinationDirection"); + + b.Navigation("QtReferenceElevation"); + + b.Navigation("QtTotalDepthTvd"); + + b.Navigation("ReferenceElevationType"); + + b.Navigation("Restriction"); + + b.Navigation("Status"); + + b.Navigation("UpdatedBy"); + + b.Navigation("Workgroup"); + }); + + modelBuilder.Entity("BDMS.Models.BoreholeCodelist", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("BoreholeCodelists") + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Codelist") + .WithMany("BoreholeCodelists") + .HasForeignKey("CodelistId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Borehole"); + + b.Navigation("Codelist"); + }); + + modelBuilder.Entity("BDMS.Models.BoreholeFile", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("BoreholeFiles") + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.File", "File") + .WithMany("BoreholeFiles") + .HasForeignKey("FileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.HasOne("BDMS.Models.User", "User") + .WithMany() + .HasForeignKey("UserId"); + + b.Navigation("Borehole"); + + b.Navigation("CreatedBy"); + + b.Navigation("File"); + + b.Navigation("UpdatedBy"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("BDMS.Models.Casing", b => + { + b.HasOne("BDMS.Models.Completion", "Completion") + .WithMany("Casings") + .HasForeignKey("CompletionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Material") + .WithMany() + .HasForeignKey("MaterialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Completion"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("Material"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.ChronostratigraphyLayer", b => + { + b.HasOne("BDMS.Models.Codelist", "Chronostratigraphy") + .WithMany() + .HasForeignKey("ChronostratigraphyId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("ChronostratigraphyLayers") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Chronostratigraphy"); + + b.Navigation("CreatedBy"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Completion", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("Completions") + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Borehole"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.FaciesDescription", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "DescriptionQuality") + .WithMany() + .HasForeignKey("DescriptionQualityId"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("FaciesDescriptions") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("DescriptionQuality"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.File", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.HydrotestCodelist", b => + { + b.HasOne("BDMS.Models.Codelist", "Codelist") + .WithMany("HydrotestCodelists") + .HasForeignKey("CodelistId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Hydrotest", "Hydrotest") + .WithMany("HydrotestCodelists") + .HasForeignKey("HydrotestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Codelist"); + + b.Navigation("Hydrotest"); + }); + + modelBuilder.Entity("BDMS.Models.HydrotestResult", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Hydrotest", "Hydrotest") + .WithMany("HydrotestResults") + .HasForeignKey("HydrotestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Parameter") + .WithMany() + .HasForeignKey("ParameterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("Hydrotest"); + + b.Navigation("Parameter"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Instrumentation", b => + { + b.HasOne("BDMS.Models.Casing", "Casing") + .WithMany("Instrumentations") + .HasForeignKey("CasingId"); + + b.HasOne("BDMS.Models.Completion", "Completion") + .WithMany("Instrumentations") + .HasForeignKey("CompletionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId"); + + b.HasOne("BDMS.Models.Codelist", "Status") + .WithMany() + .HasForeignKey("StatusId"); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Casing"); + + b.Navigation("Completion"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("Status"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Layer", b => + { + b.HasOne("BDMS.Models.Codelist", "Alteration") + .WithMany() + .HasForeignKey("AlterationId"); + + b.HasOne("BDMS.Models.Codelist", "Cohesion") + .WithMany() + .HasForeignKey("CohesionId"); + + b.HasOne("BDMS.Models.Codelist", "Compactness") + .WithMany() + .HasForeignKey("CompactnessId"); + + b.HasOne("BDMS.Models.Codelist", "Consistance") + .WithMany() + .HasForeignKey("ConsistanceId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "DescriptionQuality") + .WithMany() + .HasForeignKey("DescriptionQualityId"); + + b.HasOne("BDMS.Models.Codelist", "Gradation") + .WithMany() + .HasForeignKey("GradationId"); + + b.HasOne("BDMS.Models.Codelist", "GrainSize1") + .WithMany() + .HasForeignKey("GrainSize1Id"); + + b.HasOne("BDMS.Models.Codelist", "GrainSize2") + .WithMany() + .HasForeignKey("GrainSize2Id"); + + b.HasOne("BDMS.Models.Codelist", "Humidity") + .WithMany() + .HasForeignKey("HumidityId"); + + b.HasOne("BDMS.Models.Codelist", "Lithology") + .WithMany() + .HasForeignKey("LithologyId"); + + b.HasOne("BDMS.Models.Codelist", "LithologyTopBedrock") + .WithMany() + .HasForeignKey("LithologyTopBedrockId"); + + b.HasOne("BDMS.Models.Codelist", "Lithostratigraphy") + .WithMany() + .HasForeignKey("LithostratigraphyId"); + + b.HasOne("BDMS.Models.Codelist", "Plasticity") + .WithMany() + .HasForeignKey("PlasticityId"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("Layers") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.HasOne("BDMS.Models.Codelist", "Uscs1") + .WithMany() + .HasForeignKey("Uscs1Id"); + + b.HasOne("BDMS.Models.Codelist", "Uscs2") + .WithMany() + .HasForeignKey("Uscs2Id"); + + b.HasOne("BDMS.Models.Codelist", "UscsDetermination") + .WithMany() + .HasForeignKey("UscsDeterminationId"); + + b.Navigation("Alteration"); + + b.Navigation("Cohesion"); + + b.Navigation("Compactness"); + + b.Navigation("Consistance"); + + b.Navigation("CreatedBy"); + + b.Navigation("DescriptionQuality"); + + b.Navigation("Gradation"); + + b.Navigation("GrainSize1"); + + b.Navigation("GrainSize2"); + + b.Navigation("Humidity"); + + b.Navigation("Lithology"); + + b.Navigation("LithologyTopBedrock"); + + b.Navigation("Lithostratigraphy"); + + b.Navigation("Plasticity"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + + b.Navigation("Uscs1"); + + b.Navigation("Uscs2"); + + b.Navigation("UscsDetermination"); + }); + + modelBuilder.Entity("BDMS.Models.LayerCodelist", b => + { + b.HasOne("BDMS.Models.Codelist", "Codelist") + .WithMany("LayerCodelists") + .HasForeignKey("CodelistId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Layer", "Layer") + .WithMany("LayerCodelists") + .HasForeignKey("LayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Codelist"); + + b.Navigation("Layer"); + }); + + modelBuilder.Entity("BDMS.Models.LithologicalDescription", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "DescriptionQuality") + .WithMany() + .HasForeignKey("DescriptionQualityId"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("LithologicalDescriptions") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("DescriptionQuality"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.LithostratigraphyLayer", b => + { + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Lithostratigraphy") + .WithMany() + .HasForeignKey("LithostratigraphyId"); + + b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") + .WithMany("LithostratigraphyLayers") + .HasForeignKey("StratigraphyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("CreatedBy"); + + b.Navigation("Lithostratigraphy"); + + b.Navigation("Stratigraphy"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Observation", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany() + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Casing", "Casing") + .WithMany("Observations") + .HasForeignKey("CasingId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Reliability") + .WithMany() + .HasForeignKey("ReliabilityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Borehole"); + + b.Navigation("Casing"); + + b.Navigation("CreatedBy"); + + b.Navigation("Reliability"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.Stratigraphy", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("Stratigraphies") + .HasForeignKey("BoreholeId"); + + b.HasOne("BDMS.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById"); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "UpdatedBy") + .WithMany() + .HasForeignKey("UpdatedById"); + + b.Navigation("Borehole"); + + b.Navigation("CreatedBy"); + + b.Navigation("Kind"); + + b.Navigation("UpdatedBy"); + }); + + modelBuilder.Entity("BDMS.Models.UserEvent", b => + { + b.HasOne("BDMS.Models.User", "User") + .WithMany("BoringEvents") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("BDMS.Models.UserWorkgroupRole", b => + { + b.HasOne("BDMS.Models.User", null) + .WithMany("WorkgroupRoles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("BDMS.Models.Workflow", b => + { + b.HasOne("BDMS.Models.Borehole", "Borehole") + .WithMany("Workflows") + .HasForeignKey("BoreholeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Borehole"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("BDMS.Models.FieldMeasurement", b => + { + b.HasOne("BDMS.Models.Observation", null) + .WithOne() + .HasForeignKey("BDMS.Models.FieldMeasurement", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Parameter") + .WithMany() + .HasForeignKey("ParameterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "SampleType") + .WithMany() + .HasForeignKey("SampleTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Parameter"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("BDMS.Models.GroundwaterLevelMeasurement", b => + { + b.HasOne("BDMS.Models.Observation", null) + .WithOne() + .HasForeignKey("BDMS.Models.GroundwaterLevelMeasurement", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Kind") + .WithMany() + .HasForeignKey("KindId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Kind"); + }); + + modelBuilder.Entity("BDMS.Models.Hydrotest", b => + { + b.HasOne("BDMS.Models.Observation", null) + .WithOne() + .HasForeignKey("BDMS.Models.Hydrotest", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("BDMS.Models.WaterIngress", b => + { + b.HasOne("BDMS.Models.Codelist", "Conditions") + .WithMany() + .HasForeignKey("ConditionsId"); + + b.HasOne("BDMS.Models.Observation", null) + .WithOne() + .HasForeignKey("BDMS.Models.WaterIngress", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("BDMS.Models.Codelist", "Quantity") + .WithMany() + .HasForeignKey("QuantityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Conditions"); + + b.Navigation("Quantity"); + }); + + modelBuilder.Entity("BDMS.Models.Borehole", b => + { + b.Navigation("BoreholeCodelists"); + + b.Navigation("BoreholeFiles"); + + b.Navigation("Completions"); + + b.Navigation("Stratigraphies"); + + b.Navigation("Workflows"); + }); + + modelBuilder.Entity("BDMS.Models.Casing", b => + { + b.Navigation("Instrumentations"); + + b.Navigation("Observations"); + }); + + modelBuilder.Entity("BDMS.Models.Codelist", b => + { + b.Navigation("BoreholeCodelists"); + + b.Navigation("HydrotestCodelists"); + + b.Navigation("LayerCodelists"); + }); + + modelBuilder.Entity("BDMS.Models.Completion", b => + { + b.Navigation("Backfills"); + + b.Navigation("Casings"); + + b.Navigation("Instrumentations"); + }); + + modelBuilder.Entity("BDMS.Models.File", b => + { + b.Navigation("BoreholeFiles"); + }); + + modelBuilder.Entity("BDMS.Models.Layer", b => + { + b.Navigation("LayerCodelists"); + }); + + modelBuilder.Entity("BDMS.Models.Stratigraphy", b => + { + b.Navigation("ChronostratigraphyLayers"); + + b.Navigation("FaciesDescriptions"); + + b.Navigation("Layers"); + + b.Navigation("LithologicalDescriptions"); + + b.Navigation("LithostratigraphyLayers"); + }); + + modelBuilder.Entity("BDMS.Models.User", b => + { + b.Navigation("BoringEvents"); + + b.Navigation("WorkgroupRoles"); + }); + + modelBuilder.Entity("BDMS.Models.Workgroup", b => + { + b.Navigation("Boreholes"); + }); + + modelBuilder.Entity("BDMS.Models.Hydrotest", b => + { + b.Navigation("HydrotestCodelists"); + + b.Navigation("HydrotestResults"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/api/Migrations/20240214101707_RenameCodelists.cs b/src/api/Migrations/20240214101707_RenameCodelists.cs new file mode 100644 index 000000000..7fb3a948e --- /dev/null +++ b/src/api/Migrations/20240214101707_RenameCodelists.cs @@ -0,0 +1,41 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace BDMS.Migrations; + +/// +public partial class RenameCodelists : Migration +{ + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.Sql(@" + UPDATE bdms.codelist SET schema_cli = 'casing_type' WHERE schema_cli = 'casi200'; + UPDATE bdms.codelist SET schema_cli = 'casing_material' WHERE schema_cli = 'casi201'; + UPDATE bdms.codelist SET schema_cli = 'backfill_type' WHERE schema_cli = 'fill100'; + UPDATE bdms.codelist SET schema_cli = 'backfill_material' WHERE schema_cli = 'fill200'; + UPDATE bdms.codelist SET schema_cli = 'location_precision' WHERE schema_cli = 'qt_location'; + UPDATE bdms.codelist SET schema_cli = 'elevation_precision' WHERE schema_cli = 'qt_elevation'; + UPDATE bdms.codelist SET schema_cli = 'reference_elevation_type' WHERE schema_cli = 'ibor117'; + UPDATE bdms.codelist SET schema_cli = 'instrument_type' WHERE schema_cli = 'inst100'; + UPDATE bdms.codelist SET schema_cli = 'instrument_status' WHERE schema_cli = 'inst101'; + UPDATE bdms.codelist SET schema_cli = 'uscs_type' WHERE schema_cli = 'mcla101'; + UPDATE bdms.codelist SET schema_cli = 'uscs_determination' WHERE schema_cli = 'mcla104'; + UPDATE bdms.codelist SET schema_cli = 'debris' WHERE schema_cli = 'mcla107'; + UPDATE bdms.codelist SET schema_cli = 'plasticity' WHERE schema_cli = 'mlpr101'; + UPDATE bdms.codelist SET schema_cli = 'compactness' WHERE schema_cli = 'mlpr102'; + UPDATE bdms.codelist SET schema_cli = 'consistency' WHERE schema_cli = 'mlpr103'; + UPDATE bdms.codelist SET schema_cli = 'humidity' WHERE schema_cli = 'mlpr105'; + UPDATE bdms.codelist SET schema_cli = 'alteration' WHERE schema_cli = 'mlpr106'; + UPDATE bdms.codelist SET schema_cli = 'organic_components' WHERE schema_cli = 'mlpr108'; + UPDATE bdms.codelist SET schema_cli = 'grain_size' WHERE schema_cli = 'mlpr109'; + UPDATE bdms.codelist SET schema_cli = 'grain_shape' WHERE schema_cli = 'mlpr110'; + UPDATE bdms.codelist SET schema_cli = 'description_quality' WHERE schema_cli = 'qt_description'; + UPDATE bdms.codelist SET schema_cli = 'colour' WHERE schema_cli = 'mlpr112'; + UPDATE bdms.codelist SET schema_cli = 'grain_angularity' WHERE schema_cli = 'mlpr115'; + UPDATE bdms.codelist SET schema_cli = 'cohesion' WHERE schema_cli = 'mlpr116'; + DELETE FROM bdms.codelist WHERE schema_cli = 'casi100'; + DELETE FROM bdms.codelist WHERE schema_cli = 'casi101'; "); + } +} diff --git a/src/api/Migrations/BdmsContextModelSnapshot.cs b/src/api/Migrations/BdmsContextModelSnapshot.cs index 6c1807f7f..fb251c32a 100644 --- a/src/api/Migrations/BdmsContextModelSnapshot.cs +++ b/src/api/Migrations/BdmsContextModelSnapshot.cs @@ -139,6 +139,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("drilling_method_id_cli"); + b.Property("ElevationPrecisionId") + .HasColumnType("integer") + .HasColumnName("qt_elevation_id_cli"); + b.Property("ElevationZ") .HasColumnType("double precision") .HasColumnName("elevation_z_bho"); @@ -179,6 +183,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("lithostrat_id_cli"); + b.Property("LocationPrecisionId") + .HasColumnType("integer") + .HasColumnName("qt_location_id_cli"); + b.Property("LocationX") .HasColumnType("double precision") .HasColumnName("location_x_bho"); @@ -231,18 +239,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_depth_id_cli"); - b.Property("QtElevationId") - .HasColumnType("integer") - .HasColumnName("qt_elevation_id_cli"); - b.Property("QtInclinationDirectionId") .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") - .HasColumnType("integer") - .HasColumnName("qt_location_id_cli"); - b.Property("QtReferenceElevationId") .HasColumnType("integer") .HasColumnName("qt_reference_elevation_id_cli"); @@ -325,6 +325,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("DrillingMethodId"); + b.HasIndex("ElevationPrecisionId"); + b.HasIndex("HrsId"); b.HasIndex("KindId"); @@ -333,18 +335,16 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("LithostratigraphyId"); + b.HasIndex("LocationPrecisionId"); + b.HasIndex("LockedById"); b.HasIndex("PurposeId"); b.HasIndex("QtDepthId"); - b.HasIndex("QtElevationId"); - b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); - b.HasIndex("QtReferenceElevationId"); b.HasIndex("QtTotalDepthTvdId"); @@ -841,6 +841,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("text") .HasColumnName("description"); + b.Property("DescriptionQualityId") + .HasColumnType("integer") + .HasColumnName("qt_description_id"); + b.Property("FromDepth") .HasColumnType("double precision") .HasColumnName("depth_from"); @@ -849,10 +853,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("boolean") .HasColumnName("is_last"); - b.Property("QtDescriptionId") - .HasColumnType("integer") - .HasColumnName("qt_description_id"); - b.Property("StratigraphyId") .HasColumnType("integer") .HasColumnName("id_sty_fk"); @@ -873,7 +873,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("CreatedById"); - b.HasIndex("QtDescriptionId"); + b.HasIndex("DescriptionQualityId"); b.HasIndex("StratigraphyId"); @@ -1152,6 +1152,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("creator_lay"); + b.Property("DescriptionQualityId") + .HasColumnType("integer") + .HasColumnName("qt_description_id_cli"); + b.Property("FromDepth") .HasColumnType("double precision") .HasColumnName("depth_from_lay"); @@ -1212,10 +1216,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("plasticity_id_cli"); - b.Property("QtDescriptionId") - .HasColumnType("integer") - .HasColumnName("qt_description_id_cli"); - b.Property("StratigraphyId") .HasColumnType("integer") .HasColumnName("id_sty_fk"); @@ -1256,6 +1256,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("CreatedById"); + b.HasIndex("DescriptionQualityId"); + b.HasIndex("GradationId"); b.HasIndex("GrainSize1Id"); @@ -1272,8 +1274,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("PlasticityId"); - b.HasIndex("QtDescriptionId"); - b.HasIndex("StratigraphyId"); b.HasIndex("UpdatedById"); @@ -1330,6 +1330,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("text") .HasColumnName("description"); + b.Property("DescriptionQualityId") + .HasColumnType("integer") + .HasColumnName("qt_description_id"); + b.Property("FromDepth") .HasColumnType("double precision") .HasColumnName("depth_from"); @@ -1338,10 +1342,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("boolean") .HasColumnName("is_last"); - b.Property("QtDescriptionId") - .HasColumnType("integer") - .HasColumnName("qt_description_id"); - b.Property("StratigraphyId") .HasColumnType("integer") .HasColumnName("id_sty_fk"); @@ -1362,7 +1362,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("CreatedById"); - b.HasIndex("QtDescriptionId"); + b.HasIndex("DescriptionQualityId"); b.HasIndex("StratigraphyId"); @@ -1930,6 +1930,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("DrillingMethodId"); + b.HasOne("BDMS.Models.Codelist", "ElevationPrecision") + .WithMany() + .HasForeignKey("ElevationPrecisionId"); + b.HasOne("BDMS.Models.Codelist", "Hrs") .WithMany() .HasForeignKey("HrsId"); @@ -1946,6 +1950,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("LithostratigraphyId"); + b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + .WithMany() + .HasForeignKey("LocationPrecisionId"); + b.HasOne("BDMS.Models.User", "LockedBy") .WithMany() .HasForeignKey("LockedById"); @@ -1958,18 +1966,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtDepthId"); - b.HasOne("BDMS.Models.Codelist", "QtElevation") - .WithMany() - .HasForeignKey("QtElevationId"); - b.HasOne("BDMS.Models.Codelist", "QtInclinationDirection") .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") - .WithMany() - .HasForeignKey("LocationPrecisionId"); - b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() .HasForeignKey("QtReferenceElevationId"); @@ -2006,6 +2006,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("DrillingMethod"); + b.Navigation("ElevationPrecision"); + b.Navigation("Hrs"); b.Navigation("Kind"); @@ -2014,18 +2016,16 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("Lithostratigraphy"); + b.Navigation("LocationPrecision"); + b.Navigation("LockedBy"); b.Navigation("Purpose"); b.Navigation("QtDepth"); - b.Navigation("QtElevation"); - b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); - b.Navigation("QtReferenceElevation"); b.Navigation("QtTotalDepthTvd"); @@ -2202,9 +2202,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("CreatedById"); - b.HasOne("BDMS.Models.Codelist", "QtDescription") + b.HasOne("BDMS.Models.Codelist", "DescriptionQuality") .WithMany() - .HasForeignKey("QtDescriptionId"); + .HasForeignKey("DescriptionQualityId"); b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") .WithMany("FaciesDescriptions") @@ -2218,7 +2218,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("CreatedBy"); - b.Navigation("QtDescription"); + b.Navigation("DescriptionQuality"); b.Navigation("Stratigraphy"); @@ -2353,6 +2353,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("CreatedById"); + b.HasOne("BDMS.Models.Codelist", "DescriptionQuality") + .WithMany() + .HasForeignKey("DescriptionQualityId"); + b.HasOne("BDMS.Models.Codelist", "Gradation") .WithMany() .HasForeignKey("GradationId"); @@ -2385,10 +2389,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("PlasticityId"); - b.HasOne("BDMS.Models.Codelist", "QtDescription") - .WithMany() - .HasForeignKey("QtDescriptionId"); - b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") .WithMany("Layers") .HasForeignKey("StratigraphyId") @@ -2421,6 +2421,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("CreatedBy"); + b.Navigation("DescriptionQuality"); + b.Navigation("Gradation"); b.Navigation("GrainSize1"); @@ -2437,8 +2439,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("Plasticity"); - b.Navigation("QtDescription"); - b.Navigation("Stratigraphy"); b.Navigation("UpdatedBy"); @@ -2475,9 +2475,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("CreatedById"); - b.HasOne("BDMS.Models.Codelist", "QtDescription") + b.HasOne("BDMS.Models.Codelist", "DescriptionQuality") .WithMany() - .HasForeignKey("QtDescriptionId"); + .HasForeignKey("DescriptionQualityId"); b.HasOne("BDMS.Models.Stratigraphy", "Stratigraphy") .WithMany("LithologicalDescriptions") @@ -2491,7 +2491,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("CreatedBy"); - b.Navigation("QtDescription"); + b.Navigation("DescriptionQuality"); b.Navigation("Stratigraphy"); diff --git a/tests/Controllers/BackfillControllerTest.cs b/tests/Controllers/BackfillControllerTest.cs index ac5500a34..74421e42f 100644 --- a/tests/Controllers/BackfillControllerTest.cs +++ b/tests/Controllers/BackfillControllerTest.cs @@ -68,7 +68,7 @@ public async Task CreateAsync() { CompletionId = completionId, MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id, - KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id, + KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id, Notes = "ARGONSHIP", FromDepth = 0, ToDepth = 100, @@ -84,7 +84,7 @@ public async Task CreateAsync() Assert.AreEqual(0, backfill.FromDepth); Assert.AreEqual(100, backfill.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id, backfill.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id, backfill.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id, backfill.KindId); } [TestMethod] @@ -94,7 +94,7 @@ public async Task EditAsync() var completionId = backfill.CompletionId; backfill.MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id; - backfill.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id; + backfill.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id; backfill.Notes = "COLLAR"; backfill.FromDepth = 50; backfill.ToDepth = 200; @@ -109,7 +109,7 @@ public async Task EditAsync() Assert.AreEqual(50, backfill.FromDepth); Assert.AreEqual(200, backfill.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillMaterialSchema).Id, backfill.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillKindSchema).Id, backfill.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.BackfillTypeSchema).Id, backfill.KindId); } [TestMethod] diff --git a/tests/Controllers/CasingControllerTest.cs b/tests/Controllers/CasingControllerTest.cs index c3889c4cf..da97b3dea 100644 --- a/tests/Controllers/CasingControllerTest.cs +++ b/tests/Controllers/CasingControllerTest.cs @@ -72,7 +72,7 @@ public async Task CreateAsync() FromDepth = 0, ToDepth = 100, MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id, - KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id, + KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id, DateStart = new DateOnly(2021, 1, 1), DateFinish = new DateOnly(2021, 1, 2), InnerDiameter = 3, @@ -90,7 +90,7 @@ public async Task CreateAsync() Assert.AreEqual(0, casing.FromDepth); Assert.AreEqual(100, casing.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id, casing.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id, casing.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id, casing.KindId); Assert.AreEqual(3, casing.InnerDiameter); Assert.AreEqual(4, casing.OuterDiameter); Assert.AreEqual(new DateOnly(2021, 1, 1), casing.DateStart); @@ -104,7 +104,7 @@ public async Task EditAsync() var completionId = casing.CompletionId; casing.MaterialId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id; - casing.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id; + casing.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id; casing.Notes = "COLLAR"; casing.FromDepth = 50; casing.ToDepth = 200; @@ -119,7 +119,7 @@ public async Task EditAsync() Assert.AreEqual(50, casing.FromDepth); Assert.AreEqual(200, casing.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Id, casing.MaterialId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingKindSchema).Id, casing.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.CasingTypeSchema).Id, casing.KindId); } [TestMethod] diff --git a/tests/Controllers/CodeListControllerTest.cs b/tests/Controllers/CodeListControllerTest.cs index 13c9ee01c..4cf7c6d43 100644 --- a/tests/Controllers/CodeListControllerTest.cs +++ b/tests/Controllers/CodeListControllerTest.cs @@ -33,7 +33,7 @@ public void TestInitialize() public async Task GetAllEntriesAsync() { var codeLists = await controller.GetAsync(); - Assert.AreEqual(2431, codeLists.Count()); + Assert.AreEqual(2416, codeLists.Count()); } [TestMethod] @@ -267,6 +267,6 @@ public async Task GetCsvExport() var expectedHeader = "id_cli,schema_cli,code_cli,text_cli_en,description_cli_en,text_cli_de,description_cli_de,text_cli_fr,description_cli_fr,text_cli_it,description_cli_it,text_cli_ro,description_cli_ro"; Assert.AreEqual(expectedHeader, response.Content.Split('\n')[0]); - Assert.AreEqual(2433, response.Content.Split('\n').Length); + Assert.AreEqual(2418, response.Content.Split('\n').Length); } } From b72cd7dc39758ddb6835b2e93fbe20714780cbc9 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 11:47:42 +0100 Subject: [PATCH 24/36] Fix warning and hotfix Upload test --- src/api/BdmsContextExtensions.cs | 2 +- tests/Controllers/UploadControllerTest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index 545a61445..7ee68024f 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -92,7 +92,7 @@ public static void SeedData(this BdmsContext context) List gradationIds = codelists.Where(c => c.Schema == "gradation").Select(s => s.Id).ToList(); List soilStateIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist List kirostIds = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist - List grainSize1Ids = codelists.Where(c => c.Schema == "grain_size").Select(s => s.Id).ToList(); + List grainSize1Ids = codelists.Where(c => c.Schema == "grain_size").Select(s => s.Id).ToList(); List grainSize2Ids = codelists.Where(c => c.Schema == "uscs_type").Select(s => s.Id).ToList(); // unclear which codelist List referenceElevationTypeIds = codelists.Where(c => c.Schema == "reference_elevation_type").Select(s => s.Id).ToList(); List waterIngressReliabilityIds = codelists.Where(c => c.Schema == HydrogeologySchemas.ObservationReliabilitySchema).Select(s => s.Id).ToList(); diff --git a/tests/Controllers/UploadControllerTest.cs b/tests/Controllers/UploadControllerTest.cs index 6b78a1fa4..441e607a9 100644 --- a/tests/Controllers/UploadControllerTest.cs +++ b/tests/Controllers/UploadControllerTest.cs @@ -110,7 +110,7 @@ public async Task UploadLithologyShouldSaveData() var lithology = stratigraphy.Layers.First(l => l.FromDepth == 0.125); Assert.AreEqual(100, lithology.ToDepth); Assert.AreEqual(false, lithology.IsLast); - Assert.AreEqual(9001, lithology.DescriptionQualityId); + Assert.AreEqual(null, lithology.DescriptionQualityId); Assert.AreEqual(15104448, lithology.LithologyId); Assert.AreEqual(15302034, lithology.LithostratigraphyId); Assert.AreEqual("Granite", lithology.OriginalUscs); From 858dc15f0c24305fb01102282f477de263147159 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 12:20:00 +0100 Subject: [PATCH 25/36] Streamline naming of schema constants --- src/api/BdmsContextExtensions.cs | 2 +- src/api/Models/CompletionSchemas.cs | 2 +- .../src/commons/form/borehole/completion/backfillInput.js | 2 +- .../src/commons/form/borehole/completion/casingInput.js | 2 +- .../form/borehole/completion/completionSchemaConstants.js | 2 +- .../form/borehole/completion/instrumentationInput.js | 2 +- tests/Controllers/InstrumentationControllerTest.cs | 8 ++++---- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/api/BdmsContextExtensions.cs b/src/api/BdmsContextExtensions.cs index 7ee68024f..37a6e8a99 100644 --- a/src/api/BdmsContextExtensions.cs +++ b/src/api/BdmsContextExtensions.cs @@ -75,7 +75,7 @@ public static void SeedData(this BdmsContext context) List qtInclinationDirectionIds = codelists.Where(c => c.Schema == "custom.qt_bore_inc_dir").Select(s => s.Id).ToList(); List chronostratigraphyTopBedrockIds = codelists.Where(c => c.Schema == "custom.chronostratigraphy_top_bedrock").Select(s => s.Id).ToList(); List lithostratigraphyTopBedrockIds = codelists.Where(c => c.Schema == "custom.lithostratigraphy_top_bedrock").Select(s => s.Id).ToList(); - List instrumentKindIds = codelists.Where(c => c.Schema == CompletionSchemas.InstrumentationKindSchema).Select(s => s.Id).ToList(); + List instrumentKindIds = codelists.Where(c => c.Schema == CompletionSchemas.InstrumentationTypeSchema).Select(s => s.Id).ToList(); List instrumentStatusIds = codelists.Where(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Select(s => s.Id).ToList(); List casingKindIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingTypeSchema).Select(s => s.Id).ToList(); List casingMaterialIds = codelists.Where(c => c.Schema == CompletionSchemas.CasingMaterialSchema).Select(s => s.Id).ToList(); diff --git a/src/api/Models/CompletionSchemas.cs b/src/api/Models/CompletionSchemas.cs index 570583636..a194ba57f 100644 --- a/src/api/Models/CompletionSchemas.cs +++ b/src/api/Models/CompletionSchemas.cs @@ -6,7 +6,7 @@ public static class CompletionSchemas { public const string CompletionKindSchema = "completion_kind"; - public const string InstrumentationKindSchema = "instrument_type"; + public const string InstrumentationTypeSchema = "instrument_type"; public const string InstrumentationStatusSchema = "instrument_status"; public const string BackfillTypeSchema = "backfill_type"; public const string BackfillMaterialSchema = "backfill_material"; diff --git a/src/client/src/commons/form/borehole/completion/backfillInput.js b/src/client/src/commons/form/borehole/completion/backfillInput.js index e03ededce..82e321cc2 100644 --- a/src/client/src/commons/form/borehole/completion/backfillInput.js +++ b/src/client/src/commons/form/borehole/completion/backfillInput.js @@ -51,7 +51,7 @@ const BackfillInput = ({ selected={item.kindId} required={true} values={domains?.data - ?.filter(d => d.schema === completionSchemaConstants.backfillKind) + ?.filter(d => d.schema === completionSchemaConstants.backfillType) .sort((a, b) => a.order - b.order) .map(d => ({ key: d.id, diff --git a/src/client/src/commons/form/borehole/completion/casingInput.js b/src/client/src/commons/form/borehole/completion/casingInput.js index 713ac25b5..351e0875c 100644 --- a/src/client/src/commons/form/borehole/completion/casingInput.js +++ b/src/client/src/commons/form/borehole/completion/casingInput.js @@ -57,7 +57,7 @@ const CasingInput = ({ item, setSelected, parentId, addData, updateData }) => { selected={item.kindId} required={true} values={domains?.data - ?.filter(d => d.schema === completionSchemaConstants.casingKind) + ?.filter(d => d.schema === completionSchemaConstants.casingType) .sort((a, b) => a.order - b.order) .map(d => ({ key: d.id, diff --git a/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js b/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js index 8a5d8d8ad..f93faa0ee 100644 --- a/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js +++ b/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js @@ -1,6 +1,6 @@ export const completionSchemaConstants = { completionKind: "completion_kind", - instrumentationKind: "instrument_type", + instrumentationType: "instrument_type", instrumentationStatus: "instrument_status", backfillType: "backfill_type", backfillMaterial: "backfill_material", diff --git a/src/client/src/commons/form/borehole/completion/instrumentationInput.js b/src/client/src/commons/form/borehole/completion/instrumentationInput.js index f57959c7f..6d52bcbfd 100644 --- a/src/client/src/commons/form/borehole/completion/instrumentationInput.js +++ b/src/client/src/commons/form/borehole/completion/instrumentationInput.js @@ -81,7 +81,7 @@ const InstrumentationInput = ({ required={true} values={domains?.data ?.filter( - d => d.schema === completionSchemaConstants.instrumentationKind, + d => d.schema === completionSchemaConstants.instrumentationType, ) .sort((a, b) => a.order - b.order) .map(d => ({ diff --git a/tests/Controllers/InstrumentationControllerTest.cs b/tests/Controllers/InstrumentationControllerTest.cs index 204e22b0b..1660ec148 100644 --- a/tests/Controllers/InstrumentationControllerTest.cs +++ b/tests/Controllers/InstrumentationControllerTest.cs @@ -69,7 +69,7 @@ public async Task CreateAsync() Name = "REDWALK", CompletionId = completionId, StatusId = context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Id, - KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationKindSchema).Id, + KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationTypeSchema).Id, Notes = "ARGONSHIP", FromDepth = 0, ToDepth = 100, @@ -86,7 +86,7 @@ public async Task CreateAsync() Assert.AreEqual(0, instrumentation.FromDepth); Assert.AreEqual(100, instrumentation.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Id, instrumentation.StatusId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationKindSchema).Id, instrumentation.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationTypeSchema).Id, instrumentation.KindId); } [TestMethod] @@ -97,7 +97,7 @@ public async Task EditAsync() instrumentation.Name = "OCTAVEBOOK"; instrumentation.StatusId = context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Id; - instrumentation.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationKindSchema).Id; + instrumentation.KindId = context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationTypeSchema).Id; instrumentation.Notes = "COLLAR"; instrumentation.FromDepth = 50; instrumentation.ToDepth = 200; @@ -113,7 +113,7 @@ public async Task EditAsync() Assert.AreEqual(50, instrumentation.FromDepth); Assert.AreEqual(200, instrumentation.ToDepth); Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationStatusSchema).Id, instrumentation.StatusId); - Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationKindSchema).Id, instrumentation.KindId); + Assert.AreEqual(context.Codelists.First(c => c.Schema == CompletionSchemas.InstrumentationTypeSchema).Id, instrumentation.KindId); } [TestMethod] From fb5b01e40a1eaa1a947befd12dc0d9823b958c0a Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 13:48:53 +0100 Subject: [PATCH 26/36] Fix borehole data reset --- src/client/cypress/e2e/helpers/testHelpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/cypress/e2e/helpers/testHelpers.js b/src/client/cypress/e2e/helpers/testHelpers.js index dbb55958b..11e775530 100644 --- a/src/client/cypress/e2e/helpers/testHelpers.js +++ b/src/client/cypress/e2e/helpers/testHelpers.js @@ -257,7 +257,7 @@ export const loginAndResetState = () => { auth: bearerAuth(token), }).then(response => { response.body.data - .filter(id => id > 1009999) // max id in seed data. + .filter(id => id > 1002999) // max id in seed data. .forEach(id => { deleteBorehole(id); }); From bfacf1b57186b4489e0695b548d382f44523a42a Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 13:49:14 +0100 Subject: [PATCH 27/36] Fix sorting of description quality dropdown --- .../components/descriptionLayers/descriptionInput.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.js b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.js index 7dc5c8545..cbfe3c6ad 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.js +++ b/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.js @@ -119,6 +119,7 @@ const DescriptionInput = props => { {domains?.data ?.filter(d => d.schema === "description_quality") + .sort((a, b) => a.order - b.order) .map(d => ( {d[i18n.language]} ))} From 3e84cc34e0a8303273ea71b2d74378595041fb32 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 14:21:36 +0100 Subject: [PATCH 28/36] Undo wrong test fix from optimize seeding PR --- src/client/cypress/e2e/identifierFilter.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/cypress/e2e/identifierFilter.cy.js b/src/client/cypress/e2e/identifierFilter.cy.js index f70f11378..affc3898b 100644 --- a/src/client/cypress/e2e/identifierFilter.cy.js +++ b/src/client/cypress/e2e/identifierFilter.cy.js @@ -108,7 +108,7 @@ describe("Tests for filtering data by identifier.", () => { .find('[role="option"]') .eq(1) .click({ force: true }); - cy.get("tbody").children().should("have.length", 3); + cy.get("tbody").children().should("have.length", 2); cy.get('[data-cy="borehole-table"] thead .checkbox').click({ force: true }); cy.contains("button", "Bulk editing").click({ force: true }); From 0a514fe46afd849aa44a4cfd1483da38f750d32f Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 14:50:37 +0100 Subject: [PATCH 29/36] Add release notes --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3508991cc..9f062d15c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ - Replaced label for layer description quality. - Reduced number of seeded boreholes for development from 10'000 to 3'000. - Use reusable card components for hydrogeology. +- Renamed various codelists to have more evocative names (e.g.'location_precision' instead of 'qt_location', 'plasticity' instead of 'mlpr101',...) ### Fixed From ec3306b5d68add3ede633ae21dfd181512af28f4 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Wed, 14 Feb 2024 16:08:29 +0100 Subject: [PATCH 30/36] Undo hotfix and fix upload data --- .../data-sets/invalid-lithology/lithology-single-not-valid.csv | 2 +- src/client/cypress/fixtures/import/lithology-single-valid.csv | 2 +- src/client/docs/import.md | 2 +- src/client/src/commons/menu/editor/menuEditorSearch.js | 2 +- tests/Controllers/UploadControllerTest.cs | 2 +- tests/TestData/data_sets/import_litho/litho.csv | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/client/cypress/fixtures/import/data-sets/invalid-lithology/lithology-single-not-valid.csv b/src/client/cypress/fixtures/import/data-sets/invalid-lithology/lithology-single-not-valid.csv index 92786c949..629a807ea 100644 --- a/src/client/cypress/fixtures/import/data-sets/invalid-lithology/lithology-single-not-valid.csv +++ b/src/client/cypress/fixtures/import/data-sets/invalid-lithology/lithology-single-not-valid.csv @@ -1,2 +1,2 @@ -import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;is_last;qt_description_id;lithology_id;lithostratigraphy_id;original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;debris_ids;color_ids; +import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;is_last;description_quality_id;lithology_id;lithostratigraphy_id;original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;debris_ids;color_ids; 123456;1001;2021-08-06 00:36:21.991827+00;Bennett;0.125;;false;9001;15104448;15202034;Granite;23107001;23101005;21101001;23101008;21103008;false;21103003;21101001;21102007;21116005;21105002;21106004;instruction set Dynamic backing up Lock;trace back Peso;23101001,23101004,23101005;21110002,21110005;21115001,21115004;21108002,21108004,21108005;9100,9102;21112001,21112004; diff --git a/src/client/cypress/fixtures/import/lithology-single-valid.csv b/src/client/cypress/fixtures/import/lithology-single-valid.csv index 17d676764..4ddc34728 100644 --- a/src/client/cypress/fixtures/import/lithology-single-valid.csv +++ b/src/client/cypress/fixtures/import/lithology-single-valid.csv @@ -1,2 +1,2 @@ -import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;is_last;qt_description_id;lithology_id;lithostratigraphy_id;original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;debris_ids;color_ids; +import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;is_last;description_quality_id;lithology_id;lithostratigraphy_id;original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;debris_ids;color_ids; 344;1001;2021-08-06 00:36:21.991827+00;Bennett;0.125;100;false;9001;15104448;15202034;Granite;23107001;23101005;21101001;23101008;21103008;false;21103003;21101001;21102007;21116005;21105002;21106004;instruction set Dynamic backing up Lock;trace back Peso;23101001,23101004,23101005;21110002,21110005;21115001,21115004;21108002,21108004,21108005;9100,9102;21112001,21112004; diff --git a/src/client/docs/import.md b/src/client/docs/import.md index 287960376..cc7da72ac 100644 --- a/src/client/docs/import.md +++ b/src/client/docs/import.md @@ -120,7 +120,7 @@ Die zu importierenden Daten müssen gemäss obigen Anforderungen im CSV-Format v | from_depth | Zahl | Ja | Von Tiefe der Schicht | | to_depth | Zahl | Ja | Bis Tiefe der Schicht | | is_last | True/False | Nein | Ist die Schicht die letzte in der Stratigraphie? | -| qt_description_id | ID (Codeliste) | Nein | Qualität der Beschreibung | +| description_quality_id | ID (Codeliste) | Nein | Qualität der Beschreibung | | lithology_id | ID (Codeliste) | Nein | Lithologie | | original_uscs | Text | Nein | USCS Originalklassifikation | | uscs_determination_id | ID (Codeliste) | Nein | USCS Bestimmungsmethode | diff --git a/src/client/src/commons/menu/editor/menuEditorSearch.js b/src/client/src/commons/menu/editor/menuEditorSearch.js index 0d88c8ac6..6ade3e45e 100644 --- a/src/client/src/commons/menu/editor/menuEditorSearch.js +++ b/src/client/src/commons/menu/editor/menuEditorSearch.js @@ -328,7 +328,7 @@ class MenuEditorSearch extends React.Component { {this.ExampleHeadings( "import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;" + - "is_last;qt_description_id;lithology_id;" + + "is_last;description_quality_id;lithology_id;" + "original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;" + "is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;" + "notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;" + diff --git a/tests/Controllers/UploadControllerTest.cs b/tests/Controllers/UploadControllerTest.cs index 441e607a9..6b78a1fa4 100644 --- a/tests/Controllers/UploadControllerTest.cs +++ b/tests/Controllers/UploadControllerTest.cs @@ -110,7 +110,7 @@ public async Task UploadLithologyShouldSaveData() var lithology = stratigraphy.Layers.First(l => l.FromDepth == 0.125); Assert.AreEqual(100, lithology.ToDepth); Assert.AreEqual(false, lithology.IsLast); - Assert.AreEqual(null, lithology.DescriptionQualityId); + Assert.AreEqual(9001, lithology.DescriptionQualityId); Assert.AreEqual(15104448, lithology.LithologyId); Assert.AreEqual(15302034, lithology.LithostratigraphyId); Assert.AreEqual("Granite", lithology.OriginalUscs); diff --git a/tests/TestData/data_sets/import_litho/litho.csv b/tests/TestData/data_sets/import_litho/litho.csv index 7f88faa6b..4b9d84ff3 100644 --- a/tests/TestData/data_sets/import_litho/litho.csv +++ b/tests/TestData/data_sets/import_litho/litho.csv @@ -1,4 +1,4 @@ -import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;is_last;qt_description_id;lithology_id;lithostratigraphy_id;chronostratigraphy_id;original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;debris_ids;color_ids;gradation_id;lithology_top_bedrock_id; +import_id;strati_import_id;strati_date;strati_name;from_depth;to_depth;is_last;description_quality_id;lithology_id;lithostratigraphy_id;chronostratigraphy_id;original_uscs;uscs_determination_id;uscs_1_id;grain_size_1_id;uscs_2_id;grain_size_2_id;is_striae;consistance_id;plasticity_id;compactness_id;cohesion_id;humidity_id;alteration_id;notes;original_lithology;uscs_3_ids;grain_shape_ids;grain_granularity_ids;organic_component_ids;debris_ids;color_ids;gradation_id;lithology_top_bedrock_id; 1;1001;2021-08-06 00:36:21.991827+00;Bennett;0.125;100;false;9001;15104448;15302034;15001069;Granite;23107001;23101005;21101001;23101008;21103008;false;21103003;21101001;21102007;21116005;21105002;21106004;instruction set Dynamic backing up Lock;trace back Peso;23101001,23101004,23101005;21110002,21110005;21115001,21115004;21108002,21108004,21108005;9100,9102;21112001,21112004;30000018;15101001; 1;1001;2021-08-06 00:36:21.991827+00;Bennett;11;12;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1;2001;;;55;55.23;;;;;;;;;;;;;;;;;;;;;;;;;;;;; From 987f35991a65257c54d4e66deb94acfa628392cb Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Thu, 15 Feb 2024 09:01:39 +0100 Subject: [PATCH 31/36] Undo renaming in migrations --- ...20221024141440_AddCasingLayerForeignKey.Designer.cs | 10 +++++----- .../20221104095126_RemoveObsoleteCodes.Designer.cs | 6 +++--- .../20221104125332_AddNewReferenceSystem.Designer.cs | 6 +++--- ...230104130249_RemoveMentionsFromWorkflow.Designer.cs | 6 +++--- .../20230105140944_RemoveImportIds.Designer.cs | 6 +++--- .../20230105162603_RemoveTectonicIds.Designer.cs | 10 +++++----- .../20230105171151_RemoveLayerColums.Designer.cs | 6 +++--- .../20230109123554_AddMissingContraints.Designer.cs | 6 +++--- ...20230109144705_DropStratigraphyCodelist.Designer.cs | 6 +++--- ...0230110161542_AddOriginalLithologyField.Designer.cs | 6 +++--- ...095011_RemoveOldOriginalLithologyFields.Designer.cs | 6 +++--- .../20230111151951_UpdateUSCS3Cardinality.Designer.cs | 6 +++--- ...30116102740_RemoveCantonsMunicipalities.Designer.cs | 6 +++--- .../20230117140814_AddMissingConstraints.Designer.cs | 6 +++--- ...4103843_AddLithologicalDescriptionTable.Designer.cs | 6 +++--- ...0230124145558_AddFaciesDescriptionTable.Designer.cs | 6 +++--- .../20230130112413_UnitiseChangeTracking.Designer.cs | 6 +++--- .../20230130153202_AddMissingIndices.Designer.cs | 6 +++--- ...0203051645_DropObsoleteGeodinFilesTable.Designer.cs | 6 +++--- ...3101538_MakeLayerStratigraphyFKRequired.Designer.cs | 6 +++--- ...24048_UseDedicatedColumnForFileNameUuid.Designer.cs | 6 +++--- ...teLayerLythologicalAndFaciesDescription.Designer.cs | 6 +++--- ...230216105428_RemoveFillCasingConstraint.Designer.cs | 6 +++--- ...230224150732_AddChronostratigraphyTable.Designer.cs | 6 +++--- ...0230224152425_MigrateChronostratigraphy.Designer.cs | 6 +++--- ...230228072239_SetFaciesQtDescriptionNull.Designer.cs | 6 +++--- ...30308072029_MigrateChronostratigraphies.Designer.cs | 6 +++--- ...072618_UpdateChronostratigraphyCodelist.Designer.cs | 10 +++++----- ...17103204_RemoveObsoleteDateFromBorehole.Designer.cs | 10 +++++----- ...0230331101139_ConvertDateOnlyToDateTime.Designer.cs | 10 +++++----- ...0108_AddObservationAndWateringressModel.Designer.cs | 10 +++++----- ...30419131858_AddCodelistsForHydrogeology.Designer.cs | 10 +++++----- .../20230428142353_AddHydrotestModels.Designer.cs | 10 +++++----- .../20230428143532_AddHydrotestCodelists.Designer.cs | 10 +++++----- ...0230504080544_RemoveSchemaFromJoinTable.Designer.cs | 10 +++++----- .../20230508085446_FixAndExtendChronoCodes.Designer.cs | 10 +++++----- ...525_AddGroundwaterLevelMeasurementModel.Designer.cs | 6 +++--- ...AddGroundwaterLevelMeasurementKindCodes.Designer.cs | 10 +++++----- ...206_AddHydrogeologyCodelistTranslations.Designer.cs | 10 +++++----- ...20230515130522_AddFieldMeasurementModel.Designer.cs | 10 +++++----- ...20230516080107_AddFieldMeasurementCodes.Designer.cs | 10 +++++----- ...75056_AddHydrotestParameterTranslations.Designer.cs | 10 +++++----- .../20230522115624_FixAndExtendCodelists.Designer.cs | 10 +++++----- ...523071042_ChangeHydrogeologySchemaNames.Designer.cs | 10 +++++----- .../20230524125115_AllowMultipleTestKinds.Designer.cs | 10 +++++----- .../20230525133104_RemoveUnneededCodelists.Designer.cs | 10 +++++----- ...0230531072620_AddLithostratigraphyTable.Designer.cs | 10 +++++----- ...20230531073101_MigrateLithostratigraphy.Designer.cs | 10 +++++----- ...0230602151701_UpdateLithostratiCodelist.Designer.cs | 10 +++++----- ...84334_RemoveChronostratigraphyFromLayer.Designer.cs | 10 +++++----- ...30606075050_FixLithostratiCodelistPaths.Designer.cs | 10 +++++----- ...52236_RemoveUnusedDescriptionsFromLayer.Designer.cs | 10 +++++----- .../20230607153927_CombineNullLayers.Designer.cs | 10 +++++----- .../20230614140202_AddNationalInterest.Designer.cs | 10 +++++----- .../20231204151555_UpdateAfterMigration.Designer.cs | 10 +++++----- .../20231204153139_AlterQtTopBedrock.Designer.cs | 10 +++++----- .../20231211124901_RemoveCompletnessView.Designer.cs | 10 +++++----- .../20231211135521_AddCompletionCodelists.Designer.cs | 10 +++++----- .../20231211140724_AddCompletionTable.Designer.cs | 10 +++++----- .../20231213062944_AddInstrumentationTable.Designer.cs | 10 +++++----- .../20240109150510_AddUserSubjectId.Designer.cs | 6 +++--- .../20240111060218_AddBackfillTable.Designer.cs | 6 +++--- ...20240115075054_RemoveObsoleteUserFields.Designer.cs | 6 +++--- ...0240117093405_UseDateOnlyForAbandonment.Designer.cs | 6 +++--- .../20240117132514_AddCasingTable.Designer.cs | 6 +++--- .../20240125161511_AddCasingToObservation.Designer.cs | 6 +++--- .../20240126132250_MigrateCompletion.Designer.cs | 6 +++--- ...240126132429_CompletionMigrationCleanUp.Designer.cs | 6 +++--- 68 files changed, 272 insertions(+), 272 deletions(-) diff --git a/src/api/Migrations/20221024141440_AddCasingLayerForeignKey.Designer.cs b/src/api/Migrations/20221024141440_AddCasingLayerForeignKey.Designer.cs index 3128943b8..c48534b7c 100644 --- a/src/api/Migrations/20221024141440_AddCasingLayerForeignKey.Designer.cs +++ b/src/api/Migrations/20221024141440_AddCasingLayerForeignKey.Designer.cs @@ -167,7 +167,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -283,7 +283,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1398,9 +1398,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1476,7 +1476,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20221104095126_RemoveObsoleteCodes.Designer.cs b/src/api/Migrations/20221104095126_RemoveObsoleteCodes.Designer.cs index dbf8e73a4..c3e734ee3 100644 --- a/src/api/Migrations/20221104095126_RemoveObsoleteCodes.Designer.cs +++ b/src/api/Migrations/20221104095126_RemoveObsoleteCodes.Designer.cs @@ -163,7 +163,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1437,7 +1437,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20221104125332_AddNewReferenceSystem.Designer.cs b/src/api/Migrations/20221104125332_AddNewReferenceSystem.Designer.cs index dab23a27c..b2384f10a 100644 --- a/src/api/Migrations/20221104125332_AddNewReferenceSystem.Designer.cs +++ b/src/api/Migrations/20221104125332_AddNewReferenceSystem.Designer.cs @@ -163,7 +163,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1437,7 +1437,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230104130249_RemoveMentionsFromWorkflow.Designer.cs b/src/api/Migrations/20230104130249_RemoveMentionsFromWorkflow.Designer.cs index fd58efc7a..a801d3444 100644 --- a/src/api/Migrations/20230104130249_RemoveMentionsFromWorkflow.Designer.cs +++ b/src/api/Migrations/20230104130249_RemoveMentionsFromWorkflow.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -287,7 +287,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1453,7 +1453,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230105140944_RemoveImportIds.Designer.cs b/src/api/Migrations/20230105140944_RemoveImportIds.Designer.cs index 38da639fd..61b952926 100644 --- a/src/api/Migrations/20230105140944_RemoveImportIds.Designer.cs +++ b/src/api/Migrations/20230105140944_RemoveImportIds.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -283,7 +283,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1441,7 +1441,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230105162603_RemoveTectonicIds.Designer.cs b/src/api/Migrations/20230105162603_RemoveTectonicIds.Designer.cs index ca025dc80..f7b511601 100644 --- a/src/api/Migrations/20230105162603_RemoveTectonicIds.Designer.cs +++ b/src/api/Migrations/20230105162603_RemoveTectonicIds.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1427,9 +1427,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1497,7 +1497,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230105171151_RemoveLayerColums.Designer.cs b/src/api/Migrations/20230105171151_RemoveLayerColums.Designer.cs index 594b1d048..47d96ab6e 100644 --- a/src/api/Migrations/20230105171151_RemoveLayerColums.Designer.cs +++ b/src/api/Migrations/20230105171151_RemoveLayerColums.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1411,7 +1411,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230109123554_AddMissingContraints.Designer.cs b/src/api/Migrations/20230109123554_AddMissingContraints.Designer.cs index bea52bab7..ff5b195cb 100644 --- a/src/api/Migrations/20230109123554_AddMissingContraints.Designer.cs +++ b/src/api/Migrations/20230109123554_AddMissingContraints.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -287,7 +287,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1457,7 +1457,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230109144705_DropStratigraphyCodelist.Designer.cs b/src/api/Migrations/20230109144705_DropStratigraphyCodelist.Designer.cs index 86c934880..6ca8b0361 100644 --- a/src/api/Migrations/20230109144705_DropStratigraphyCodelist.Designer.cs +++ b/src/api/Migrations/20230109144705_DropStratigraphyCodelist.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -287,7 +287,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1453,7 +1453,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230110161542_AddOriginalLithologyField.Designer.cs b/src/api/Migrations/20230110161542_AddOriginalLithologyField.Designer.cs index 710403330..a537a95c9 100644 --- a/src/api/Migrations/20230110161542_AddOriginalLithologyField.Designer.cs +++ b/src/api/Migrations/20230110161542_AddOriginalLithologyField.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1415,7 +1415,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230111095011_RemoveOldOriginalLithologyFields.Designer.cs b/src/api/Migrations/20230111095011_RemoveOldOriginalLithologyFields.Designer.cs index d9efbf038..a1b1edf76 100644 --- a/src/api/Migrations/20230111095011_RemoveOldOriginalLithologyFields.Designer.cs +++ b/src/api/Migrations/20230111095011_RemoveOldOriginalLithologyFields.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1408,7 +1408,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230111151951_UpdateUSCS3Cardinality.Designer.cs b/src/api/Migrations/20230111151951_UpdateUSCS3Cardinality.Designer.cs index 5d652ef33..6da8af803 100644 --- a/src/api/Migrations/20230111151951_UpdateUSCS3Cardinality.Designer.cs +++ b/src/api/Migrations/20230111151951_UpdateUSCS3Cardinality.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1415,7 +1415,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230116102740_RemoveCantonsMunicipalities.Designer.cs b/src/api/Migrations/20230116102740_RemoveCantonsMunicipalities.Designer.cs index b39d4419a..2f4ed3f5f 100644 --- a/src/api/Migrations/20230116102740_RemoveCantonsMunicipalities.Designer.cs +++ b/src/api/Migrations/20230116102740_RemoveCantonsMunicipalities.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1193,7 +1193,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230117140814_AddMissingConstraints.Designer.cs b/src/api/Migrations/20230117140814_AddMissingConstraints.Designer.cs index 21bf2a7c0..92f41f59e 100644 --- a/src/api/Migrations/20230117140814_AddMissingConstraints.Designer.cs +++ b/src/api/Migrations/20230117140814_AddMissingConstraints.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1401,7 +1401,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230124103843_AddLithologicalDescriptionTable.Designer.cs b/src/api/Migrations/20230124103843_AddLithologicalDescriptionTable.Designer.cs index 899ec968e..8fb187ff0 100644 --- a/src/api/Migrations/20230124103843_AddLithologicalDescriptionTable.Designer.cs +++ b/src/api/Migrations/20230124103843_AddLithologicalDescriptionTable.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1277,7 +1277,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230124145558_AddFaciesDescriptionTable.Designer.cs b/src/api/Migrations/20230124145558_AddFaciesDescriptionTable.Designer.cs index 52139ba9b..446a8e2ec 100644 --- a/src/api/Migrations/20230124145558_AddFaciesDescriptionTable.Designer.cs +++ b/src/api/Migrations/20230124145558_AddFaciesDescriptionTable.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1339,7 +1339,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230130112413_UnitiseChangeTracking.Designer.cs b/src/api/Migrations/20230130112413_UnitiseChangeTracking.Designer.cs index 6e9a61782..c4b78c222 100644 --- a/src/api/Migrations/20230130112413_UnitiseChangeTracking.Designer.cs +++ b/src/api/Migrations/20230130112413_UnitiseChangeTracking.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1359,7 +1359,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230130153202_AddMissingIndices.Designer.cs b/src/api/Migrations/20230130153202_AddMissingIndices.Designer.cs index f102ab0f1..672eb08ad 100644 --- a/src/api/Migrations/20230130153202_AddMissingIndices.Designer.cs +++ b/src/api/Migrations/20230130153202_AddMissingIndices.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1355,7 +1355,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230203051645_DropObsoleteGeodinFilesTable.Designer.cs b/src/api/Migrations/20230203051645_DropObsoleteGeodinFilesTable.Designer.cs index bab17c012..c57975053 100644 --- a/src/api/Migrations/20230203051645_DropObsoleteGeodinFilesTable.Designer.cs +++ b/src/api/Migrations/20230203051645_DropObsoleteGeodinFilesTable.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1359,7 +1359,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230203101538_MakeLayerStratigraphyFKRequired.Designer.cs b/src/api/Migrations/20230203101538_MakeLayerStratigraphyFKRequired.Designer.cs index c519c5c93..99bdf566e 100644 --- a/src/api/Migrations/20230203101538_MakeLayerStratigraphyFKRequired.Designer.cs +++ b/src/api/Migrations/20230203101538_MakeLayerStratigraphyFKRequired.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1359,7 +1359,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230203124048_UseDedicatedColumnForFileNameUuid.Designer.cs b/src/api/Migrations/20230203124048_UseDedicatedColumnForFileNameUuid.Designer.cs index f1dd76cf9..84774e8ae 100644 --- a/src/api/Migrations/20230203124048_UseDedicatedColumnForFileNameUuid.Designer.cs +++ b/src/api/Migrations/20230203124048_UseDedicatedColumnForFileNameUuid.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1359,7 +1359,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230203140624_MigrateLayerLythologicalAndFaciesDescription.Designer.cs b/src/api/Migrations/20230203140624_MigrateLayerLythologicalAndFaciesDescription.Designer.cs index bc8ae76cd..95962dac8 100644 --- a/src/api/Migrations/20230203140624_MigrateLayerLythologicalAndFaciesDescription.Designer.cs +++ b/src/api/Migrations/20230203140624_MigrateLayerLythologicalAndFaciesDescription.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1359,7 +1359,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230216105428_RemoveFillCasingConstraint.Designer.cs b/src/api/Migrations/20230216105428_RemoveFillCasingConstraint.Designer.cs index a4c1b8b4e..54dec1b4c 100644 --- a/src/api/Migrations/20230216105428_RemoveFillCasingConstraint.Designer.cs +++ b/src/api/Migrations/20230216105428_RemoveFillCasingConstraint.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1355,7 +1355,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230224150732_AddChronostratigraphyTable.Designer.cs b/src/api/Migrations/20230224150732_AddChronostratigraphyTable.Designer.cs index d768a1dc2..3b85f80f3 100644 --- a/src/api/Migrations/20230224150732_AddChronostratigraphyTable.Designer.cs +++ b/src/api/Migrations/20230224150732_AddChronostratigraphyTable.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1417,7 +1417,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230224152425_MigrateChronostratigraphy.Designer.cs b/src/api/Migrations/20230224152425_MigrateChronostratigraphy.Designer.cs index 6ce38860a..0da8122e2 100644 --- a/src/api/Migrations/20230224152425_MigrateChronostratigraphy.Designer.cs +++ b/src/api/Migrations/20230224152425_MigrateChronostratigraphy.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1417,7 +1417,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230228072239_SetFaciesQtDescriptionNull.Designer.cs b/src/api/Migrations/20230228072239_SetFaciesQtDescriptionNull.Designer.cs index 7d53af9d4..390d0ab03 100644 --- a/src/api/Migrations/20230228072239_SetFaciesQtDescriptionNull.Designer.cs +++ b/src/api/Migrations/20230228072239_SetFaciesQtDescriptionNull.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1359,7 +1359,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230308072029_MigrateChronostratigraphies.Designer.cs b/src/api/Migrations/20230308072029_MigrateChronostratigraphies.Designer.cs index 650164a92..f6b5c03dd 100644 --- a/src/api/Migrations/20230308072029_MigrateChronostratigraphies.Designer.cs +++ b/src/api/Migrations/20230308072029_MigrateChronostratigraphies.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1421,7 +1421,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230308072618_UpdateChronostratigraphyCodelist.Designer.cs b/src/api/Migrations/20230308072618_UpdateChronostratigraphyCodelist.Designer.cs index e3962ac50..5519094b8 100644 --- a/src/api/Migrations/20230308072618_UpdateChronostratigraphyCodelist.Designer.cs +++ b/src/api/Migrations/20230308072618_UpdateChronostratigraphyCodelist.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1419,9 +1419,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1485,7 +1485,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230317103204_RemoveObsoleteDateFromBorehole.Designer.cs b/src/api/Migrations/20230317103204_RemoveObsoleteDateFromBorehole.Designer.cs index 0f4de9fd5..6cefc5306 100644 --- a/src/api/Migrations/20230317103204_RemoveObsoleteDateFromBorehole.Designer.cs +++ b/src/api/Migrations/20230317103204_RemoveObsoleteDateFromBorehole.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1446,9 +1446,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1512,7 +1512,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230331101139_ConvertDateOnlyToDateTime.Designer.cs b/src/api/Migrations/20230331101139_ConvertDateOnlyToDateTime.Designer.cs index a5ef3eb0d..dec808bde 100644 --- a/src/api/Migrations/20230331101139_ConvertDateOnlyToDateTime.Designer.cs +++ b/src/api/Migrations/20230331101139_ConvertDateOnlyToDateTime.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1442,9 +1442,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1508,7 +1508,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230419130108_AddObservationAndWateringressModel.Designer.cs b/src/api/Migrations/20230419130108_AddObservationAndWateringressModel.Designer.cs index fdf1d1c75..e66ce8f27 100644 --- a/src/api/Migrations/20230419130108_AddObservationAndWateringressModel.Designer.cs +++ b/src/api/Migrations/20230419130108_AddObservationAndWateringressModel.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1553,9 +1553,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1619,7 +1619,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230419131858_AddCodelistsForHydrogeology.Designer.cs b/src/api/Migrations/20230419131858_AddCodelistsForHydrogeology.Designer.cs index 21731bdb2..7cf3ccf6c 100644 --- a/src/api/Migrations/20230419131858_AddCodelistsForHydrogeology.Designer.cs +++ b/src/api/Migrations/20230419131858_AddCodelistsForHydrogeology.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1553,9 +1553,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1619,7 +1619,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230428142353_AddHydrotestModels.Designer.cs b/src/api/Migrations/20230428142353_AddHydrotestModels.Designer.cs index a4579a085..919d66a6c 100644 --- a/src/api/Migrations/20230428142353_AddHydrotestModels.Designer.cs +++ b/src/api/Migrations/20230428142353_AddHydrotestModels.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1646,9 +1646,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1712,7 +1712,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230428143532_AddHydrotestCodelists.Designer.cs b/src/api/Migrations/20230428143532_AddHydrotestCodelists.Designer.cs index 3396760c4..de7b0b589 100644 --- a/src/api/Migrations/20230428143532_AddHydrotestCodelists.Designer.cs +++ b/src/api/Migrations/20230428143532_AddHydrotestCodelists.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1646,9 +1646,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1712,7 +1712,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230504080544_RemoveSchemaFromJoinTable.Designer.cs b/src/api/Migrations/20230504080544_RemoveSchemaFromJoinTable.Designer.cs index d9444ccca..29af889a9 100644 --- a/src/api/Migrations/20230504080544_RemoveSchemaFromJoinTable.Designer.cs +++ b/src/api/Migrations/20230504080544_RemoveSchemaFromJoinTable.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1641,9 +1641,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1707,7 +1707,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230508085446_FixAndExtendChronoCodes.Designer.cs b/src/api/Migrations/20230508085446_FixAndExtendChronoCodes.Designer.cs index 132cbe186..7667ccab5 100644 --- a/src/api/Migrations/20230508085446_FixAndExtendChronoCodes.Designer.cs +++ b/src/api/Migrations/20230508085446_FixAndExtendChronoCodes.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1646,9 +1646,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1712,7 +1712,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230511133525_AddGroundwaterLevelMeasurementModel.Designer.cs b/src/api/Migrations/20230511133525_AddGroundwaterLevelMeasurementModel.Designer.cs index c2e823671..a63aa9b75 100644 --- a/src/api/Migrations/20230511133525_AddGroundwaterLevelMeasurementModel.Designer.cs +++ b/src/api/Migrations/20230511133525_AddGroundwaterLevelMeasurementModel.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1669,7 +1669,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20230511133636_AddGroundwaterLevelMeasurementKindCodes.Designer.cs b/src/api/Migrations/20230511133636_AddGroundwaterLevelMeasurementKindCodes.Designer.cs index 08bf00842..ac5654bb9 100644 --- a/src/api/Migrations/20230511133636_AddGroundwaterLevelMeasurementKindCodes.Designer.cs +++ b/src/api/Migrations/20230511133636_AddGroundwaterLevelMeasurementKindCodes.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1667,9 +1667,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1733,7 +1733,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230515092206_AddHydrogeologyCodelistTranslations.Designer.cs b/src/api/Migrations/20230515092206_AddHydrogeologyCodelistTranslations.Designer.cs index ea4197b51..0d12a706a 100644 --- a/src/api/Migrations/20230515092206_AddHydrogeologyCodelistTranslations.Designer.cs +++ b/src/api/Migrations/20230515092206_AddHydrogeologyCodelistTranslations.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1646,9 +1646,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1712,7 +1712,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230515130522_AddFieldMeasurementModel.Designer.cs b/src/api/Migrations/20230515130522_AddFieldMeasurementModel.Designer.cs index 6b03ab0df..02bfcca5b 100644 --- a/src/api/Migrations/20230515130522_AddFieldMeasurementModel.Designer.cs +++ b/src/api/Migrations/20230515130522_AddFieldMeasurementModel.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1690,9 +1690,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1756,7 +1756,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230516080107_AddFieldMeasurementCodes.Designer.cs b/src/api/Migrations/20230516080107_AddFieldMeasurementCodes.Designer.cs index 80d681beb..357ffea58 100644 --- a/src/api/Migrations/20230516080107_AddFieldMeasurementCodes.Designer.cs +++ b/src/api/Migrations/20230516080107_AddFieldMeasurementCodes.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1685,9 +1685,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1751,7 +1751,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230517075056_AddHydrotestParameterTranslations.Designer.cs b/src/api/Migrations/20230517075056_AddHydrotestParameterTranslations.Designer.cs index 622f44571..93affd1aa 100644 --- a/src/api/Migrations/20230517075056_AddHydrotestParameterTranslations.Designer.cs +++ b/src/api/Migrations/20230517075056_AddHydrotestParameterTranslations.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1685,9 +1685,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1751,7 +1751,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230522115624_FixAndExtendCodelists.Designer.cs b/src/api/Migrations/20230522115624_FixAndExtendCodelists.Designer.cs index 328f1f8b6..399ad74e9 100644 --- a/src/api/Migrations/20230522115624_FixAndExtendCodelists.Designer.cs +++ b/src/api/Migrations/20230522115624_FixAndExtendCodelists.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1685,9 +1685,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1751,7 +1751,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230523071042_ChangeHydrogeologySchemaNames.Designer.cs b/src/api/Migrations/20230523071042_ChangeHydrogeologySchemaNames.Designer.cs index a34dee12f..1d16a5171 100644 --- a/src/api/Migrations/20230523071042_ChangeHydrogeologySchemaNames.Designer.cs +++ b/src/api/Migrations/20230523071042_ChangeHydrogeologySchemaNames.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1685,9 +1685,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1751,7 +1751,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230524125115_AllowMultipleTestKinds.Designer.cs b/src/api/Migrations/20230524125115_AllowMultipleTestKinds.Designer.cs index b3a794e2f..12ec95a29 100644 --- a/src/api/Migrations/20230524125115_AllowMultipleTestKinds.Designer.cs +++ b/src/api/Migrations/20230524125115_AllowMultipleTestKinds.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1679,9 +1679,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1745,7 +1745,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230525133104_RemoveUnneededCodelists.Designer.cs b/src/api/Migrations/20230525133104_RemoveUnneededCodelists.Designer.cs index 7b9bee476..990c55072 100644 --- a/src/api/Migrations/20230525133104_RemoveUnneededCodelists.Designer.cs +++ b/src/api/Migrations/20230525133104_RemoveUnneededCodelists.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1685,9 +1685,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1751,7 +1751,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230531072620_AddLithostratigraphyTable.Designer.cs b/src/api/Migrations/20230531072620_AddLithostratigraphyTable.Designer.cs index 1dc3368d0..ea5c75ebd 100644 --- a/src/api/Migrations/20230531072620_AddLithostratigraphyTable.Designer.cs +++ b/src/api/Migrations/20230531072620_AddLithostratigraphyTable.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1743,9 +1743,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1809,7 +1809,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230531073101_MigrateLithostratigraphy.Designer.cs b/src/api/Migrations/20230531073101_MigrateLithostratigraphy.Designer.cs index f3712314a..a1cd4c426 100644 --- a/src/api/Migrations/20230531073101_MigrateLithostratigraphy.Designer.cs +++ b/src/api/Migrations/20230531073101_MigrateLithostratigraphy.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1743,9 +1743,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1809,7 +1809,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230602151701_UpdateLithostratiCodelist.Designer.cs b/src/api/Migrations/20230602151701_UpdateLithostratiCodelist.Designer.cs index 81bdddd6c..29e2d8e15 100644 --- a/src/api/Migrations/20230602151701_UpdateLithostratiCodelist.Designer.cs +++ b/src/api/Migrations/20230602151701_UpdateLithostratiCodelist.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1737,9 +1737,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1803,7 +1803,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230605084334_RemoveChronostratigraphyFromLayer.Designer.cs b/src/api/Migrations/20230605084334_RemoveChronostratigraphyFromLayer.Designer.cs index 7a47b08e5..877ea967a 100644 --- a/src/api/Migrations/20230605084334_RemoveChronostratigraphyFromLayer.Designer.cs +++ b/src/api/Migrations/20230605084334_RemoveChronostratigraphyFromLayer.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1731,9 +1731,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1797,7 +1797,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230606075050_FixLithostratiCodelistPaths.Designer.cs b/src/api/Migrations/20230606075050_FixLithostratiCodelistPaths.Designer.cs index 3bb2190ad..4cdbaed16 100644 --- a/src/api/Migrations/20230606075050_FixLithostratiCodelistPaths.Designer.cs +++ b/src/api/Migrations/20230606075050_FixLithostratiCodelistPaths.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1737,9 +1737,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1803,7 +1803,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230606152236_RemoveUnusedDescriptionsFromLayer.Designer.cs b/src/api/Migrations/20230606152236_RemoveUnusedDescriptionsFromLayer.Designer.cs index c60e0206e..141aba4cf 100644 --- a/src/api/Migrations/20230606152236_RemoveUnusedDescriptionsFromLayer.Designer.cs +++ b/src/api/Migrations/20230606152236_RemoveUnusedDescriptionsFromLayer.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1729,9 +1729,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1795,7 +1795,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230607153927_CombineNullLayers.Designer.cs b/src/api/Migrations/20230607153927_CombineNullLayers.Designer.cs index ca455829c..1efeb9b98 100644 --- a/src/api/Migrations/20230607153927_CombineNullLayers.Designer.cs +++ b/src/api/Migrations/20230607153927_CombineNullLayers.Designer.cs @@ -171,7 +171,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -275,7 +275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1723,9 +1723,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1789,7 +1789,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230614140202_AddNationalInterest.Designer.cs b/src/api/Migrations/20230614140202_AddNationalInterest.Designer.cs index ed3639bcd..19f1fe6df 100644 --- a/src/api/Migrations/20230614140202_AddNationalInterest.Designer.cs +++ b/src/api/Migrations/20230614140202_AddNationalInterest.Designer.cs @@ -175,7 +175,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -279,7 +279,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1727,9 +1727,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1793,7 +1793,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20231204151555_UpdateAfterMigration.Designer.cs b/src/api/Migrations/20231204151555_UpdateAfterMigration.Designer.cs index d09ac28c0..cb0b6f0f4 100644 --- a/src/api/Migrations/20231204151555_UpdateAfterMigration.Designer.cs +++ b/src/api/Migrations/20231204151555_UpdateAfterMigration.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1732,9 +1732,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1798,7 +1798,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20231204153139_AlterQtTopBedrock.Designer.cs b/src/api/Migrations/20231204153139_AlterQtTopBedrock.Designer.cs index 5e944a4c8..bd7dee191 100644 --- a/src/api/Migrations/20231204153139_AlterQtTopBedrock.Designer.cs +++ b/src/api/Migrations/20231204153139_AlterQtTopBedrock.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1728,9 +1728,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1786,7 +1786,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20231211124901_RemoveCompletnessView.Designer.cs b/src/api/Migrations/20231211124901_RemoveCompletnessView.Designer.cs index 754effc45..4753476f1 100644 --- a/src/api/Migrations/20231211124901_RemoveCompletnessView.Designer.cs +++ b/src/api/Migrations/20231211124901_RemoveCompletnessView.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1728,9 +1728,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1786,7 +1786,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20231211135521_AddCompletionCodelists.Designer.cs b/src/api/Migrations/20231211135521_AddCompletionCodelists.Designer.cs index c0a34fdf7..e958aa481 100644 --- a/src/api/Migrations/20231211135521_AddCompletionCodelists.Designer.cs +++ b/src/api/Migrations/20231211135521_AddCompletionCodelists.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1790,9 +1790,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1848,7 +1848,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20231211140724_AddCompletionTable.Designer.cs b/src/api/Migrations/20231211140724_AddCompletionTable.Designer.cs index 2c3ef56de..d2e657053 100644 --- a/src/api/Migrations/20231211140724_AddCompletionTable.Designer.cs +++ b/src/api/Migrations/20231211140724_AddCompletionTable.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1790,9 +1790,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1848,7 +1848,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20231213062944_AddInstrumentationTable.Designer.cs b/src/api/Migrations/20231213062944_AddInstrumentationTable.Designer.cs index 6992c4ea3..c1338ce6d 100644 --- a/src/api/Migrations/20231213062944_AddInstrumentationTable.Designer.cs +++ b/src/api/Migrations/20231213062944_AddInstrumentationTable.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1858,9 +1858,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() @@ -1916,7 +1916,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240109150510_AddUserSubjectId.Designer.cs b/src/api/Migrations/20240109150510_AddUserSubjectId.Designer.cs index 0f8e46e9f..62e16ffc0 100644 --- a/src/api/Migrations/20240109150510_AddUserSubjectId.Designer.cs +++ b/src/api/Migrations/20240109150510_AddUserSubjectId.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1865,7 +1865,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20240111060218_AddBackfillTable.Designer.cs b/src/api/Migrations/20240111060218_AddBackfillTable.Designer.cs index 4555a2ff8..aea7988bf 100644 --- a/src/api/Migrations/20240111060218_AddBackfillTable.Designer.cs +++ b/src/api/Migrations/20240111060218_AddBackfillTable.Designer.cs @@ -242,7 +242,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -346,7 +346,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1959,7 +1959,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20240115075054_RemoveObsoleteUserFields.Designer.cs b/src/api/Migrations/20240115075054_RemoveObsoleteUserFields.Designer.cs index 84c782bc5..aad286f55 100644 --- a/src/api/Migrations/20240115075054_RemoveObsoleteUserFields.Designer.cs +++ b/src/api/Migrations/20240115075054_RemoveObsoleteUserFields.Designer.cs @@ -178,7 +178,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -282,7 +282,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1797,7 +1797,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20240117093405_UseDateOnlyForAbandonment.Designer.cs b/src/api/Migrations/20240117093405_UseDateOnlyForAbandonment.Designer.cs index b76e7eae6..4bfb5d84f 100644 --- a/src/api/Migrations/20240117093405_UseDateOnlyForAbandonment.Designer.cs +++ b/src/api/Migrations/20240117093405_UseDateOnlyForAbandonment.Designer.cs @@ -242,7 +242,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -346,7 +346,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -1969,7 +1969,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20240117132514_AddCasingTable.Designer.cs b/src/api/Migrations/20240117132514_AddCasingTable.Designer.cs index 5feb67c4f..811dd0e2d 100644 --- a/src/api/Migrations/20240117132514_AddCasingTable.Designer.cs +++ b/src/api/Migrations/20240117132514_AddCasingTable.Designer.cs @@ -242,7 +242,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -346,7 +346,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -2055,7 +2055,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20240125161511_AddCasingToObservation.Designer.cs b/src/api/Migrations/20240125161511_AddCasingToObservation.Designer.cs index afe9389d5..b8442f613 100644 --- a/src/api/Migrations/20240125161511_AddCasingToObservation.Designer.cs +++ b/src/api/Migrations/20240125161511_AddCasingToObservation.Designer.cs @@ -242,7 +242,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -346,7 +346,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -2055,7 +2055,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20240126132250_MigrateCompletion.Designer.cs b/src/api/Migrations/20240126132250_MigrateCompletion.Designer.cs index c2b04f33c..7e562b82a 100644 --- a/src/api/Migrations/20240126132250_MigrateCompletion.Designer.cs +++ b/src/api/Migrations/20240126132250_MigrateCompletion.Designer.cs @@ -242,7 +242,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -346,7 +346,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -2055,7 +2055,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() diff --git a/src/api/Migrations/20240126132429_CompletionMigrationCleanUp.Designer.cs b/src/api/Migrations/20240126132429_CompletionMigrationCleanUp.Designer.cs index 356a0a841..ad3dad7ae 100644 --- a/src/api/Migrations/20240126132429_CompletionMigrationCleanUp.Designer.cs +++ b/src/api/Migrations/20240126132429_CompletionMigrationCleanUp.Designer.cs @@ -242,7 +242,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("qt_inclination_direction_id_cli"); - b.Property("LocationPrecisionId") + b.Property("QtLocationId") .HasColumnType("integer") .HasColumnName("qt_location_id_cli"); @@ -346,7 +346,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("QtInclinationDirectionId"); - b.HasIndex("LocationPrecisionId"); + b.HasIndex("QtLocationId"); b.HasIndex("QtReferenceElevationId"); @@ -2055,7 +2055,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasOne("BDMS.Models.Codelist", "LocationPrecision") .WithMany() - .HasForeignKey("LocationPrecisionId"); + .HasForeignKey("QtLocationId"); b.HasOne("BDMS.Models.Codelist", "QtReferenceElevation") .WithMany() From dba605e20df6a9edac27ae5c170cff06c36cc24b Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Thu, 15 Feb 2024 09:15:28 +0100 Subject: [PATCH 32/36] Update CHANGELOG.md Co-authored-by: Daniel Jovanovic --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f062d15c..0f3ea7ab0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ - Replaced label for layer description quality. - Reduced number of seeded boreholes for development from 10'000 to 3'000. - Use reusable card components for hydrogeology. -- Renamed various codelists to have more evocative names (e.g.'location_precision' instead of 'qt_location', 'plasticity' instead of 'mlpr101',...) +- Renamed various codelists to have more evocative names (e.g. `location_precision` instead of `qt_location`, `plasticity` instead of `mlpr101`, …) ### Fixed From add02d1bd45e760043c8fcacb39357e04315eac7 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Thu, 15 Feb 2024 09:23:40 +0100 Subject: [PATCH 33/36] Remove commented and unneeded code --- src/api-legacy/v1/borehole/stratigraphy/layer/patch.py | 8 -------- src/client/src/commons/form/multiple/multipleForm.js | 5 +---- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py index cdcce950f..f9e7454cb 100644 --- a/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py +++ b/src/api-legacy/v1/borehole/stratigraphy/layer/patch.py @@ -229,9 +229,7 @@ async def execute(self, id, field, value, user_id): 'grain_shape', 'grain_granularity', 'uscs_3', - # 'uscs_determination', 'debris', - # 'lithology_top_bedrock' ]: schema = field @@ -251,15 +249,9 @@ async def execute(self, id, field, value, user_id): elif field == 'uscs_3': schema = 'uscs_type' - # elif field == 'uscs_determination': - # schema = 'uscs_determination' - elif field == 'debris': schema = 'debris' - # elif field == 'lithology_top_bedrock': - # schema = 'custom.lithology_top_bedrock' - await self.conn.execute(""" DELETE FROM bdms.layer_codelist WHERE id_lay_fk = $1 diff --git a/src/client/src/commons/form/multiple/multipleForm.js b/src/client/src/commons/form/multiple/multipleForm.js index 8c536d017..591b2fffb 100644 --- a/src/client/src/commons/form/multiple/multipleForm.js +++ b/src/client/src/commons/form/multiple/multipleForm.js @@ -412,10 +412,7 @@ class MultipleForm extends React.Component { this.getDomain("location_precision"), this.getDomain("elevation_precision"), this.getDomain("reference_elevation_qt", "elevation_precision"), - this.getDomain( - "reference_elevation_type", - "reference_elevation_type", - ), + this.getDomain("reference_elevation_type"), ])} {this.getGroup([ this.getDomain("kind"), From 5fee4583ce03f46c84cd19cec376019d6dacf128 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Thu, 15 Feb 2024 10:24:25 +0100 Subject: [PATCH 34/36] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 07bcde127..55f01ff0d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: minio: - image: minio/minio + image: minio/minio:RELEASE.2024-02-13T15-35-11Z restart: unless-stopped environment: MINIO_ROOT_USER: REDSQUIRREL From b207e7d8d16053618e8f814cd8c89a573de30ac0 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Thu, 15 Feb 2024 10:46:02 +0100 Subject: [PATCH 35/36] Undo migrations renaming --- .../Migrations/20221104095126_RemoveObsoleteCodes.Designer.cs | 4 ++-- .../20221104125332_AddNewReferenceSystem.Designer.cs | 4 ++-- .../20230104130249_RemoveMentionsFromWorkflow.Designer.cs | 4 ++-- src/api/Migrations/20230105140944_RemoveImportIds.Designer.cs | 4 ++-- .../Migrations/20230105171151_RemoveLayerColums.Designer.cs | 4 ++-- .../20230109123554_AddMissingContraints.Designer.cs | 4 ++-- .../20230109144705_DropStratigraphyCodelist.Designer.cs | 4 ++-- .../20230110161542_AddOriginalLithologyField.Designer.cs | 4 ++-- ...0230111095011_RemoveOldOriginalLithologyFields.Designer.cs | 4 ++-- .../20230111151951_UpdateUSCS3Cardinality.Designer.cs | 4 ++-- .../20230116102740_RemoveCantonsMunicipalities.Designer.cs | 4 ++-- .../20230117140814_AddMissingConstraints.Designer.cs | 4 ++-- ...20230124103843_AddLithologicalDescriptionTable.Designer.cs | 4 ++-- .../20230124145558_AddFaciesDescriptionTable.Designer.cs | 4 ++-- .../20230130112413_UnitiseChangeTracking.Designer.cs | 4 ++-- .../Migrations/20230130153202_AddMissingIndices.Designer.cs | 4 ++-- .../20230203051645_DropObsoleteGeodinFilesTable.Designer.cs | 4 ++-- ...20230203101538_MakeLayerStratigraphyFKRequired.Designer.cs | 4 ++-- ...230203124048_UseDedicatedColumnForFileNameUuid.Designer.cs | 4 ++-- ...4_MigrateLayerLythologicalAndFaciesDescription.Designer.cs | 4 ++-- .../20230216105428_RemoveFillCasingConstraint.Designer.cs | 4 ++-- .../20230224150732_AddChronostratigraphyTable.Designer.cs | 4 ++-- .../20230224152425_MigrateChronostratigraphy.Designer.cs | 4 ++-- .../20230228072239_SetFaciesQtDescriptionNull.Designer.cs | 4 ++-- .../20230308072029_MigrateChronostratigraphies.Designer.cs | 4 ++-- ...0511133525_AddGroundwaterLevelMeasurementModel.Designer.cs | 4 ++-- .../Migrations/20240109150510_AddUserSubjectId.Designer.cs | 4 ++-- .../Migrations/20240111060218_AddBackfillTable.Designer.cs | 4 ++-- .../20240115075054_RemoveObsoleteUserFields.Designer.cs | 4 ++-- .../20240117093405_UseDateOnlyForAbandonment.Designer.cs | 4 ++-- src/api/Migrations/20240117132514_AddCasingTable.Designer.cs | 4 ++-- .../20240125161511_AddCasingToObservation.Designer.cs | 4 ++-- .../Migrations/20240126132250_MigrateCompletion.Designer.cs | 4 ++-- .../20240126132429_CompletionMigrationCleanUp.Designer.cs | 4 ++-- 34 files changed, 68 insertions(+), 68 deletions(-) diff --git a/src/api/Migrations/20221104095126_RemoveObsoleteCodes.Designer.cs b/src/api/Migrations/20221104095126_RemoveObsoleteCodes.Designer.cs index c3e734ee3..ef77425c6 100644 --- a/src/api/Migrations/20221104095126_RemoveObsoleteCodes.Designer.cs +++ b/src/api/Migrations/20221104095126_RemoveObsoleteCodes.Designer.cs @@ -1435,7 +1435,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1513,7 +1513,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20221104125332_AddNewReferenceSystem.Designer.cs b/src/api/Migrations/20221104125332_AddNewReferenceSystem.Designer.cs index b2384f10a..511de38d4 100644 --- a/src/api/Migrations/20221104125332_AddNewReferenceSystem.Designer.cs +++ b/src/api/Migrations/20221104125332_AddNewReferenceSystem.Designer.cs @@ -1435,7 +1435,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1513,7 +1513,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230104130249_RemoveMentionsFromWorkflow.Designer.cs b/src/api/Migrations/20230104130249_RemoveMentionsFromWorkflow.Designer.cs index a801d3444..33ec57d40 100644 --- a/src/api/Migrations/20230104130249_RemoveMentionsFromWorkflow.Designer.cs +++ b/src/api/Migrations/20230104130249_RemoveMentionsFromWorkflow.Designer.cs @@ -1451,7 +1451,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1525,7 +1525,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230105140944_RemoveImportIds.Designer.cs b/src/api/Migrations/20230105140944_RemoveImportIds.Designer.cs index 61b952926..3667b7a9c 100644 --- a/src/api/Migrations/20230105140944_RemoveImportIds.Designer.cs +++ b/src/api/Migrations/20230105140944_RemoveImportIds.Designer.cs @@ -1439,7 +1439,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1513,7 +1513,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230105171151_RemoveLayerColums.Designer.cs b/src/api/Migrations/20230105171151_RemoveLayerColums.Designer.cs index 47d96ab6e..5babd6786 100644 --- a/src/api/Migrations/20230105171151_RemoveLayerColums.Designer.cs +++ b/src/api/Migrations/20230105171151_RemoveLayerColums.Designer.cs @@ -1409,7 +1409,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1479,7 +1479,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230109123554_AddMissingContraints.Designer.cs b/src/api/Migrations/20230109123554_AddMissingContraints.Designer.cs index ff5b195cb..74eb8f4a4 100644 --- a/src/api/Migrations/20230109123554_AddMissingContraints.Designer.cs +++ b/src/api/Migrations/20230109123554_AddMissingContraints.Designer.cs @@ -1455,7 +1455,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1529,7 +1529,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230109144705_DropStratigraphyCodelist.Designer.cs b/src/api/Migrations/20230109144705_DropStratigraphyCodelist.Designer.cs index 6ca8b0361..d23ed71f5 100644 --- a/src/api/Migrations/20230109144705_DropStratigraphyCodelist.Designer.cs +++ b/src/api/Migrations/20230109144705_DropStratigraphyCodelist.Designer.cs @@ -1451,7 +1451,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1525,7 +1525,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230110161542_AddOriginalLithologyField.Designer.cs b/src/api/Migrations/20230110161542_AddOriginalLithologyField.Designer.cs index a537a95c9..1261da493 100644 --- a/src/api/Migrations/20230110161542_AddOriginalLithologyField.Designer.cs +++ b/src/api/Migrations/20230110161542_AddOriginalLithologyField.Designer.cs @@ -1413,7 +1413,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1483,7 +1483,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230111095011_RemoveOldOriginalLithologyFields.Designer.cs b/src/api/Migrations/20230111095011_RemoveOldOriginalLithologyFields.Designer.cs index a1b1edf76..2c8297ffc 100644 --- a/src/api/Migrations/20230111095011_RemoveOldOriginalLithologyFields.Designer.cs +++ b/src/api/Migrations/20230111095011_RemoveOldOriginalLithologyFields.Designer.cs @@ -1406,7 +1406,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1476,7 +1476,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230111151951_UpdateUSCS3Cardinality.Designer.cs b/src/api/Migrations/20230111151951_UpdateUSCS3Cardinality.Designer.cs index 6da8af803..82b164c97 100644 --- a/src/api/Migrations/20230111151951_UpdateUSCS3Cardinality.Designer.cs +++ b/src/api/Migrations/20230111151951_UpdateUSCS3Cardinality.Designer.cs @@ -1413,7 +1413,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1483,7 +1483,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230116102740_RemoveCantonsMunicipalities.Designer.cs b/src/api/Migrations/20230116102740_RemoveCantonsMunicipalities.Designer.cs index 2f4ed3f5f..f43c6a8c9 100644 --- a/src/api/Migrations/20230116102740_RemoveCantonsMunicipalities.Designer.cs +++ b/src/api/Migrations/20230116102740_RemoveCantonsMunicipalities.Designer.cs @@ -1191,7 +1191,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1257,7 +1257,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230117140814_AddMissingConstraints.Designer.cs b/src/api/Migrations/20230117140814_AddMissingConstraints.Designer.cs index 92f41f59e..23ac9492d 100644 --- a/src/api/Migrations/20230117140814_AddMissingConstraints.Designer.cs +++ b/src/api/Migrations/20230117140814_AddMissingConstraints.Designer.cs @@ -1399,7 +1399,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1469,7 +1469,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230124103843_AddLithologicalDescriptionTable.Designer.cs b/src/api/Migrations/20230124103843_AddLithologicalDescriptionTable.Designer.cs index 8fb187ff0..af3337edf 100644 --- a/src/api/Migrations/20230124103843_AddLithologicalDescriptionTable.Designer.cs +++ b/src/api/Migrations/20230124103843_AddLithologicalDescriptionTable.Designer.cs @@ -1275,7 +1275,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1341,7 +1341,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230124145558_AddFaciesDescriptionTable.Designer.cs b/src/api/Migrations/20230124145558_AddFaciesDescriptionTable.Designer.cs index 446a8e2ec..7da39a4c8 100644 --- a/src/api/Migrations/20230124145558_AddFaciesDescriptionTable.Designer.cs +++ b/src/api/Migrations/20230124145558_AddFaciesDescriptionTable.Designer.cs @@ -1337,7 +1337,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1403,7 +1403,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230130112413_UnitiseChangeTracking.Designer.cs b/src/api/Migrations/20230130112413_UnitiseChangeTracking.Designer.cs index c4b78c222..84ac17349 100644 --- a/src/api/Migrations/20230130112413_UnitiseChangeTracking.Designer.cs +++ b/src/api/Migrations/20230130112413_UnitiseChangeTracking.Designer.cs @@ -1357,7 +1357,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1423,7 +1423,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230130153202_AddMissingIndices.Designer.cs b/src/api/Migrations/20230130153202_AddMissingIndices.Designer.cs index 672eb08ad..45f64786d 100644 --- a/src/api/Migrations/20230130153202_AddMissingIndices.Designer.cs +++ b/src/api/Migrations/20230130153202_AddMissingIndices.Designer.cs @@ -1353,7 +1353,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1419,7 +1419,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230203051645_DropObsoleteGeodinFilesTable.Designer.cs b/src/api/Migrations/20230203051645_DropObsoleteGeodinFilesTable.Designer.cs index c57975053..e887cbe6b 100644 --- a/src/api/Migrations/20230203051645_DropObsoleteGeodinFilesTable.Designer.cs +++ b/src/api/Migrations/20230203051645_DropObsoleteGeodinFilesTable.Designer.cs @@ -1357,7 +1357,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1423,7 +1423,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230203101538_MakeLayerStratigraphyFKRequired.Designer.cs b/src/api/Migrations/20230203101538_MakeLayerStratigraphyFKRequired.Designer.cs index 99bdf566e..76602d0b3 100644 --- a/src/api/Migrations/20230203101538_MakeLayerStratigraphyFKRequired.Designer.cs +++ b/src/api/Migrations/20230203101538_MakeLayerStratigraphyFKRequired.Designer.cs @@ -1357,7 +1357,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1423,7 +1423,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230203124048_UseDedicatedColumnForFileNameUuid.Designer.cs b/src/api/Migrations/20230203124048_UseDedicatedColumnForFileNameUuid.Designer.cs index 84774e8ae..46d3d75c1 100644 --- a/src/api/Migrations/20230203124048_UseDedicatedColumnForFileNameUuid.Designer.cs +++ b/src/api/Migrations/20230203124048_UseDedicatedColumnForFileNameUuid.Designer.cs @@ -1357,7 +1357,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1423,7 +1423,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230203140624_MigrateLayerLythologicalAndFaciesDescription.Designer.cs b/src/api/Migrations/20230203140624_MigrateLayerLythologicalAndFaciesDescription.Designer.cs index 95962dac8..71a7395c1 100644 --- a/src/api/Migrations/20230203140624_MigrateLayerLythologicalAndFaciesDescription.Designer.cs +++ b/src/api/Migrations/20230203140624_MigrateLayerLythologicalAndFaciesDescription.Designer.cs @@ -1357,7 +1357,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1423,7 +1423,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230216105428_RemoveFillCasingConstraint.Designer.cs b/src/api/Migrations/20230216105428_RemoveFillCasingConstraint.Designer.cs index 54dec1b4c..aa4ed9586 100644 --- a/src/api/Migrations/20230216105428_RemoveFillCasingConstraint.Designer.cs +++ b/src/api/Migrations/20230216105428_RemoveFillCasingConstraint.Designer.cs @@ -1353,7 +1353,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1419,7 +1419,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230224150732_AddChronostratigraphyTable.Designer.cs b/src/api/Migrations/20230224150732_AddChronostratigraphyTable.Designer.cs index 3b85f80f3..ee6264b9c 100644 --- a/src/api/Migrations/20230224150732_AddChronostratigraphyTable.Designer.cs +++ b/src/api/Migrations/20230224150732_AddChronostratigraphyTable.Designer.cs @@ -1415,7 +1415,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1481,7 +1481,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230224152425_MigrateChronostratigraphy.Designer.cs b/src/api/Migrations/20230224152425_MigrateChronostratigraphy.Designer.cs index 0da8122e2..78053b4a7 100644 --- a/src/api/Migrations/20230224152425_MigrateChronostratigraphy.Designer.cs +++ b/src/api/Migrations/20230224152425_MigrateChronostratigraphy.Designer.cs @@ -1415,7 +1415,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1481,7 +1481,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230228072239_SetFaciesQtDescriptionNull.Designer.cs b/src/api/Migrations/20230228072239_SetFaciesQtDescriptionNull.Designer.cs index 390d0ab03..bb96f6765 100644 --- a/src/api/Migrations/20230228072239_SetFaciesQtDescriptionNull.Designer.cs +++ b/src/api/Migrations/20230228072239_SetFaciesQtDescriptionNull.Designer.cs @@ -1357,7 +1357,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1423,7 +1423,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230308072029_MigrateChronostratigraphies.Designer.cs b/src/api/Migrations/20230308072029_MigrateChronostratigraphies.Designer.cs index f6b5c03dd..6af09ad2f 100644 --- a/src/api/Migrations/20230308072029_MigrateChronostratigraphies.Designer.cs +++ b/src/api/Migrations/20230308072029_MigrateChronostratigraphies.Designer.cs @@ -1419,7 +1419,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1485,7 +1485,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20230511133525_AddGroundwaterLevelMeasurementModel.Designer.cs b/src/api/Migrations/20230511133525_AddGroundwaterLevelMeasurementModel.Designer.cs index a63aa9b75..8acd8fad0 100644 --- a/src/api/Migrations/20230511133525_AddGroundwaterLevelMeasurementModel.Designer.cs +++ b/src/api/Migrations/20230511133525_AddGroundwaterLevelMeasurementModel.Designer.cs @@ -1667,7 +1667,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1733,7 +1733,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240109150510_AddUserSubjectId.Designer.cs b/src/api/Migrations/20240109150510_AddUserSubjectId.Designer.cs index 62e16ffc0..7a5ec9f5f 100644 --- a/src/api/Migrations/20240109150510_AddUserSubjectId.Designer.cs +++ b/src/api/Migrations/20240109150510_AddUserSubjectId.Designer.cs @@ -1863,7 +1863,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1921,7 +1921,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240111060218_AddBackfillTable.Designer.cs b/src/api/Migrations/20240111060218_AddBackfillTable.Designer.cs index aea7988bf..df0441e45 100644 --- a/src/api/Migrations/20240111060218_AddBackfillTable.Designer.cs +++ b/src/api/Migrations/20240111060218_AddBackfillTable.Designer.cs @@ -1957,7 +1957,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -2015,7 +2015,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240115075054_RemoveObsoleteUserFields.Designer.cs b/src/api/Migrations/20240115075054_RemoveObsoleteUserFields.Designer.cs index aad286f55..596224b62 100644 --- a/src/api/Migrations/20240115075054_RemoveObsoleteUserFields.Designer.cs +++ b/src/api/Migrations/20240115075054_RemoveObsoleteUserFields.Designer.cs @@ -1795,7 +1795,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -1853,7 +1853,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240117093405_UseDateOnlyForAbandonment.Designer.cs b/src/api/Migrations/20240117093405_UseDateOnlyForAbandonment.Designer.cs index 4bfb5d84f..7b56302cf 100644 --- a/src/api/Migrations/20240117093405_UseDateOnlyForAbandonment.Designer.cs +++ b/src/api/Migrations/20240117093405_UseDateOnlyForAbandonment.Designer.cs @@ -1967,7 +1967,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -2025,7 +2025,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240117132514_AddCasingTable.Designer.cs b/src/api/Migrations/20240117132514_AddCasingTable.Designer.cs index 811dd0e2d..09fc05a9f 100644 --- a/src/api/Migrations/20240117132514_AddCasingTable.Designer.cs +++ b/src/api/Migrations/20240117132514_AddCasingTable.Designer.cs @@ -2053,7 +2053,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -2111,7 +2111,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240125161511_AddCasingToObservation.Designer.cs b/src/api/Migrations/20240125161511_AddCasingToObservation.Designer.cs index b8442f613..e43895b7d 100644 --- a/src/api/Migrations/20240125161511_AddCasingToObservation.Designer.cs +++ b/src/api/Migrations/20240125161511_AddCasingToObservation.Designer.cs @@ -2053,7 +2053,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -2111,7 +2111,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240126132250_MigrateCompletion.Designer.cs b/src/api/Migrations/20240126132250_MigrateCompletion.Designer.cs index 7e562b82a..20b8dfe7b 100644 --- a/src/api/Migrations/20240126132250_MigrateCompletion.Designer.cs +++ b/src/api/Migrations/20240126132250_MigrateCompletion.Designer.cs @@ -2053,7 +2053,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -2111,7 +2111,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); diff --git a/src/api/Migrations/20240126132429_CompletionMigrationCleanUp.Designer.cs b/src/api/Migrations/20240126132429_CompletionMigrationCleanUp.Designer.cs index ad3dad7ae..10b7eaf5c 100644 --- a/src/api/Migrations/20240126132429_CompletionMigrationCleanUp.Designer.cs +++ b/src/api/Migrations/20240126132429_CompletionMigrationCleanUp.Designer.cs @@ -2053,7 +2053,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .WithMany() .HasForeignKey("QtInclinationDirectionId"); - b.HasOne("BDMS.Models.Codelist", "LocationPrecision") + b.HasOne("BDMS.Models.Codelist", "QtLocation") .WithMany() .HasForeignKey("QtLocationId"); @@ -2111,7 +2111,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("QtInclinationDirection"); - b.Navigation("LocationPrecision"); + b.Navigation("QtLocation"); b.Navigation("QtReferenceElevation"); From 2d5745231b0ab9269b9b56a23e0b9769a9ffa9f8 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Thu, 15 Feb 2024 11:35:39 +0100 Subject: [PATCH 36/36] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 59f1e0707..b28464b05 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: minio: - image: minio/minio:RELEASE.2024-02-13T15-35-11Z + image: minio/minio restart: unless-stopped environment: MINIO_ROOT_USER: REDSQUIRREL