IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 23, 2009, 10:22:33 AM (17 years ago)
Author:
bills
Message:

In distribution server merge rcDSProduct into rcDestination. It was illogical for
a product to be shared by multiple destinations.
In defineinterest define by query to allow destination names and target parameters
to be used. Much more administrator friendly.
Add a label to pstampRequest. Not used yet.
Split reverting of faults in distRuns from faults building components.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dbconfig/changes.txt

    r25421 r25493  
    12601260-- Vesion 1.1.56
    12611261
    1262 
     1262-- Merge the rcDSProduct and rcDestination tables
     1263
     1264ALTER TABLE rcDestination ADD COLUMN dbname varchar(64) AFTER last_fileset;
     1265ALTER TABLE rcDestination ADD COLUMN dbhost varchar(64) AFTER dbname;
     1266
     1267UPDATE rcDestination JOIN rcDSProduct USING(prod_id)
     1268    SET rcDestination.name = rcDSProduct.name,
     1269        rcDestination.dbname = rcDSProduct.dbname,
     1270        rcDestination.dbhost = rcDSProduct.dbhost;
     1271
     1272ALTER TABLE rcDestination DROP foreign key rcDestination_ibfk_1 ;
     1273ALTER TABLE rcDestination DROP key prod_id;
     1274ALTER TABLE rcDestination DROP COLUMN prod_id;
     1275
     1276-- change references to rcDSProduct in rcDSFileset to reference rcDestination
     1277
     1278ALTER TABLE rcDSFileset DROP foreign key rcDSFileset_ibfk_2;
     1279ALTER TABLE rcDSFileset DROP key prod_id;
     1280ALTER TABLE rcDSFileset CHANGE COLUMN prod_id dest_id BIGINT NOT NULL DEFAULT '0';
     1281ALTER TABLE rcDSFileset ADD KEY (dest_id);
     1282ALTER TABLE rcDSFileset ADD FOREIGN KEY (dest_id) REFERENCES rcDestination(dest_id);
     1283
     1284-- finally drop the obsolete table
     1285DROP TABLE rcDSProduct;
     1286
     1287-- The following changes should have been made to the gpc1 database ages ago
     1288-- do not apply if these columns exist
     1289ALTER TABLE pstampRequest DROP COLUMN outFileset;
     1290ALTER TABLE pstampRequest ADD COLUMN name VARCHAR(64) UNIQUE AFTER state;
     1291ALTER TABLE pstampRequest ADD COLUMN reqType VARCHAR(16) AFTER name;
     1292ALTER TABLE pstampRequest ADD COLUMN outProduct VARCHAR(64) after reqType;
     1293ALTER TABLE pstampRequest ADD COLUMN fault SMALLINT AFTER uri;
     1294-- end of old changes
     1295
     1296-- This change is new
     1297ALTER TABLE pstampRequest ADD COLUMN label VARCHAR(64) AFTER reqType;
Note: See TracChangeset for help on using the changeset viewer.