IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 22, 2013, 9:43:22 AM (13 years ago)
Author:
eugene
Message:

add dvopsps-based method to ingest detections; do not use foreign key constraint if using dvopsps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219/ippToPsps/jython/scratchdb.py

    r35007 r35016  
    485485       self.createIndex(self.dvoDetectionTable, "fileID")
    486486
    487        # now add a delete cascading foreign key constraint on fileID
    488        sql = "ALTER TABLE dvoDetectionFull \
     487       # XXX : this should be based on choice of useStilts (which is set in dvo.py and must be moved)
     488       if (False):
     489           # now add a delete cascading foreign key constraint on fileID
     490           sql = "ALTER TABLE dvoDetectionFull \
    489491              ADD CONSTRAINT fk_fileID \
    490492              FOREIGN KEY (fileID) \
    491493              REFERENCES dvoDone(id) \
    492494              ON DELETE CASCADE"
    493        try: self.execute(sql)
    494        except:
    495            self.logger.errorPair("Unable to create foreign key on", self.dvoDoneTable)
    496            return False
     495           try: self.execute(sql)
     496           except:
     497               self.logger.errorPair("Unable to create foreign key on", self.dvoDoneTable)
     498               return False
    497499
    498500       return True
Note: See TracChangeset for help on using the changeset viewer.