Index: trunk/dbconfig/tasks.md
===================================================================
--- trunk/dbconfig/tasks.md	(revision 14017)
+++ trunk/dbconfig/tasks.md	(revision 14023)
@@ -1,6 +1,6 @@
-# $Id: tasks.md,v 1.135 2007-07-05 20:13:45 jhoblitt Exp $
+# $Id: tasks.md,v 1.136 2007-07-06 01:16:08 jhoblitt Exp $
 
 # this table records all exposure ID ever seen from the summit
-# exp_id == fileset
+# exp_name == fileset
 
 # note that dec is a MySQL reserved word
@@ -8,15 +8,15 @@
 # note that exp is a MySQL reserved word
 
-# for use with this stored procedure to generate exp_tags under Mysql 5+
+# for use with this stored procedure to generate exp_ids under Mysql 5+
 #
-#CREATE FUNCTION genTag (exp_id varchar(64)) RETURNS VARCHAR(64)
+#CREATE FUNCTION genTag (exp_name varchar(64)) RETURNS VARCHAR(64)
 #BEGIN
 #    UPDATE expTagCounter SET counter = LAST_INSERT_ID(counter + 1);
-#    RETURN CONCAT(exp_id, '.', LAST_INSERT_ID());
+#    RETURN CONCAT(exp_name, '.', LAST_INSERT_ID());
 #END
 #
-expTagCounter METADATA
-   counter     U64         0 
-END
+#expTagCounter METADATA
+#   counter     U64         0 
+#END
 
 # list of source exposures -- updated as exposures are seen
@@ -24,5 +24,5 @@
 # -1 as NULL or 0 might be a valid value (empty fileset)
 summitExp METADATA
-    exp_id      STR         64      # Primary Key
+    exp_name      STR         64      # Primary Key
     camera      STR         64      # Primary Key
     telescope   STR         64      # Primary Key
@@ -37,5 +37,5 @@
 # list of source images -- updated as exposures/filesets are queried
 summitImfile METADATA
-    exp_id      STR         64      # Primary Key
+    exp_name      STR         64      # Primary Key
     camera      STR         64      # Primary Key
     telescope   STR         64      # Primary Key
@@ -51,5 +51,5 @@
 # downloaded) 
 pzPendingExp METADATA
-    exp_id      STR         64      # Primary Key
+    exp_name      STR         64      # Primary Key
     camera      STR         64      # Primary Key
     telescope   STR         64      # Primary Key
@@ -57,15 +57,15 @@
 
 pzPendingImfile METADATA
-    exp_id      STR         64      # Primary Key
+    exp_name    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
+    exp_id      S64         64      # Unique Key
 END
 
 # list of exposures that have had all of their imfiles downloaded
 pzDoneExp METADATA
-    exp_id      STR         64      # Primary Key
+    exp_name    STR         64      # Primary Key
     camera      STR         64      # Primary Key
     telescope   STR         64      # Primary Key
@@ -73,19 +73,19 @@
 
 pzDoneImfile METADATA
-    exp_id      STR         64      # Primary Key
+    exp_name    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
+    exp_id      S64         64      # Unique Key
     uri         STR         255
 END
 
 newExp METADATA
-    exp_tag     STR         64      # Primary Key
-    exp_id      STR         64      # Key
+    exp_id      S64         0       # Primary Key AUTO_INCREMENT
+    tmp_exp_name STR        64      # Key
+    tmp_camera    STR         64      # Key
+    tmp_telescope STR         64      # Key
     state       STR         64      # Key
-    camera      STR         64      # Key
-    telescope   STR         64      # Key
     imfiles     S32         0
     workdir     STR         255     # destination for output files
@@ -96,6 +96,6 @@
 # from there
 newImfile METADATA
-    exp_tag     STR         64      # Primary Key fkey(exp_tag) ref newExp(exp_tag)
-    class_id    STR         64      # Primary Key
+    exp_id      S64         64      # Primary Key fkey(exp_id) ref newExp(exp_id)
+    tmp_class_id STR        64      # Primary Key
     uri         STR         255
 END
@@ -103,9 +103,10 @@
 # paired with rawImfile
 rawExp METADATA
-    exp_tag     STR         64      # Primary Key fkey(exp_tag) ref newExp(exp_tag)
-    exp_id      STR         64      # Key
+    exp_id      S64         64      # Primary Key fkey(exp_id) ref newExp(exp_id)
+    exp_name    STR         64
     camera      STR         64
     telescope   STR         64
     dateobs     UTC         0001-01-01T00:00:00Z
+    exp_tag     STR         255
     exp_type    STR         64
     imfiles     S32         0
@@ -136,5 +137,10 @@
 
 rawImfile METADATA
-    exp_tag     STR         64      # Primary Key fkey(exp_tag, class_id) ref newImfile(exp_tag, class_id)
+    exp_id      S64         64      # Primary Key fkey(exp_id, tmp_class_id) ref newImfile(exp_id, tmp_class_id)
+    exp_name    STR         64
+    camera      STR         64
+    telescope   STR         64
+    dateobs     UTC         0001-01-01T00:00:00Z
+    tmp_class_id    STR     64      # Key
     class_id    STR         64      # Primary Key
     uri         STR         255
@@ -163,9 +169,4 @@
     user_5      F64         0.0
     object      STR         64
-    dateobs     UTC         0001-01-01T00:00:00Z
     fault       S16         0       # Key NOT NULL
 END
-
-#
-# XXX - temporarily (???) stop carrying around class in imfiles after rawImfile
-#
