From 658c10c2a42149017831858fe6b78c53b60e20d3 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Sat, 14 Oct 2023 23:56:41 +0200 Subject: [PATCH] WineAttr: Add fill_lower_bins --- Elwig/Helpers/AppDbUpdater.cs | 2 ++ Elwig/Models/WineAttr.cs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Elwig/Helpers/AppDbUpdater.cs b/Elwig/Helpers/AppDbUpdater.cs index 6522024..1c88727 100644 --- a/Elwig/Helpers/AppDbUpdater.cs +++ b/Elwig/Helpers/AppDbUpdater.cs @@ -184,6 +184,8 @@ namespace Elwig.Helpers { GROUP BY year, mgnr, bin ORDER BY year, mgnr, LENGTH(bin) DESC, bin; """); + + ExecuteNonQuery(cnx, "ALTER TABLE wine_attribute ADD COLUMN fill_lower_bins INTEGER NOT NULL CHECK (fill_lower_bins IN (TRUE, FALSE))"); } } } diff --git a/Elwig/Models/WineAttr.cs b/Elwig/Models/WineAttr.cs index 7074ca0..6c8ff68 100644 --- a/Elwig/Models/WineAttr.cs +++ b/Elwig/Models/WineAttr.cs @@ -13,6 +13,9 @@ namespace Elwig.Models { [Column("max_kg_per_ha")] public int? MaxKgPerHa { get; set; } + [Column("fill_lower_bins")] + public bool FillLowerBins { get; set; } + [Column("active")] public bool IsActive { get; set; } public override string ToString() {