update the patch SQL

This commit is contained in:
Dany De Bontridder 2010-07-17 22:14:43 +00:00
parent 3581800f1b
commit 287e39c1f1

View file

@ -127,6 +127,30 @@ select correct_quant_sale() ;
ALTER TABLE jrn_def ADD COLUMN jrn_def_bank bigint;
alter table jrn_def add jrn_def_num_op integer;
ALTER TABLE del_jrnx ADD COLUMN f_id bigint;
DROP FUNCTION comptaproc.jrnx_del();
CREATE OR REPLACE FUNCTION comptaproc.jrnx_del()
RETURNS trigger AS
$BODY$
declare
row jrnx%ROWTYPE;
begin
row:=OLD;
insert into del_jrnx(
j_id, j_date, j_montant, j_poste, j_grpt, j_rapt, j_jrn_def,
j_debit, j_text, j_centralized, j_internal, j_tech_user, j_tech_date,
j_tech_per, j_qcode, f_id) SELECT j_id, j_date, j_montant, j_poste, j_grpt, j_rapt, j_jrn_def,
j_debit, j_text, j_centralized, j_internal, j_tech_user, j_tech_date,
j_tech_per, j_qcode, f_id from jrnx where j_id=row.j_id;
return row;
end;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
update version set val=86;
commit;