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 $$