From d86d4ae219f4257f946f6cdcb9f80ec02ff3d620 Mon Sep 17 00:00:00 2001 From: TheoLechemia Date: Thu, 4 Feb 2021 14:55:28 +0100 Subject: [PATCH] Drop default value for id_nomenclature_sensitivity and id_nomenclature_diffusion_level --- data/core/synthese.sql | 2 +- data/migrations/2.5.5to2.6.0.sql | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/data/core/synthese.sql b/data/core/synthese.sql index 7f89379a13..e77b8da5c8 100644 --- a/data/core/synthese.sql +++ b/data/core/synthese.sql @@ -113,7 +113,7 @@ CREATE TABLE synthese ( id_nomenclature_naturalness integer DEFAULT get_default_nomenclature_value('NATURALITE'), id_nomenclature_exist_proof integer DEFAULT get_default_nomenclature_value('PREUVE_EXIST'), id_nomenclature_valid_status integer DEFAULT get_default_nomenclature_value('STATUT_VALID'), - id_nomenclature_diffusion_level integer DEFAULT get_default_nomenclature_value('NIV_PRECIS'), + id_nomenclature_diffusion_level integer, id_nomenclature_life_stage integer DEFAULT get_default_nomenclature_value('STADE_VIE'), id_nomenclature_sex integer DEFAULT get_default_nomenclature_value('SEXE'), id_nomenclature_obj_count integer DEFAULT get_default_nomenclature_value('OBJ_DENBR'), diff --git a/data/migrations/2.5.5to2.6.0.sql b/data/migrations/2.5.5to2.6.0.sql index 6d21c3cb3f..cd6b8132a8 100644 --- a/data/migrations/2.5.5to2.6.0.sql +++ b/data/migrations/2.5.5to2.6.0.sql @@ -108,10 +108,13 @@ BEGIN; ALTER TABLE ONLY gn_synthese.synthese ADD CONSTRAINT fk_synthese_id_nomenclature_biogeo_status FOREIGN KEY (id_nomenclature_biogeo_status) REFERENCES ref_nomenclatures.t_nomenclatures(id_nomenclature) ON UPDATE CASCADE; - -- suppression de la valeur par defaut du champ id_nomenclature_sensitivity + -- suppression de la valeur par defaut du champ id_nomenclature_sensitivity et id_nomenclature_diffusion_level ALTER TABLE gn_synthese.synthese ALTER column id_nomenclature_sensitivity DROP DEFAULT; + ALTER TABLE gn_synthese.synthese + ALTER column id_nomenclature_diffusion_level DROP DEFAULT; + CREATE OR REPLACE FUNCTION gn_synthese.fct_tri_cal_sensi_diff_level_on_each_statement() RETURNS TRIGGER LANGUAGE plpgsql AS $$