From e649bbc7eed0b49d387b33d2c23426f38a445a1f Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Wed, 15 Jan 2025 14:13:04 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20Mettre=20=C3=A0=20disposition=20les=20d?= =?UTF-8?q?onn=C3=A9es=20SAFRAN=20pour=202024.=20refs=20siclima#10552?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/migration.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sql/migration.sql b/sql/migration.sql index bb8dc99e..8cda3fc5 100644 --- a/sql/migration.sql +++ b/sql/migration.sql @@ -315,6 +315,18 @@ BEGIN END $BODY$; +-- +-- SAFRAN 2024. +-- +CREATE OR REPLACE FUNCTION upgrade20250115() RETURNS boolean AS $BODY$ +BEGIN + INSERT INTO co2concentration (climaticscenario, year, co2value) SELECT id, '2024', 424.61 FROM climaticscenario WHERE name='SAFRAN'; + UPDATE climaticscenario SET enddate='2024-12-31' WHERE name='SAFRAN'; + RETURN true; +END +$BODY$ +language plpgsql; + -- -- Keep this call at the end to apply migration functions. -- -- GitLab