WIDGET : db upgrade 199
This commit is contained in:
parent
0d4c6d23d0
commit
9ed7fe540e
4 changed files with 69 additions and 77 deletions
67
include/sql/patch/upgrade199.sql
Normal file
67
include/sql/patch/upgrade199.sql
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
begin;
|
||||
|
||||
alter table attr_min add ad_default_order int;
|
||||
|
||||
update attr_min set ad_default_order = a1.ad_default_order from attr_def a1 where a1.ad_id = attr_min.ad_id;
|
||||
|
||||
|
||||
select replace_menu_code('CFGACC','C0PST');
|
||||
select replace_menu_code('CFGDOC','C0DOC');
|
||||
select replace_menu_code('CFGSEC','C0SEC');
|
||||
select replace_menu_code('CFGPCMN','C0PCMN');
|
||||
select replace_menu_code('CFGPRO','C0PROFL');
|
||||
select replace_menu_code('CFGLED','C0JRN');
|
||||
select replace_menu_code('CFGDOCST','C1DOC');
|
||||
select replace_menu_code('CFGDEFMENU','C0MENU');
|
||||
select replace_menu_code('CFGPAY','C0PAY');
|
||||
select replace_menu_code('CFGCURRENCY','C0DEV');
|
||||
select replace_menu_code('CFGACTION','C0ACT');
|
||||
select replace_menu_code('CFGOPT1','C0OPT1');
|
||||
select replace_menu_code('CFGSTOCK','C0STOCK');
|
||||
select replace_menu_code('CFGPLUGIN','C0PLG');
|
||||
select replace_menu_code('CFGTAG','C0TAG');
|
||||
|
||||
update menu_ref set me_description ='Configuration des extensions' where me_code='C0PLG';
|
||||
update menu_ref set me_description ='Clef de répartition pour la comptabilité analytique' where me_code='ANCKEY';
|
||||
|
||||
--- widget pour DASHBOARD
|
||||
drop table dashboard_widget;
|
||||
drop table if exists user_widget;
|
||||
drop table if exists user_widger;
|
||||
drop table if exists widget_dashboard;
|
||||
|
||||
create table widget_dashboard(
|
||||
wd_id int primary key generated by default as identity,
|
||||
wd_code text not null,
|
||||
wd_name text not null,
|
||||
wd_description text not null,
|
||||
wd_parameter int not null default 0
|
||||
);
|
||||
|
||||
|
||||
|
||||
create table user_widget(
|
||||
uw_id int primary key generated by default as identity,
|
||||
use_login text not null,
|
||||
dashboard_widget_id int not null references widget_dashboard(wd_id) on update cascade on delete cascade,
|
||||
uw_parameter text ,
|
||||
uw_order int
|
||||
);
|
||||
|
||||
ALTER TABLE public.widget_dashboard ADD CONSTRAINT widget_dashboard_unique UNIQUE (wd_code);
|
||||
|
||||
|
||||
COMMENT ON COLUMN public.widget_dashboard.wd_name IS 'Name';
|
||||
COMMENT ON COLUMN public.widget_dashboard.wd_id IS 'PK';
|
||||
COMMENT ON COLUMN public.widget_dashboard.wd_code IS 'Code';
|
||||
COMMENT ON COLUMN public.widget_dashboard.wd_description IS 'Description';
|
||||
COMMENT ON COLUMN public.widget_dashboard.wd_parameter IS 'presence of there is a parameter';
|
||||
|
||||
update menu_ref set me_menu = me_menu ||' 👤' where me_code='PREFERENCE';
|
||||
update menu_ref set me_menu = 'Impression 📊' where me_code='PRINT';
|
||||
update menu_ref set me_menu = me_menu || '📊' where me_code='RAPAV';
|
||||
update menu_ref set me_menu = me_menu ||' 📇' where me_code='CARD';
|
||||
update menu_ref set me_menu = 'Favori ✨' where me_code='BOOKMARK';
|
||||
|
||||
insert into version (val,v_description) values (200,'Widget and improve menu');
|
||||
commit;
|
||||
Loading…
Add table
Add a link
Reference in a new issue