Before swapping in a restored database, run PRAGMA integrity_check and verify the five core TREK tables (users, trips, trip_members, places, days) are present. This blocks restoring corrupt, empty, or unrelated SQLite files that would otherwise crash the app immediately after swap, and prevents a malicious admin from hot-swapping a crafted database with forged users or permissions.