Index: /branches/eam_branches/ipp-20121219/ippToPsps/jython/dvo.py
===================================================================
--- /branches/eam_branches/ipp-20121219/ippToPsps/jython/dvo.py	(revision 35041)
+++ /branches/eam_branches/ipp-20121219/ippToPsps/jython/dvo.py	(revision 35042)
@@ -621,7 +621,4 @@
         p.wait()
 
-        sql = "alter table dvoDetectionFull add key (objID, detectID)"
-        self.scratchDb.execute(sql)
-
         # update lists after attempted sync
         # self.printSummary()
Index: /branches/eam_branches/ipp-20121219/ippToPsps/jython/scratchdb.py
===================================================================
--- /branches/eam_branches/ipp-20121219/ippToPsps/jython/scratchdb.py	(revision 35041)
+++ /branches/eam_branches/ipp-20121219/ippToPsps/jython/scratchdb.py	(revision 35042)
@@ -340,9 +340,12 @@
             rs.first()
             if rs.getInt(1) < 50:
+                # print "bad astromety"
                 self.logger.debug("Bad astrometric solution for",  ota)
                 return False
             else:
+                # print "good astromety"
                 return True
         except:
+            # print "query failed"
             self.logger.debug("Unable to check astrometric solution")
             return False
@@ -401,6 +404,7 @@
                raErr REAL, \
                decErr REAL, \
-               PRIMARY KEY (imageID, ippDetectID) \
-               )"
+               PRIMARY KEY (imageID, ippDetectID), \
+               KEY (objID, detectID) \
+             )"
 
         try: self.execute(sql)
