Skip to content

Commit

Permalink
Drop default value for id_nomenclature_sensitivity and id_nomenclatur…
Browse files Browse the repository at this point in the history
…e_diffusion_level
  • Loading branch information
TheoLechemia committed Feb 4, 2021
1 parent 9e53f8d commit d86d4ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data/core/synthese.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
5 changes: 4 additions & 1 deletion data/migrations/2.5.5to2.6.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 $$
Expand Down

0 comments on commit d86d4ae

Please sign in to comment.