enh: reset models

This commit is contained in:
Timothy Jaeryang Baek
2024-11-19 11:03:36 -08:00
parent d76e1319ff
commit 81bb2750e0
5 changed files with 92 additions and 5 deletions
@@ -257,5 +257,15 @@ class ModelsTable:
except Exception:
return False
def delete_all_models(self) -> bool:
try:
with get_db() as db:
db.query(Model).delete()
db.commit()
return True
except Exception:
return False
Models = ModelsTable()