Index: openacs-4/packages/logger/sql/postgresql/logger-packages-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/logger/sql/postgresql/logger-packages-create.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/logger/sql/postgresql/logger-packages-create.sql	9 May 2003 11:04:13 -0000	1.5
+++ openacs-4/packages/logger/sql/postgresql/logger-packages-create.sql	11 Dec 2003 21:40:07 -0000	1.6
@@ -65,17 +65,18 @@
           perform logger_entry__del(v_rec.entry_id);
         end loop;        
 
-        -- Delete all variables only mapped to this project.
+        -- Delete all variables only mapped to this project that are not preinstalled (time, expenses)
         for v_rec in select variable_id
-                      from logger_variables
-                      where exists (select 1
+                      from  logger_variables
+                      where package_id is not null
+                      and   exists (select 1
                                     from logger_project_pkg_map
                                     where project_id = p_project_id
                                    )
-                      and not exists (select 1 
-                                      from logger_project_pkg_map 
-                                      where project_id <> p_project_id
-                                     )
+                      and   not exists (select 1 
+                                        from logger_project_pkg_map 
+                                        where project_id <> p_project_id
+                                       )
         loop
             perform logger_variable__del(v_rec.variable_id);
         end loop;                                 
