upgrade SQL scripts

This commit is contained in:
Dany De Bontridder 2015-06-17 19:23:10 +02:00
parent 5a7deeadfc
commit 207af46711
2 changed files with 14 additions and 2 deletions

12
sql/ac_upgrade.sql Normal file
View file

@ -0,0 +1,12 @@
begin;
ALTER TABLE ac_dossier drop COLUMN dos_jnt_user ;
delete from jnt_use_dos where jnt_id in (select priv_jnt from priv_user where priv_priv='X');
delete from jnt_use_dos where use_id in (select use_id from ac_users where use_admin=1 or use_active=0);
ALTER TABLE ac_users ADD COLUMN use_email text;
COMMENT ON COLUMN ac_users.use_email IS 'Email of the user';
drop table priv_user;
select upgrade_repo(16);
alter table
rollback;

View file

@ -59,7 +59,7 @@ values
insert into profile_menu (me_code,me_code_dep,p_id,p_order, p_type_display,pm_default)
values
('BALAGE','PRINT',1,550,'M',0),('BALAGE','PRINT',2,550,'M',0),
('BALAGE','PRINT',1,550,'E',0),('BALAGE','PRINT',2,550,'E',0),
('CSV:balance_age',null,1,null,'P',0),('CSV:balance_age',null,2,null,'P',0)
;
@ -156,7 +156,7 @@ begin
return sResult::account_type;
end;
$BODY$
LANGUAGE plpgsql ;;
LANGUAGE plpgsql ;
CREATE OR REPLACE FUNCTION comptaproc.account_insert(p_f_id integer, p_account text)
RETURNS text AS