IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28488


Ignore:
Timestamp:
Jun 24, 2010, 3:27:40 PM (16 years ago)
Author:
Paul Price
Message:

Adding column 'magicked' to diffPhotRun.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/dbconfig/changes.txt

    r28486 r28488  
    18641864    registered TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- time run was registered
    18651865    note VARCHAR(255),             -- note
     1866    magicked BIGINT NOT NULL DEFAULT 0, -- magic mask applied
    18661867    PRIMARY KEY(diff_phot_id),
    18671868    KEY(diff_id),
  • trunk/dbconfig/diffphot.md

    r28428 r28488  
    1010    registered      TAI         NULL
    1111    note            STR         255
     12    magicked        S64         0
    1213END
    1314
  • trunk/ippTools/share/diffphottool_advance.sql

    r28429 r28488  
    11SELECT
    2     diff_phot_id
     2    diff_phot_id,
     3    diffPhotSkyfile.magicked
    34FROM diffPhotRun
    45JOIN diffSkyfile USING(diff_id)
  • trunk/ippTools/src/diffphottool.c

    r28428 r28488  
    177177                                                  set_reduction ? set_reduction : reduction,
    178178                                                  registered,
    179                                                   set_note ? set_note : note);
     179                                                  set_note ? set_note : note, 0);
    180180        if (!diffPhotRunInsertObject(config->dbh, run)) {
    181181            psError(psErrorCodeLast(), false, "database error");
     
    430430        psMetadata *row = output->data[i]; // Row of interest
    431431        psS64 diff_phot_id = psMetadataLookupS64(NULL, row, "diff_phot_id");
    432 
    433         const char *query = "UPDATE diffPhotRun SET state = 'full' WHERE diff_phot_id = %" PRId64;
    434         if (!p_psDBRunQueryF(config->dbh, query, diff_phot_id)) {
     432        psS64 magicked = psMetadataLookupS64(NULL, row, "magicked");
     433
     434        const char *query = "UPDATE diffPhotRun SET state = 'full', magicked = %" PRId64
     435            " WHERE diff_phot_id = %" PRId64;
     436        if (!p_psDBRunQueryF(config->dbh, query, magicked, diff_phot_id)) {
    435437            psError(psErrorCodeLast(), false,
    436438                    "failed to change state for diff_phot_id %" PRId64, diff_phot_id);
Note: See TracChangeset for help on using the changeset viewer.