diff options
Diffstat (limited to 'velascobot2/database.py')
| -rw-r--r-- | velascobot2/database.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/velascobot2/database.py b/velascobot2/database.py index 582495f..156f1f5 100644 --- a/velascobot2/database.py +++ b/velascobot2/database.py @@ -241,6 +241,14 @@ class Database: ) return count + # I made an oopsie when converting the old jsons to sqlite. I will remove this in the next commit + def fix_all_chats(self): + with _SQLiteContextMgr(database=self.db_name) as db: + db.execute( + "UPDATE vocab SET key = ? WHERE key = ?", + ('', ' ') + ) + def get_all_chats(self) -> list[ChatData]: with _SQLiteContextMgr(database=self.db_name) as db: rows = db.execute("SELECT * FROM chats").fetchall() |
