IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35227 for trunk/dbconfig


Ignore:
Timestamp:
Mar 4, 2013, 2:08:07 PM (13 years ago)
Author:
bills
Message:

updates to release tables. This version was used to create the
tables in gpc1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dbconfig/changes.txt

    r35196 r35227  
    22722272UPDATE dbversion set schema_version = '1.1.74', updated= CURRENT_TIMESTAMP();
    22732273
     2274
     2275-- Note the following 3 changes were implemented in the ipp-20121218 tag
     2276-- without changing the schema_version from 1.1.74
     2277
     2278-- Add cam_id to chipBackgroundRun
     2279ALTER TABLE chipBackgroundRun ADD COLUMN cam_id BIGINT DEFAULT 0 AFTER chip_id;
     2280
     2281-- add fwhm measuements to skycalResult
     2282ALTER TABLE skycalResult ADD COLUMN fwhm_major FLOAT AFTER zpt_stdev;
     2283ALTER TABLE skycalResult ADD COLUMN fwhm_minor FLOAT AFTER fwhm_major;
     2284
    22742285-- new tables for managing the "release" of ipp data
    22752286
    22762287CREATE TABLE survey (
    2277     surveyID    INT(8),
     2288    surveyID    INT,
    22782289    surveyName  VARCHAR(16) NOT NULL,
    22792290    description VARCHAR(255),
     
    22822293) ENGINE=InnoDB CHARSET=latin1;
    22832294
    2284 
    22852295CREATE TABLE ippRelease (
    2286     rel_id      INT(8) AUTO_INCREMENT,
    2287     surveyID    INT(8),
    2288     releaseName VARCHAR(64),
    2289     release_state VARCHAR(16),    -- active, pending archive drop
    2290     dataRelease INT(8),         -- PSPS dataRelease
     2296    rel_id      INT AUTO_INCREMENT,
     2297    surveyID    INT,
     2298    release_name VARCHAR(64),
     2299    release_state VARCHAR(16),   -- active, pending, archive, drop
     2300    dataRelease INT,         -- PSPS dataRelease
     2301    priority    INT,
    22912302    PRIMARY KEY(rel_id),
    2292     KEY(releaseName),
    2293     KEY(state),
     2303    KEY(release_name),
     2304    KEY(release_state),
     2305    KEY(priority),
    22942306    FOREIGN KEY(surveyID) REFERENCES survey(surveyID)
    22952307) ENGINE=Innodb DEFAULT CHARSET=latin1;
     
    22972309CREATE TABLE relExp (
    22982310    relexp_id   BIGINT AUTO_INCREMENT,
    2299     rel_id      INT(8),
     2311    rel_id      INT,
    23002312    exp_id      BIGINT,
    23012313    chip_id     BIGINT,         -- links to the runs that supplied the data
    23022314    cam_id      BIGINT,         -- for this release
     2315    group_id    INT,         -- id of relGroup that this exposure is contained in
    23032316    state       VARCHAR(16),    -- released, pending, archive, drop 
    2304     flags       INT UNSIGNED,   -- flags for relphot, relastro, ??
     2317    flags       INT UNSIGNED,  -- flags for relphot, relastro, ??
    23052318    zpt_obs     FLOAT,          -- calibrated zero point for this release of
    23062319    zpt_stdev   FLOAT,          -- this exposure
     
    23212334CREATE TABLE relStack (
    23222335    relstack_id BIGINT AUTO_INCREMENT,
    2323     rel_id      INT(8),
     2336    rel_id      INT,
    23242337    stack_id    BIGINT,         -- id of the stackRun
    23252338    skycal_id   BIGINT,         -- id of the sky calibration run that supplied the calibration
     
    23332346    zpt_obs     FLOAT,          -- calibrated zero point for this release of this skycell
    23342347    zpt_stdev   FLOAT,
    2335     mjd_obs     INT UNSIGNED,   -- for nightly stacks the mjd_obs
     2348    mjd_obs     INT UNSIGNED,   -- for nightly stacks the mjd_obs, zero for deep and reference
    23362349    path_base   VARCHAR(255),   -- path_base of any supporting files,
    23372350    fault SMALLINT NOT NULL,
     
    23492362) ENGINE=innodb DEFAULT CHARSET=latin1;
    23502363
    2351 -- Add cam_id to chipBackgroundRun
    2352 ALTER TABLE chipBackgroundRun ADD COLUMN cam_id BIGINT DEFAULT 0 AFTER chip_id;
    2353 
    2354 ALTER TABLE skycalResult ADD COLUMN fwhm_major FLOAT AFTER zpt_stdev;
    2355 ALTER TABLE skycalResult ADD COLUMN fwhm_minor FLOAT AFTER fwhm_major;
     2364CREATE TABLE relGroup (
     2365    group_id    INT AUTO_INCREMENT,
     2366    rel_id      INT,
     2367    group_type  VARCHAR(16),
     2368    lap_id      BIGINT,
     2369    group_name  VARCHAR(16),
     2370    state       VARCHAR(16),    -- new full
     2371    label       VARCHAR(64),
     2372    exp_list_path   VARCHAR(255),
     2373    fault SMALLINT NOT NULL,
     2374    registered  DATETIME,
     2375    PRIMARY KEY (group_id),
     2376    KEY (rel_id, group_name),
     2377    KEY (group_type),
     2378    KEY (lap_id),
     2379    KEY (group_name),
     2380    KEY (state),
     2381    KEY (label),
     2382    KEY (fault),
     2383    FOREIGN KEY(rel_id) REFERENCES ippRelease(rel_id)
     2384) ENGINE=innodb DEFAULT CHARSET=latin1;
     2385
     2386-- new table grouping multi filter lap runs into a group. This is used to
     2387-- determine when all 5 filters for a projection cell have completed processing
     2388CREATE TABLE lapGroup  (
     2389    seq_id  BIGINT,
     2390    projection_cell VARCHAR(64),
     2391    state   VARCHAR(16),
     2392    fault   SMALLINT,
     2393    PRIMARY KEY(seq_id, projection_cell),
     2394    KEY(state),
     2395    KEY(fault),
     2396    FOREIGN KEY(seq_id) REFERENCES lapSequence(seq_id)
     2397) ENGINE=innodb DEFAULT CHARSET=latin1;
    23562398
    23572399UPDATE dbversion set schema_version = '1.1.75', updated= CURRENT_TIMESTAMP();
     2400
Note: See TracChangeset for help on using the changeset viewer.