IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34911


Ignore:
Timestamp:
Jan 10, 2013, 5:17:45 PM (14 years ago)
Author:
bills
Message:

schema addtions for tables survey ippRelease and relExp

Location:
trunk/dbconfig
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dbconfig/changes.txt

    r34789 r34911  
    22652265ALTER TABLE skycalResult ADD column n_forced INT after n_extended;
    22662266UPDATE dbversion set schema_version = '1.1.73', updated= CURRENT_TIMESTAMP();
     2267
     2268
     2269-- new tables for managing the "release" of ipp data
     2270
     2271CREATE TABLE survey (
     2272    surveyID    INT(8),
     2273    surveyName  VARCHAR(16) NOT NULL,
     2274    description VARCHAR(255),
     2275    PRIMARY KEY(surveyID),
     2276    UNIQUE  KEY(surveyName)
     2277) ENGINE=InnoDB CHARSET=latin1;
     2278
     2279
     2280CREATE TABLE ippRelease (
     2281    rel_id      INT(8) AUTO_INCREMENT,
     2282    surveyID    INT(8),
     2283    releaseName VARCHAR(64),
     2284    state       VARCHAR(16),    -- active, pending archive drop
     2285    dataRelease INT(8),         -- PSPS dataRelease
     2286    PRIMARY KEY(rel_id),
     2287    KEY(releaseName),
     2288    KEY(state),
     2289    FOREIGN KEY(surveyID) REFERENCES survey(surveyID)
     2290) ENGINE=Innodb DEFAULT CHARSET=latin1;
     2291
     2292CREATE TABLE relExp (
     2293    relexp_id   BIGINT AUTO_INCREMENT,
     2294    rel_id      INT(8),
     2295    exp_id      BIGINT,
     2296    chip_id     BIGINT,         -- links to the runs that supplied the data
     2297    cam_id      BIGINT,         -- for this release
     2298    state       VARCHAR(16),    -- released, pending, archive, drop 
     2299    flags       INT UNSIGNED,   -- flags for relphot, relastro, ??
     2300    zpt_obs     FLOAT,          -- calibrated zero point for this release of
     2301    zpt_stdev   FLOAT,          -- this exposure
     2302    path_base   VARCHAR(255),   -- path_base of any supporting files for this
     2303                                -- release of this exposure.
     2304    registered  DATETIME,       -- insertion time for this row
     2305    time_stamp  DATETIME,       -- time of last update for this row
     2306    PRIMARY KEY (relexp_id),
     2307    FOREIGN KEY(rel_id) REFERENCES ippRelease(rel_id),
     2308    KEY (state),
     2309    FOREIGN KEY(exp_id) REFERENCES rawExp(exp_id),
     2310    FOREIGN KEY(chip_id) REFERENCES chipRun(chip_id),
     2311    FOREIGN KEY(cam_id) REFERENCES camRun(cam_id)
     2312) ENGINE=innodb DEFAULT CHARSET=latin1;
     2313
     2314UPDATE dbversion set schema_version = '1.1.74', updated= CURRENT_TIMESTAMP();
  • trunk/dbconfig/ipp.m4

    r33720 r34911  
    3939include(vp.md)
    4040include(skycell.md)
     41include(release.md)
Note: See TracChangeset for help on using the changeset viewer.