Changeset 35031
- Timestamp:
- Jan 23, 2013, 3:03:08 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121219/ippToPsps/jython/dvo.py
r35026 r35031 33 33 34 34 ''' 35 def __init__(self, logger, config, scratchDbName="ipptopsps_ scratch"):35 def __init__(self, logger, config, scratchDbName="ipptopsps_test_scratch"): 36 36 37 37 # set up logging … … 570 570 def nativeIngestDetections(self, raCenter, decCenter, boxSize): 571 571 572 # self.scratchDb.resetAllDvoTables() 572 # XXX put the chunk below in a separate method 573 574 # drop detections table 575 self.logger.infoPair("Dropping table", self.scratchDb.dvoDetectionTable) 576 self.scratchDb.dropTable(self.scratchDb.dvoDetectionTable) 577 578 # create detections table 579 self.logger.infoPair("Creating table", self.scratchDb.dvoDetectionTable) 580 sql = "CREATE TABLE " + self.scratchDb.dvoDetectionTable + " LIKE dvoDetection" 581 try: self.scratchDb.execute(sql) 582 except: 583 self.logger.errorPair("Unable to create table", self.scratchDb.dvoDetectionTable) 584 return False 585 self.scratchDb.changeEngineToInnoDB(self.scratchDb.dvoDetectionTable) 586 587 # add fileID column 588 sql = "ALTER TABLE " + self.scratchDb.dvoDetectionTable + " ADD fileID INT NOT NULL" 589 try: self.scratchDb.execute(sql) 590 except: 591 self.logger.errorPair("Unable to add fileID column to ", self.scratchDb.dvoDetectionTable) 592 return False 593 594 # add an index to the fileID column 595 self.scratchDb.createIndex(self.scratchDb.dvoDetectionTable, "fileID") 573 596 574 597 # make sure we have an up-to-date Images table
Note:
See TracChangeset
for help on using the changeset viewer.
