Corrupt database shows blank results - KhalisFoundation/sttm-desktop GitHub Wiki

Issue: We were switching database to use SkySql and when running scripts to push new database to STTM Desktop users, there was an issue with the new file. The corrupt new file was pushed to all desktop users as a database update and thus broke the application not allowing them to search or view Baanis in Sunder Gutka.

Observations:

The desktop app uses the following files:-

image

sttmdesktop-evergreen.zip (zip file that the app downloads) sttmdesktop-evergreen.realm (database) realm-schema-evergreen.json sttmdesktop.md5 (to run checksum)

These are stored on server under /home/khajana/www/databases/

These are created when running /home/khajana/sttmdesktop.sh (which utilizes sttmdesktop.php)

Replace these files from a backup (eg. /backup/weekly/2022-10-02/accounts/khajana/homedir/www/databases).

Get uses to open desktop app, download database, re-open app.