Index: trunk/dbconfig/p5.md
===================================================================
--- trunk/dbconfig/p5.md	(revision 11779)
+++ trunk/dbconfig/p5.md	(revision 11808)
@@ -1,3 +1,10 @@
-# $Id: p5.md,v 1.1 2007-02-13 22:33:30 jhoblitt Exp $
+# $Id: p5.md,v 1.2 2007-02-15 02:01:30 jhoblitt Exp $
+
+p5Run METADATA
+    p5_id       S32         0       # Primary Key AUTO_INCREMENT
+    state       STR         64      # Key
+    workdir     STR         255
+    registered  TAI         NULL
+END
 
 #
@@ -6,6 +13,7 @@
 
 # only ever 2 per run
-p4InputScfile METADATA
-    p4_id      S32         0       # Primary Key
+p5InputScfile METADATA
+    p5_id       S32         0       # Primary Key
+    p4_id       S32         0       # Primary Key
     skycell_id  STR         64      # Primary Key
     tess_id     STR         64      # Primary Key
@@ -14,98 +22,13 @@
 # either a input or a template
     kind        STR         64      # Key 
+    template    BOOL        f
 END
 
-p4DiffScfile METADATA
-    p4_id      S32         0       # Primary Key
+p5DiffScfile METADATA
+    p5_id       S32         0       # Primary Key
     skycell_id  STR         64      # Primary Key
     tess_id     STR         64      # Primary Key
-    exp_tag     STR         64      # Primary Key
-    p3_version  S32         0       # Primary Key
     uri         STR         255
     bg          F64         0.0
     bg_mean_stdev   F64     0.0
 END
-
-#
-# Feed imfiles to Magic Mode
-#
-
-# also uses p4InputExp
-
-# output from magic
-p4MagicMaskImfile METADATA
-    p4_id       S32         0       # Primary Key
-    exp_tag     STR         64      # Primary Key
-    p3_version  S32         0       # Primary Key
-# class is not yet consistently carried through pXtools
-#    class       STR         64      # Primary Key
-    class_id    STR         64      # Primary Key
-    uri         STR         255
-END
-
-# output from magic
-# p4MagicMaskImfile METADATA
-#     p4_id       S32         0       # Primary Key
-#     exp_tag     STR         64      # Primary Key
-#     p3_version  S32         0       # Primary Key
-# # class is not yet consistently carried through pXtools
-# #    class       STR         64      # Primary Key
-#     class_id    STR         64      # Primary Key
-#     uri         STR         255
-# END
-# 
-# # the list of imfiles in our skycell keyed against phase 3
-# p4InputImfile  METADATA
-#     p4_id       S32         0       # Primary Key
-#     skycell_id  STR         64      # Primary Key
-#     tess_id     STR         64      # Primary Key
-#     exp_tag     STR         64      # Primary Key
-#     p3_version  S32         0       # Primary Key
-# # class is not yet consistently carried through pXtools
-# #    class       STR         64      # Primary Key
-#     class_id    STR         64      # Primary Key
-# # either a input or a template
-#     kind        STR         64      # Key 
-# END
-# 
-# 
-# # one diff image per input to the current stack
-# # XXX how will diff against the static sky be handled?
-# p4DiffImfile METADATA
-#     p4_id       S32         0       # Primary Key
-#     skycell_id  STR         64      # Primary Key
-#     tess_id     STR         64      # Primary Key
-#     exp_tag     STR         64      # Primary Key
-#     p3_version  S32         0       # Primary Key
-# # class is not yet consistently carried through pXtools
-# #    class       STR         64      # Primary Key
-#     class_id    STR         64      # Primary Key
-#     uri         STR         255
-#     bg          F64         0.0
-#     bg_mean_stdev   F64     0.0
-# END
-# 
-# p4StackedImfile METADATA
-#     p4_id       S32         0       # Primary Key
-#     skycell_id  STR         64      # Primary Key
-#     tess_id     STR         64      # Primary Key
-#     exp_tag     STR         64      # Primary Key
-#     p3_version  S32         0       # Primary Key
-# # class is not yet consistently carried through pXtools
-# #    class       STR         64      # Primary Key
-#     class_id    STR         64      # Primary Key
-#     uri         STR         255
-#     bg          F64         0.0
-#     bg_mean_stdev   F64     0.0
-# END
-# 
-# # output from magic
-# p4MagicMaskImfile METADATA
-#     p4_id       S32         0       # Primary Key
-#     exp_tag     STR         64      # Primary Key
-#     p3_version  S32         0       # Primary Key
-# # class is not yet consistently carried through pXtools
-# #    class       STR         64      # Primary Key
-#     class_id    STR         64      # Primary Key
-#     uri         STR         255
-# END
