Index: openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/sql/postgresql/Attic/project-manager-table-create.sql,v
diff -u -r1.18 -r1.19
--- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql	26 Feb 2004 15:15:40 -0000	1.18
+++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql	12 Mar 2004 13:44:42 -0000	1.19
@@ -1,8 +1,3 @@
--- TODO:
--- 
--- need to add in workflow (for status among other things)
-
---
 -- packages/project-manager/sql/postgresql/project-manager-table-create.sql
 --
 -- @author jader@bread.com
@@ -52,17 +47,22 @@
                                 not null
                                 constraint pm_projects_status_id_fk
                                 references pm_project_status,
+        -- if ongoing_p is true, then actual_end_date must be null
         ongoing_p               char(1) default 'f' 
                                 constraint pm_projects_ongoing_p_ck
                                 check (ongoing_p in ('t','f')),
-        -- denormalized, computed values
-        -- these are computed but stored in projects table for efficient
-        -- access.
-        estimated_finish_date           timestamptz,
-        earliest_finish_date            timestamptz,
-        latest_finish_date              timestamptz,
-        actual_hours_completed          numeric,
-        estimated_hours_total           numeric
+        estimated_finish_date   timestamptz,
+        earliest_finish_date    timestamptz,
+        latest_finish_date      timestamptz,
+        -- denormalized, taken from logger
+        actual_hours_completed  numeric,
+        estimated_hours_total   numeric,
+        -- The logger package keeps its own projects table
+        logger_project          integer
+                                constraint pm_projects_logger_pj_nn
+                                not null
+                                constraint pm_projects_logger_pj_fk
+                                references logger_projects
 );
 
 
@@ -352,6 +352,25 @@
 );
 
 
+
+create table pm_task_logger_proj_map (
+        task_item_id    integer
+                        constraint pm_task_log_proj_map_t_nn
+                        not null
+                        constraint pm_task_log_proj_map_t_fk
+                        references pm_tasks
+                        on delete cascade,
+        logger_entry    integer
+                        constraint pm_task_log_proj_map_l_nn
+                        not null
+                        constraint pm_task_log_proj_map_l_fk
+                        references logger_entries
+                        on delete cascade,
+        constraint pm_task_logger_proj_map_uq
+        unique (task_item_id, logger_entry)
+);
+
+
 -- DEPENDENCIES
 
 -- dependency types
