IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24373


Ignore:
Timestamp:
Jun 10, 2009, 3:31:16 PM (17 years ago)
Author:
Paul Price
Message:

Working on defining new tables for automatically publishing detections (e.g., for MOPS).

Location:
branches/pap_mops
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_mops/ippTools/share/pxadmin_create_tables.sql

    r24177 r24373  
    13681368
    13691369
     1370
     1371-- Tables to support publishing of detections to a Science Client
     1372
     1373-- Clients to which we send stuff
     1374CREATE TABLE publishClient (
     1375    client_id BIGINT AUTO_INCREMENT, -- unique identifier
     1376    comment VARCHAR(255),            -- for human memory
     1377    stage VARCHAR(64),               -- stage of interest (chip, camera, diff, etc.)
     1378    format VARCHAR(64),              -- format of data
     1379    destination VARCHAR(255),        -- where to send data
     1380    PRIMARY KEY(client_id)
     1381) ENGINE=innodb DEFAULT CHARSET=latin1;
     1382
     1383-- Publishing a set
     1384CREATE TABLE publishRun (
     1385    pub_id BIGINT AUTO_INCREMENT, -- unique identifier
     1386    client_id BIGINT,             -- link to publishClient
     1387    stage_id BIGINT,              -- link to various stage tables
     1388    PRIMARY KEY(pub_id),
     1389    KEY(client_id),
     1390    KEY(stage_id),
     1391    FOREIGN KEY(client_id) REFERENCES publishClient(client_id)
     1392) ENGINE=innodb DEFAULT CHARSET=latin1;
     1393
     1394CREATE TABLE publishFile (
     1395    pub_id BIGINT AUTO_INCREMENT, -- link to publishRun
     1396    component VARCHAR(64),        --
     1397
     1398
     1399
     1400publishClient   METADATA
     1401    client_id   S64         0       # Primary Key AUTO_INCREMENT
     1402    comment     STR         255
     1403    stage       STR         64
     1404    format      STR         64
     1405    destination STR         255
     1406END
     1407
     1408publishRun      METADATA
     1409    pub_id      S64         0       # Primary Key AUTO_INCREMENT
     1410    client_id   S64         0
     1411    stage_id    S64         0
     1412    state       STR         64
     1413END
     1414
     1415publishFile     METADATA
     1416    pub_id      S64         0       # Primary Key
     1417    component   STR         64      # Primary Key
     1418    fault       S16         0
     1419END
     1420
     1421
     1422
     1423
    13701424-- This comment line is here to avoid empty query error.
    13711425-- Another way to avoid that problem is to omit the semicolon above but I think that is untidy.
Note: See TracChangeset for help on using the changeset viewer.