Index: trunk/dbconfig/config.md
===================================================================
--- trunk/dbconfig/config.md	(revision 11611)
+++ trunk/dbconfig/config.md	(revision 11658)
@@ -2,4 +2,4 @@
     pkg_name        STR     ippdb
     pkg_namespace   STR     ippdb
-    pkg_version     STR     1.0.0
+    pkg_version     STR     1.1.0
 END
Index: trunk/dbconfig/ipp.m4
===================================================================
--- trunk/dbconfig/ipp.m4	(revision 11611)
+++ trunk/dbconfig/ipp.m4	(revision 11658)
@@ -10,2 +10,3 @@
 include(tasks.md)
 include(p4.md)
+dnl include(skycell.md)
Index: trunk/dbconfig/p4.md
===================================================================
--- trunk/dbconfig/p4.md	(revision 11611)
+++ trunk/dbconfig/p4.md	(revision 11658)
@@ -1,3 +1,10 @@
-# $Id: p4.md,v 1.5 2007-01-19 00:11:41 jhoblitt Exp $
+# $Id: p4.md,v 1.6 2007-02-06 02:30:45 jhoblitt Exp $
+
+#
+# We have at least 3 different run types
+# a) single epoch differing
+# b) magic run operates on "complete" exposures
+# c) multiple epoch differing/stacking operations
+#
 
 # define a new p4run for a single skycell
@@ -6,17 +13,20 @@
     survey_mode  STR       64      # Key
     state       STR         64      # Key
+#    mode        STR         64      # Key
     workdir     STR         255
     filter      STR         64
-    skycell_id  STR         64
-    tess_id     STR         64
-    ra          F64         0.0
-    decl        F64         0.0
-    input_ss    STR         64
-    output_ss   STR         64
+END
+
+p4InputSkyCell METADATA
+    p4_id       S32         0       # Primary Key
+    skycell_id  STR         64      # Primary Key
+    tess_id     STR         64      # Primary Key
 END
 
 # the list of imfiles in our skycell keyed against phase 3
-p4InputImfile  METADATA
+p4Imfile  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
@@ -24,8 +34,12 @@
 #    class       STR         64      # Primary Key
     class_id    STR         64      # Primary Key
+# either a input or a template
+    type        STR         64      # Key 
 END
 
 p4WarpedImfile 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
@@ -34,22 +48,6 @@
     class_id    STR         64      # Primary Key
     uri         STR         255
-#    bg          F64         0.0
-#    bg_stdev    F64         0.0
-#    bg_mean_stdev   F64     0.0
-    b1_uri      STR         255
-    b2_uri      STR         255
-END
-
-p4StackedImfile METADATA
-    p4_id       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_stdev    F64         0.0
-#    bg_mean_stdev   F64     0.0
-    b1_uri      STR         255
-    b2_uri      STR         255
+    bg          F64         0.0
+    bg_mean_stdev   F64     0.0
 END
 
@@ -58,4 +56,6 @@
 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
@@ -64,9 +64,20 @@
     class_id    STR         64      # Primary Key
     uri         STR         255
-#    bg          F64         0.0
-#    bg_stdev    F64         0.0
-#    bg_mean_stdev   F64     0.0
-    b1_uri      STR         255
-    b2_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
 
Index: trunk/dbconfig/skycell.md
===================================================================
--- trunk/dbconfig/skycell.md	(revision 11658)
+++ trunk/dbconfig/skycell.md	(revision 11658)
@@ -0,0 +1,24 @@
+# $Id: skycell.md,v 1.1 2007-02-06 02:30:45 jhoblitt Exp $
+
+SkyCell METADATA
+    skycell_id  STR         64      # Primary Key
+    tess_id     STR         64      # Primary Key
+    ra1         F64         0.0
+    decl1       F64         0.0
+    ra2         F64         0.0
+    decl2       F64         0.0
+    ra3         F64         0.0
+    decl3       F64         0.0
+    ra4         F64         0.0
+    decl4       F64         0.0
+END
+
+SkyCellMap METADATA
+    skycell_id  STR         64      # Primary Key
+    tess_id     STR         64      # Primary Key
+    exp_tag     STR         64      # Primary Key
+# class is not yet consistently carried through pXtools
+#    class       STR         64      # Primary Key
+    class_id    STR         64      # Primary Key
+END
+
