diff --git a/src/importer/import.py b/src/importer/import.py index 1afede5..118b537 100644 --- a/src/importer/import.py +++ b/src/importer/import.py @@ -939,6 +939,26 @@ ADD CONSTRAINT fk_plan_task_id FOREIGN KEY (plan_task_id) REFERENCES "{schemaname}"."PLAN_TASK"(plan_task_id); """ }, + VW_PLAN={ + 'create': """ +CREATE TABLE IF NOT EXISTS "{schemaname}"."{tablename}" ( + plan_id integer, + copy boolean, + type integer, + dim_id integer, + plan_cells_id integer PRIMARY KEY, + act_id integer, + prj_id integer, + emp_id integer, + org_id integer, + fromdate date, + todate date, + status integer, + hours double precision, + costs double precision +) + """ + } ) _CUSTOMER_SETTINGS = dict( @@ -946,7 +966,7 @@ tables=( 'ACT', 'EMP', 'ORG', 'JOB', 'CUST', 'CUST_CONTACT', 'EMP_CONTRACT', 'EMP_ORG', 'PRJ', 'PRJ_LINK', 'SYS_PRJ_NIV', 'HRS', 'SYS_OPT_ITM', - 'VW_LABEL_PRJ' + 'VW_LABEL_PRJ', 'VW_PLAN' ), sql=pkg_resources.resource_string( __name__, 'sql/datapunt.sql'