IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32192


Ignore:
Timestamp:
Aug 25, 2011, 1:05:26 PM (15 years ago)
Author:
rhenders
Message:

primary key on StackDetection is now on objID only; duplicates will be rejected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/stackbatch.py

    r32166 r32192  
    385385        self.updateStackTypeID("StackDetection")
    386386        self.updateDvoIDs("StackDetection")
    387         sql = "ALTER TABLE StackDetection ADD PRIMARY KEY (objID, stackDetectID)"
    388         self.scratchDb.execute(sql)
    389 
     387        sql = "ALTER IGNORE TABLE StackDetection ADD PRIMARY KEY (objID)"
     388        self.scratchDb.execute(sql)
     389 
    390390        if self.stackType == "DEEP_STACK":
    391391
     
    394394                   SET instFlux = 2*b.PSF_INST_FLUX_SIG \
    395395                   WHERE instFlux IS NULL \
     396                   AND a.ippDetectID = b.IPP_IDET  \
    396397                   AND b.PSF_INST_FLUX_SIG IS NOT NULL"
    397398            self.scratchDb.execute(sql)
    398             #    instFlux = 2*PSF_INST_FLUX_SIG
    399399           
    400400        self.scratchDb.reportAndDeleteRowsWithNULLS("StackDetection", "instFlux")
     
    591591        imageID = self.scratchDb.getImageIDFromExternID(self.header['SOURCEID'], self.header['IMAGEID'])
    592592        self.logger.debug("Updating table '" + table + "' with DVO IDs...")
    593         sql = "UPDATE IGNORE " + table + " AS a, " + self.scratchDb.dvoDetectionTable + " AS b SET \
     593        sql = "UPDATE " + table + " AS a, " + self.scratchDb.dvoDetectionTable + " AS b SET \
    594594               a.ippObjID = b.ippObjID, \
    595595               a.stackDetectID = b.detectID, \
Note: See TracChangeset for help on using the changeset viewer.