StarsDB: run db correction on startup

This commit is contained in:
2024-05-22 14:12:10 +02:00
parent e32b3d8df1
commit d3493c5fbd
+7
View File
@@ -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: