Commit 92eb7da8 authored by Frank Bergmann's avatar Frank Bergmann

- added mapping table for reports

parent 7b6644a1
...@@ -7,7 +7,73 @@ ...@@ -7,7 +7,73 @@
-- --
-- @author frank.bergmann@project-open.com -- @author frank.bergmann@project-open.com
-- Sets up an interface to show Security Server messages
-----------------------------------------------------------
-- Simple Surveys - Object Linking Map
--
-- This map links "Business Object Types" (users, projects and
-- companies) and it's Type (provider, customer, internal, ...)
-- to Simple Surveys.
-- In the future we will also include there information about:
-- - Who whould fill out the survey
-- - When a person should fill out a survey
--
-- The problem with survey is not that much "restriction"
-- (make sure only the right persons fill out a survey)
-- but "enforcemente" (make sure the survey is filled out
-- when necessary, such as a PM report).
--
-- Permissions are being set at the survey level, not at
-- this mapping level.
create table im_survsimp_object_map (
acs_object_type varchar(1000)
constraint im_survsimp_omap_object_type_nn
not null
constraint im_survsimp_omap_object_type_fk
references acs_object_types,
biz_object_type_id integer
constraint im_survsimp_omap_biz_object_type_id_fk
references im_categories,
survey_id integer
constraint im_survsimp_omap_survey_id_nn
not null
constraint im_survsimp_omap_survey_id_fk
references survsimp_surveys,
name varchar(1000),
obligatory_p char(1) default 'f'
constraint im_survsimp_omap_obligatory_p_ck
check(obligatory_p in ('t','f')),
recurrence_tcl varchar(4000),
interviewee_profile_id integer
constraint im_survsimp_omap_interv_id_fk
references groups,
note varchar(4000)
);
create index im_survsimp_object_map_acs_object_type_idx on im_survsimp_object_map (acs_object_type);
create index im_survsimp_object_map_biz_object_type_idx on im_survsimp_object_map (biz_object_type_id);
create index im_survsimp_object_map_survey_idx on im_survsimp_object_map (survey_id);
insert into im_survsimp_object_map (
acs_object_type,
biz_object_type_id,
survey_id,
name,
obligatory_p,
recurrence_tcl,
interviewee_profile_id,
note
) values (
'im_project',
null, -- all project subtypes
(select survey_id from survsimp_surveys where short_name = 'pm_weekly'),
'Weekly Project Report',
't',
'', -- Recurrence
467, -- Project Managers
'Please deliver weekly until Friday 11am'
);
--------------------------------------------------------- ---------------------------------------------------------
-- delete potentially existing menus and plugins if this -- delete potentially existing menus and plugins if this
...@@ -113,4 +179,3 @@ end;' language 'plpgsql'; ...@@ -113,4 +179,3 @@ end;' language 'plpgsql';
select inline_0 (); select inline_0 ();
drop function inline_0 (); drop function inline_0 ();
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