diff --git a/include/sql/patch/upgrade125.sql b/include/sql/patch/upgrade125.sql index 5cfe93fbd..0e20a89b2 100644 --- a/include/sql/patch/upgrade125.sql +++ b/include/sql/patch/upgrade125.sql @@ -4,6 +4,9 @@ set search_path to public,comptaproc; alter table action_gestion drop ag_ref_ag_id; +drop trigger t_tmp_pcm_alphanum_ins_upd on tmp_pcmn ; +drop trigger t_tmp_pcmn_ins on tmp_pcmn ; + create sequence tmp_pcmn_id_seq; ALTER TABLE tmp_pcmn ADD COLUMN id bigint; update tmp_pcmn set id=nextval('tmp_pcmn_id_seq'); @@ -13,8 +16,6 @@ ALTER TABLE tmp_pcmn ALTER COLUMN id SET DEFAULT nextval('tmp_pcmn_id_seq'::regc ALTER TABLE tmp_pcmn ADD CONSTRAINT id_ux UNIQUE(id); COMMENT ON COLUMN tmp_pcmn.id IS 'allow to identify the row, it is unique and not null (pseudo pk)'; update tmp_pcmn set id=nextval('tmp_pcmn_id_seq'); -drop trigger t_tmp_pcm_alphanum_ins_upd on tmp_pcmn ; -drop trigger t_tmp_pcmn_ins on tmp_pcmn ; alter table tmp_pcmn add column pcm_direct_use varchar(1); COMMENT ON COLUMN tmp_pcmn.pcm_direct_use IS 'Value are N or Y , N cannot be used directly , not even through a card'; ALTER TABLE tmp_pcmn ALTER COLUMN pcm_direct_use SET DEFAULT 'Y'; @@ -110,4 +111,4 @@ alter table version alter v_date set default now(); alter table version add primary key (val); insert into version (val,v_description) values (126,'Add filter for search, inactive tag or ledger, type of operation, security'); -commit; \ No newline at end of file +commit;