Index: trunk/dbconfig/changes.txt
===================================================================
--- trunk/dbconfig/changes.txt	(revision 24487)
+++ trunk/dbconfig/changes.txt	(revision 24512)
@@ -1128,2 +1128,36 @@
 
 ALTER TABLE warpRun ADD COLUMN reduction VARCHAR(64) AFTER tess_id;
+
+-- Tables to support publishing of detections to a Science Client
+-- Clients to which we send stuff
+CREATE TABLE publishClient (
+    client_id BIGINT AUTO_INCREMENT, -- unique identifier
+    product VARCHAR(64),             -- product name
+    stage VARCHAR(64) NOT NULL, -- stage of interest (chip, camera, diff, etc.)
+    workdir VARCHAR(255) NOT NULL, -- working directory
+    comment VARCHAR(255),            -- for human memory
+    PRIMARY KEY(client_id)
+) ENGINE=innodb DEFAULT CHARSET=latin1;
+-- Publishing a set of data (e.g., a specific diffRun)
+CREATE TABLE publishRun (
+    pub_id BIGINT AUTO_INCREMENT, -- unique identifier
+    client_id BIGINT NOT NULL,  -- link to publishClient
+    stage_id BIGINT NOT NULL,   -- link to various stage tables
+    label VARCHAR(64),          -- label for run
+    state VARCHAR(64),          -- state of run (new, full, etc.)
+    PRIMARY KEY(pub_id),
+    KEY(client_id),
+    KEY(stage_id),
+    KEY(label),
+    KEY(state),
+    FOREIGN KEY(client_id) REFERENCES publishClient(client_id)
+) ENGINE=innodb DEFAULT CHARSET=latin1;
+-- Publishing a file within a set
+CREATE TABLE publishDone (
+    pub_id BIGINT AUTO_INCREMENT, -- link to publishRun
+    path_base VARCHAR(255),     -- base path of output
+    fault SMALLINT NOT NULL DEFAULT 0, -- Fault code
+    PRIMARY KEY(pub_id),
+    KEY(fault),
+    FOREIGN KEY(pub_id) REFERENCES publishRun(pub_id)
+) ENGINE=innodb DEFAULT CHARSET=latin1;
Index: trunk/dbconfig/ipp.m4
===================================================================
--- trunk/dbconfig/ipp.m4	(revision 24487)
+++ trunk/dbconfig/ipp.m4	(revision 24512)
@@ -26,2 +26,3 @@
 include(rc.md)
 include(receive.md)
+include(publish.md)
Index: trunk/dbconfig/publish.md
===================================================================
--- trunk/dbconfig/publish.md	(revision 24512)
+++ trunk/dbconfig/publish.md	(revision 24512)
@@ -0,0 +1,23 @@
+# Tables for publishing data to a science client
+
+publishClient   METADATA 
+    client_id   S64         0       # Primary Key AUTO_INCREMENT
+    product     STR	    64
+    stage	STR	    64
+    workdir     STR	    255
+    comment     STR         255
+END
+
+publishRun	METADATA
+    pub_id      S64         0       # Primary Key AUTO_INCREMENT
+    client_id   S64         0
+    stage_id    S64         0
+    label       STR         64
+    state       STR         64
+END
+
+publishDone	METADATA
+    pub_id      S64         0       # Primary Key
+    path_base	STR	    255
+    fault	S16	    0
+END
