SQLite Database Corruption Issues in Home Assistant

I’ve been experiencing weekly SQLite database corruption in my Home Assistant setup, and it’s been quite frustrating. Despite upgrading to a Sandisk 128GB eMMC card and connecting a Sandisk X110 128GB SSD, the issue persists. I’ve even migrated the system to the SSD using a standard migration tool, but the corruption still occurs. The logs show errors like sqlite3.DatabaseError: database disk image is malformed, which forces the system to rename the corrupt database file and start fresh. While I manage to recover using daily backups, it’s not a sustainable solution. I’m hesitant to switch to MariaDB due to concerns about its reliability, and I don’t want to lose my history data. Has anyone else faced similar issues or found a workaround? Any insights would be greatly appreciated!