1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/noalyss_ynh.git synced 2024-09-03 19:46:20 +02:00
noalyss_ynh/sources/noalyss-6.9.0.0/html/admin/sql/patch/ac-upgrade14.sql
Laurent Peuch fce579e032 init
2015-09-27 00:42:21 +02:00

25 lines
904 B
PL/PgSQL

begin;
update theme set the_name='Mandarine' ,the_filestyle='style-mandarine.css' where the_name='Colored';
update theme set the_name='Mobile' ,the_filestyle='style-mobile.css' where the_name='EPad';
update theme set the_name = 'Classique' where the_name='classic';
update user_global_pref set parameter_value='Classique' where parameter_type='THEME';
update theme set the_filestyle='style-classic.css' where the_filestyle='style.css';
CREATE OR REPLACE FUNCTION public.upgrade_repo(p_version integer)
RETURNS void
AS $function$
declare
is_mono integer;
begin
select count (*) into is_mono from information_schema.tables where table_name='repo_version';
if is_mono = 1 then
update repo_version set val=p_version;
else
update version set val=p_version;
end if;
end;
$function$
language plpgsql;
select upgrade_repo(15);
commit;