Index: trunk/dbconfig/changes.txt
===================================================================
--- trunk/dbconfig/changes.txt	(revision 34911)
+++ trunk/dbconfig/changes.txt	(revision 35048)
@@ -2282,5 +2282,5 @@
     surveyID    INT(8),
     releaseName VARCHAR(64),
-    state       VARCHAR(16),    -- active, pending archive drop 
+    release_state VARCHAR(16),    -- active, pending archive drop 
     dataRelease INT(8),         -- PSPS dataRelease
     PRIMARY KEY(rel_id),
@@ -2312,3 +2312,26 @@
 ) ENGINE=innodb DEFAULT CHARSET=latin1;
 
+CREATE TABLE relStack (
+    relstack_id BIGINT AUTO_INCREMENT,
+    rel_id      INT(8),
+    skycal_id   BIGINT,         -- id of the sky calibration run that supplied the calibration
+                                -- for this release. We get back to stack from here
+    skycell_id  varchar(64),
+    tess_id     varchar(64),
+    state       VARCHAR(16),    -- released, pending, archive, drop  
+    flags       INT UNSIGNED,
+    stack_type  VARCHAR(16),    -- nightly, deep, reference
+    zpt_obs     FLOAT,          -- calibrated zero point for this release of this skycell
+    zpt_stdev   FLOAT,
+    fwhm_major  FLOAT,          -- seeing as measured by staticsky
+    path_base   VARCHAR(255),   -- path_base of any supporting files,
+    registered  DATETIME,
+    time_stamp  DATETIME,
+    PRIMARY KEY (relstack_id),
+    KEY (tess_id, skycell_id),
+    KEY (rel_id, tess_id, skycell_id),
+    FOREIGN KEY(rel_id) REFERENCES ippRelease(rel_id),
+    FOREIGN KEY(skycal_id) REFERENCES skycalRun(skycal_id)
+) ENGINE=innodb DEFAULT CHARSET=latin1;
+
 UPDATE dbversion set schema_version = '1.1.74', updated= CURRENT_TIMESTAMP();
