MemberDataSheet: Show area com buckets of current year (regardless of season)

This commit is contained in:
lorenz.stechauner committed 2024-02-21 15:10:27 +01:00
1 parent 99ca12b276
commit 8732141e6b
5 files changed
+26 -14

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
-- schema version 16 to 17
CREATE VIEW v_virtual_season AS
SELECT year, max_kg_per_ha
FROM season
UNION
SELECT strftime('%Y', date()) + 0, (SELECT max_kg_per_ha FROM season ORDER BY year DESC LIMIT 1);
PRAGMA writable_schema = ON;
UPDATE sqlite_schema SET sql = REPLACE(sql, 'season s', 'v_virtual_season s')
WHERE type = 'view' AND name = 'v_area_commitment_bucket_strict';
PRAGMA writable_schema = OFF;