IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 10, 2013, 5:19:51 PM (13 years ago)
Author:
bills
Message:

add survey ippRelease, and relExp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/pxadmin_create_tables.sql

    r34800 r34912  
    21482148) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    21492149
     2150CREATE TABLE survey (
     2151    surveyID    INT(8),
     2152    surveyName  VARCHAR(16) NOT NULL,
     2153    description VARCHAR(255),
     2154    PRIMARY KEY(surveyID),
     2155    UNIQUE  KEY(name)
     2156) ENGINE=InnoDB CHARSET=latin1;
     2157
     2158
     2159CREATE TABLE ippRelease (
     2160    rel_id      INT(8) AUTO_INCREMENT,
     2161    surveyID    INT(8),
     2162    releaseName VARCHAR(64),
     2163    state       VARCHAR(16),    -- active, pending archive drop
     2164    dataRelease INT(8),         -- PSPS dataRelease
     2165    PRIMARY KEY(rel_id),
     2166    KEY(releaseName),
     2167    KEY(state),
     2168    FOREIGN KEY(surveyID) REFERENCES survey(surveyID)
     2169) ENGINE=Innodb DEFAULT CHARSET=latin1;
     2170
     2171CREATE TABLE relExp (
     2172    relexp_id   BIGINT AUTO_INCREMENT,
     2173    rel_id      INT(8),
     2174    exp_id      BIGINT,
     2175    chip_id     BIGINT,         -- links to the runs that supplied the data
     2176    cam_id      BIGINT,         -- for this release
     2177    state       VARCHAR(16),    -- released, pending, archive, drop 
     2178    flags       INT UNSIGNED,   -- flags for relphot, relastro, ??
     2179    zpt_obs     FLOAT,          -- calibrated zero point for this release of
     2180    zpt_stdev   FLOAT,          -- this exposure
     2181    path_base   VARCHAR(255),   -- path_base of any supporting files for this
     2182                                -- release of this exposure.
     2183    registered  DATETIME,       -- insertion time for this row
     2184    time_stamp  DATETIME,       -- time of last update for this row
     2185    PRIMARY KEY (relexp_id),
     2186    FOREIGN KEY(rel_id) REFERENCES ippRelease(rel_id),
     2187    KEY (state),
     2188    FOREIGN KEY(exp_id) REFERENCES rawExp(exp_id),
     2189    FOREIGN KEY(chip_id) REFERENCES chipRun(chip_id),
     2190    FOREIGN KEY(cam_id) REFERENCES camRun(cam_id)
     2191) ENGINE=innodb DEFAULT CHARSET=latin1;
     2192
    21502193
    21512194-- This comment line is here to avoid empty query error.
Note: See TracChangeset for help on using the changeset viewer.