Commit e0f9a6c6 authored by Frank Bergmann's avatar Frank Bergmann

- Not sure about the update to HR component

parent 64de6aaa
......@@ -9,17 +9,22 @@ SELECT acs_log__debug('/packages/intranet-hr/sql/postgresql/upgrade/upgrade-5.0.
create or replace function inline_0 ()
returns integer as $body$
DECLARE
v_count integer;
v_count integer;
BEGIN
-- Check if colum exists in the database
select count(*) into v_count from user_tab_columns where lower(table_name) = 'im_employees' and lower(column_name) = 'vacation_balance_year';
IF v_count > 0 THEN return 1; END IF;
-- Check if colum exists in the database
select count(*) into v_count from user_tab_columns where lower(table_name) = 'im_employees' and lower(column_name) = 'vacation_balance_year';
IF v_count > 0 THEN return 1; END IF;
alter table im_employees add vacation_balance_year date default date_trunc('year', now());
alter table im_employees add vacation_balance_backup_previous_year numeric(12,2) default 0.0;
alter table im_employees add vacation_balance_year date default date_trunc('year', now());
alter table im_employees add vacation_balance_backup_previous_year numeric(12,2) default 0.0;
return 0;
return 0;
END;$body$ language 'plpgsql';
SELECT inline_0 ();
DROP FUNCTION inline_0 ();
update im_component_plugins
set component_tcl = 'im_employee_info_component $user_id_from_search $return_url [im_opt_val -limit_to nohtml employee_view_name]'
where plugin_name = 'User Employee Component';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment