Index: trunk/ippTools/share/pxadmin_create_tables.sql
===================================================================
--- trunk/ippTools/share/pxadmin_create_tables.sql	(revision 35150)
+++ trunk/ippTools/share/pxadmin_create_tables.sql	(revision 35153)
@@ -1792,4 +1792,5 @@
     chip_bg_id BIGINT AUTO_INCREMENT, -- unique identifier
     chip_id BIGINT NOT NULL,          -- link to chipRun
+    cam_id BIGINT DEFAULT 0,          -- optional link to camRun
     state VARCHAR(64) NOT NULL,       -- state of run (new, full, etc.)
     workdir VARCHAR(255) NOT NULL,    -- working directory
@@ -1845,5 +1846,4 @@
     dist_group VARCHAR(64),           -- group for distribution
     reduction VARCHAR(64),            -- reduction class (for altering recipe)
-    alt_cam_label VARCHAR(64),        -- label for alternate version of astrometry (optional)
     note VARCHAR(255),        -- note
     registered TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- time run was registered
@@ -2198,6 +2198,7 @@
     relstack_id BIGINT AUTO_INCREMENT,
     rel_id      INT(8),
+    stack_id    BIGINT,         -- id of the stackRun
     skycal_id   BIGINT,         -- id of the sky calibration run that supplied the calibration
-                                -- for this release. We get back to stack from here
+                                -- for this release of this skycell.
     skycell_id  varchar(64),
     tess_id     varchar(64),
@@ -2215,5 +2216,5 @@
     KEY (rel_id, tess_id, skycell_id),
     FOREIGN KEY(rel_id) REFERENCES ippRelease(rel_id),
-    FOREIGN KEY(skycal_id) REFERENCES skycalRun(skycal_id)
+    FOREIGN KEY(stack_id) REFERENCES stackRun(stack_id)
 ) ENGINE=innodb DEFAULT CHARSET=latin1;
 
