StarsDB: run db correction on startup
This commit is contained in:
@@ -88,9 +88,16 @@ class StarDB():
|
||||
);""")
|
||||
|
||||
self.insertDefaultValues()
|
||||
self.dbCorrection()
|
||||
|
||||
self.connection.commit()
|
||||
|
||||
def dbCorrection(self):
|
||||
self.dbCursor.execute("""UPDATE TABLE starInfo
|
||||
SET spType = "-"
|
||||
WHERE spType IS NULL
|
||||
OR length(spType) = 0;""")
|
||||
|
||||
def insertDefaultValues(self):
|
||||
sources = ["TESS", "Kepler", "K2"]
|
||||
for s in sources:
|
||||
|
||||
Reference in New Issue
Block a user