Index: trunk/dbconfig/changes.txt
===================================================================
--- trunk/dbconfig/changes.txt	(revision 19558)
+++ trunk/dbconfig/changes.txt	(revision 19620)
@@ -469,2 +469,22 @@
 update fakeProcessedImfile set data_state ='full';
 
+-- adding ref_det_id and ref_iter to detRun and detResidImfile
+
+ALTER TABLE detResidImfile add column ref_det_id bigint after iteration;
+ALTER TABLE detResidImfile add column ref_iter int after iteration;
+
+ALTER TABLE detResidImfile add column ref_det_id bigint after iteration;
+ALTER TABLE detResidImfile add column ref_iter int after iteration;
+
+ALTER TABLE detRun change column parent ref_det_id bigint;
+ALTER TABLE detRun add column ref_iter int after ref_det_id;
+
+-- XXX need to change the foreign key constraints on detResidImfile:
+-- This
+--    FOREIGN KEY (det_id, iteration)
+--    REFERENCES  detNormalizedExp(det_id, iteration)
+-- Becomes:
+--    FOREIGN KEY (ref_det_id, ref_iter)
+--    REFERENCES  detNormalizedExp(det_id, iteration)
+
+-- XXX Need to population ref_det_id with the contents of det_id for detRun.mode == 'master'
