Index: /trunk/dbconfig/config.md
===================================================================
--- /trunk/dbconfig/config.md	(revision 10058)
+++ /trunk/dbconfig/config.md	(revision 10059)
@@ -2,4 +2,4 @@
     pkg_name        STR     ippdb
     pkg_namespace   STR     ippdb
-    pkg_version     STR     0.0.55
+    pkg_version     STR     0.0.56
 END
Index: /trunk/dbconfig/tasks.md
===================================================================
--- /trunk/dbconfig/tasks.md	(revision 10058)
+++ /trunk/dbconfig/tasks.md	(revision 10059)
@@ -1,3 +1,3 @@
-# $Id: tasks.md,v 1.94 2006-11-14 03:15:04 jhoblitt Exp $
+# $Id: tasks.md,v 1.95 2006-11-18 00:19:16 jhoblitt Exp $
 
 # this table records all exposure ID ever seen from the summit
@@ -8,20 +8,26 @@
 # note that exp is a MySQL reserved word
 
+# for use with this stored procedure to generate exp_tags under Mysql 5+
+#
+#CREATE FUNCTION genTag (exp_id varchar(64)) RETURNS VARCHAR(64)
+#BEGIN
+#    UPDATE expTagCounter SET counter = LAST_INSERT_ID(counter + 1);
+#    RETURN CONCAT(exp_id, '.', LAST_INSERT_ID());
+#END
+#
+#expTagCounter METADATA
+#   counter     U64         0 
+#END
+
+# list of source exposures -- updated as exposures are seen
+# summitExp.imfiles is updated as filesets are queried default value should be
+# -1 as NULL or 0 might be a valid value (empty fileset)
 summitExp METADATA
     exp_id      STR         64      # Primary Key
     camera      STR         64      # Primary Key
     telescope   STR         64      # Primary Key
-    time        UTC         NULL
-    exp_type    STR         64
-    uri         STR         255
-END
-
-pzPendingExp METADATA
-    exp_id      STR         64      # Primary Key
-    camera      STR         64      # Primary Key
-    telescope   STR         64      # Primary Key
-    # time
-    exp_type    STR         64
-#    class       STR         64
+    dateobs     UTC         NULL
+    exp_type    STR         64
+    uri         STR         255
     imfiles     S32         0
 END
@@ -29,5 +35,6 @@
 # class == type of file
 # class_id == type set id
-pzPendingImfile METADATA
+# list of source images -- updated as exposures/filesets are queried
+summitImfile METADATA
     exp_id      STR         64      # Primary Key
     camera      STR         64      # Primary Key
@@ -35,15 +42,50 @@
     bytes       S32         0
     md5sum      STR         32
-    class       STR         64
-    class_id    STR         64      # Primary Key
+    class       STR         64      # Primary Key
+    class_id    STR         64      # Primary Key
+    uri         STR         255
+END
+
+# list of exposures that have had their imfiles/files registered (but not
+# downloaded) 
+pzPendingExp METADATA
+    exp_id      STR         64      # Primary Key
+    camera      STR         64      # Primary Key
+    telescope   STR         64      # Primary Key
+END
+
+pzPendingImfile METADATA
+    exp_id      STR         64      # Primary Key
+    camera      STR         64      # Primary Key
+    telescope   STR         64      # Primary Key
+    class       STR         64      # Primary Key
+    class_id    STR         64      # Primary Key
+    exp_tag     STR         64      # Unique Key
+END
+
+# list of exposures that have had all of their imfiles downloaded
+pzDoneExp METADATA
+    exp_id      STR         64      # Primary Key
+    camera      STR         64      # Primary Key
+    telescope   STR         64      # Primary Key
+END
+
+pzDoneImfile METADATA
+    exp_id      STR         64      # Primary Key
+    camera      STR         64      # Primary Key
+    telescope   STR         64      # Primary Key
+    class       STR         64      # Primary Key
+    class_id    STR         64      # Primary Key
+    exp_tag     STR         64      # Unique Key
     uri         STR         255
 END
 
 newExp METADATA
-    exp_tag     STR         64      # Primary Key
+#    exp_tag     STR         64      # Primary Key
+    exp_tag     U64         0       # Primary Key AUTO_INCREMENT
     exp_id      STR         64      # Key
-    camera      STR         64 
-    telescope   STR         64
-#    time        UTC         NULL
+    camera      STR         64      # Key
+    telescope   STR         64      # Key
+    dateobs     UTC         NULL
     exp_type    STR         64
     imfiles     S32         0
@@ -54,5 +96,5 @@
 newImfile METADATA
     exp_tag     STR         64      # Primary Key
-    class       STR         64
+    class       STR         64      # Primary Key
     class_id    STR         64      # Primary Key
     uri         STR         255
@@ -62,4 +104,5 @@
 rawDetrendExp METADATA
     exp_tag     STR         64      # Primary Key
+#    exp_id      STR         64      # Key
     camera      STR         64
     telescope   STR         64
@@ -85,4 +128,5 @@
 rawScienceExp METADATA
     exp_tag     STR         64      # Primary Key
+#    exp_id      STR         64      # Key
     camera      STR         64
     telescope   STR         64
