From c6652b68c8b6e6bdf9cd3852b4c3c53516197ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20L=C3=BCthi?= Date: Tue, 7 Jan 2025 11:13:44 +0100 Subject: [PATCH] Set default values for EvaluateComment, -Partial, -PrecursorDelivery to Required --- ...090507_EnableOptionalDeliveryAttributes.cs | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/Geopilot.Api/Migrations/20250107090507_EnableOptionalDeliveryAttributes.cs b/src/Geopilot.Api/Migrations/20250107090507_EnableOptionalDeliveryAttributes.cs index 99d83b5..1a59166 100644 --- a/src/Geopilot.Api/Migrations/20250107090507_EnableOptionalDeliveryAttributes.cs +++ b/src/Geopilot.Api/Migrations/20250107090507_EnableOptionalDeliveryAttributes.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Geopilot.Api.Models; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable @@ -84,6 +85,28 @@ protected override void Up(MigrationBuilder migrationBuilder) column: "MandateId", principalTable: "Mandates", principalColumn: "Id"); + + migrationBuilder.UpdateData( + table: "Mandates", + keyColumn: "Id", + keyValue: null, + column: "EvaluateComment", + value: FieldEvaluationType.Required.ToString()); + + migrationBuilder.UpdateData( + table: "Mandates", + keyColumn: "Id", + keyValue: null, + column: "EvaluatePartial", + value: FieldEvaluationType.Required.ToString()); + + migrationBuilder.UpdateData( + table: "Mandates", + keyColumn: "Id", + keyValue: null, + column: "EvaluatePrecursorDelivery", + value: FieldEvaluationType.Required.ToString()); + } ///