Migration Guide
How to upgrade DefenSys between versions. Follow these steps when moving to a newer release.
General Steps
- Backup: Copy
db/defensys.dband any custom config or rules. - Stop the app: Fully exit DefenSys before upgrading.
- Install new version: Run the new installer or replace the app files.
- Database: New versions may add tables or columns. The app typically runs migrations on startup. If you see schema errors, you may need to delete the DB and start fresh (data loss).
Database Migrations
DefenSys uses CREATE TABLE IF NOT EXISTS and sometimesALTER TABLE ... ADD COLUMN. If a migration fails:
- Check the error message for the specific table/column
- Backup the DB, then try deleting it to let the app recreate
- Report schema issues for future migration scripts
Settings
User settings are stored in the database or app config. They usually persist across upgrades. If settings reset, re-apply from backup or reconfigure.
ML Models
Models in ml/models/ are versioned by filename (e.g.model_latest.json). New training may produce new files. Old models are typically still readable; retrain if the feature set changed.
Breaking Changes
Major version bumps may introduce breaking changes. Check the Changelog for the target version and any migration notes.