Index: trunk/dbconfig/chip.md
===================================================================
--- trunk/dbconfig/chip.md	(revision 14017)
+++ trunk/dbconfig/chip.md	(revision 14023)
@@ -1,4 +1,4 @@
 #
-#  We are dependant on the assumption that there is only ever one exp_tag in a
+#  We are dependant on the assumption that there is only ever one exp_id in a
 #  chipRun although the database does not enforce this.
 #
@@ -17,11 +17,11 @@
 chipInputImfile METADATA
     chip_id     S64         0       # Primary Key fkey (chip_id) ref chipRun(chip_id)
-    exp_tag     STR         64      # Primary Key fkey (exp_tag, class_id) ref rawImfile (exp_tag, class_id)
+    exp_id      S64         64      # Primary Key fkey (exp_id, class_id) ref rawImfile (exp_id, class_id)
     class_id    STR         64      # Primary Key
 END
 
 chipProcessedImfile METADATA
-    chip_id     S64         0       # Primary Key fkey (chip_id, exp_tag, class_id) ref chipPendingImfile(chip_id, exp_tag, class_id)
-    exp_tag     STR         64      # Primary Key
+    chip_id     S64         0       # Primary Key fkey (chip_id, exp_id, class_id) ref chipInputImfile(chip_id, exp_id, class_id)
+    exp_id     S64         64      # Primary Key
     class_id        STR     64      # Primary Key
     uri             STR     255
Index: trunk/dbconfig/det.md
===================================================================
--- trunk/dbconfig/det.md	(revision 14017)
+++ trunk/dbconfig/det.md	(revision 14023)
@@ -34,5 +34,5 @@
     det_id      S64         0       # Primary Key
     iteration   S32         0       # Primary Key
-    exp_tag     STR         64      # Primary Key
+    exp_id     S64         64      # Primary Key
     include     BOOL        f
 END
@@ -40,5 +40,5 @@
 detProcessedImfile METADATA
     det_id      S64         0      # Primary Key
-    exp_tag     STR         64     # Primary Key
+    exp_id     S64         64     # Primary Key
     class_id    STR         64     # Primary Key
     uri         STR         255
@@ -61,5 +61,5 @@
 detProcessedExp METADATA
     det_id      S64         0      # Primary Key
-    exp_tag     STR         64     # Primary Key
+    exp_id     S64         64     # Primary Key
     recipe      STR         64
     bg          F64         0.0
@@ -153,5 +153,5 @@
     det_id      S64         0       # Primary Key
     iteration   S32         0       # Primary Key
-    exp_tag     STR         64      # Primary Key
+    exp_id     S64         64      # Primary Key
     class_id    STR         64      # Primary Key
     uri         STR         255
@@ -176,5 +176,5 @@
     det_id      S64         0       # Primary Key
     iteration   S32         0       # Primary Key
-    exp_tag     STR         64      # Primary Key
+    exp_id     S64         64      # Primary Key
     recipe      STR         64
     bg          F64         0.0
Index: trunk/dbconfig/guide.md
===================================================================
--- trunk/dbconfig/guide.md	(revision 14017)
+++ trunk/dbconfig/guide.md	(revision 14023)
@@ -1,5 +1,5 @@
 guidePendingExp METADATA
     guide_id    S64         0       # Primary Key AUTO_INCREMENT
-    exp_tag     STR         64      # Key
+    exp_id     S64         64      # Key
     recipe      STR         64
 END
Index: trunk/dbconfig/magic.md
===================================================================
--- trunk/dbconfig/magic.md	(revision 14017)
+++ trunk/dbconfig/magic.md	(revision 14023)
@@ -1,3 +1,3 @@
-# $Id: magic.md,v 1.1 2007-02-15 02:12:42 jhoblitt Exp $
+# $Id: magic.md,v 1.2 2007-07-06 01:16:08 jhoblitt Exp $
 
 #
@@ -10,5 +10,5 @@
 p4MagicMaskImfile METADATA
     p4_id       S32         0       # Primary Key
-    exp_tag     STR         64      # Primary Key
+    exp_id     S64         64      # Primary Key
     p3_version  S32         0       # Primary Key
 # class is not yet consistently carried through pXtools
@@ -21,5 +21,5 @@
 # p4MagicMaskImfile METADATA
 #     p4_id       S32         0       # Primary Key
-#     exp_tag     STR         64      # Primary Key
+#     exp_id     S64         64      # Primary Key
 #     p3_version  S32         0       # Primary Key
 # # class is not yet consistently carried through pXtools
@@ -34,5 +34,5 @@
 #     skycell_id  STR         64      # Primary Key
 #     tess_id     STR         64      # Primary Key
-#     exp_tag     STR         64      # Primary Key
+#     exp_id     S64         64      # Primary Key
 #     p3_version  S32         0       # Primary Key
 # # class is not yet consistently carried through pXtools
@@ -50,5 +50,5 @@
 #     skycell_id  STR         64      # Primary Key
 #     tess_id     STR         64      # Primary Key
-#     exp_tag     STR         64      # Primary Key
+#     exp_id     S64         64      # Primary Key
 #     p3_version  S32         0       # Primary Key
 # # class is not yet consistently carried through pXtools
@@ -64,5 +64,5 @@
 #     skycell_id  STR         64      # Primary Key
 #     tess_id     STR         64      # Primary Key
-#     exp_tag     STR         64      # Primary Key
+#     exp_id     S64         64      # Primary Key
 #     p3_version  S32         0       # Primary Key
 # # class is not yet consistently carried through pXtools
@@ -77,5 +77,5 @@
 # p4MagicMaskImfile METADATA
 #     p4_id       S32         0       # Primary Key
-#     exp_tag     STR         64      # Primary Key
+#     exp_id     S64         64      # Primary Key
 #     p3_version  S32         0       # Primary Key
 # # class is not yet consistently carried through pXtools
Index: trunk/dbconfig/skycell.md
===================================================================
--- trunk/dbconfig/skycell.md	(revision 14017)
+++ trunk/dbconfig/skycell.md	(revision 14023)
@@ -1,3 +1,3 @@
-# $Id: skycell.md,v 1.3 2007-02-13 22:33:30 jhoblitt Exp $
+# $Id: skycell.md,v 1.4 2007-07-06 01:16:08 jhoblitt Exp $
 
 skyCell METADATA
@@ -17,5 +17,5 @@
     skycell_id  STR         64      # Primary Key
     tess_id     STR         64      # Primary Key
-    exp_tag     STR         64      # Primary Key
+    exp_id     S64         64      # Primary Key
     p3_version  S32         0       # Primary Key
 # class is not yet consistently carried through pXtools
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
-#
Index: trunk/dbconfig/warp.md
===================================================================
--- trunk/dbconfig/warp.md	(revision 14017)
+++ trunk/dbconfig/warp.md	(revision 14023)
@@ -1,3 +1,3 @@
-# $Id: warp.md,v 1.3 2007-06-07 01:10:31 price Exp $
+# $Id: warp.md,v 1.4 2007-07-06 01:16:08 jhoblitt Exp $
 
 #
@@ -23,9 +23,9 @@
 
 # the list of imfiles in our skycell keyed against phase 3
-# only allow one cam_version of an exp_tag per warpRun
+# only allow one cam_version of an exp_id per warpRun
 warpInputExp METADATA
     warp_id     S64         0       # Primary Key fkey(warp_id) ref warpRun(warp_id)
     cam_id      S64         0       # Primary Key fkey(cam_id) ref camProcessedExp(cam_id)
-# if magic is T then look for the exp_tag in the magic output tables
+# if magic is T then look for the exp_id in the magic output tables
     magiced     BOOL        f       # Key
 END
