0.4.2 - Early implementation of SLMs. WIP.

This commit is contained in:
serversdwn
2026-01-06 07:50:58 +00:00
parent 96cb27ef83
commit 4d74eda65f
36 changed files with 4211 additions and 12 deletions

View File

@@ -0,0 +1,62 @@
# Fix DEV Database Permissions
## The Problem
SQLite needs write access to both the database file AND the directory it's in (to create temporary files like journals and WAL files).
Currently:
- ✅ Database file: `data-dev/seismo_fleet.db` - permissions fixed
- ❌ Directory: `data-dev/` - still owned by root
## The Fix
Run this command to fix the directory ownership:
```bash
sudo chown -R serversdown:serversdown /home/serversdown/sfm/seismo-fleet-manager/data-dev/
```
Then run the migration again:
```bash
python3 scripts/migrate_dev_db.py
```
## Full Setup Commands
Here's the complete sequence:
```bash
cd /home/serversdown/sfm/seismo-fleet-manager
# Fix directory ownership (includes all files inside)
sudo chown -R serversdown:serversdown data-dev/
# Migrate schema
python3 scripts/migrate_dev_db.py
# Add test data
python3 scripts/add_test_slms.py
python3 scripts/add_test_modems.py
```
## Verify It Worked
After running the migration, you should see:
```
Migrating DEV database to add SLM columns...
============================================================
✓ Added column: slm_host
✓ Added column: slm_tcp_port
✓ Added column: slm_model
✓ Added column: slm_serial_number
✓ Added column: slm_frequency_weighting
✓ Added column: slm_time_weighting
✓ Added column: slm_measurement_range
✓ Added column: slm_last_check
============================================================
DEV database migration completed!
```
Then the test data scripts should work without errors!