1
This commit is contained in:
Regular → Executable
+42
-1
@@ -144,14 +144,55 @@ ALTER TABLE benchmarks ADD COLUMN network_results_json TEXT;
|
||||
|
||||
**Script d'application** : `backend/apply_migration_002.py`
|
||||
|
||||
### 4. Migration SQL (nouveau score CPU)
|
||||
|
||||
**Fichier** : `backend/migrations/003_add_cpu_scores.sql`
|
||||
```sql
|
||||
ALTER TABLE benchmarks ADD COLUMN cpu_score_single FLOAT;
|
||||
ALTER TABLE benchmarks ADD COLUMN cpu_score_multi FLOAT;
|
||||
```
|
||||
|
||||
**Script d'application** : `backend/apply_migration_003.py`
|
||||
|
||||
### 5. Migration SQL (métadonnées hardware supplémentaires)
|
||||
|
||||
**Fichier** : `backend/migrations/004_add_snapshot_details.sql`
|
||||
```sql
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN hostname VARCHAR(255);
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN desktop_environment VARCHAR(100);
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN pci_devices_json TEXT;
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN usb_devices_json TEXT;
|
||||
```
|
||||
|
||||
**Script d'application** : `backend/apply_migration_004.py`
|
||||
|
||||
### 6. Migration SQL (session Wayland/X11, batterie, uptime)
|
||||
|
||||
**Fichier** : `backend/migrations/005_add_os_display_and_battery.sql`
|
||||
```sql
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN screen_resolution VARCHAR(50);
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN display_server VARCHAR(50);
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN session_type VARCHAR(50);
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN last_boot_time VARCHAR(50);
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN uptime_seconds INTEGER;
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN battery_percentage FLOAT;
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN battery_status VARCHAR(50);
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN battery_health VARCHAR(50);
|
||||
```
|
||||
|
||||
**Script d'application** : `backend/apply_migration_005.py`
|
||||
|
||||
## Déploiement
|
||||
|
||||
Pour appliquer les mises à jour :
|
||||
|
||||
### 1. Appliquer la migration 002
|
||||
### 1. Appliquer les migrations 002, 003, 004 et 005
|
||||
```bash
|
||||
cd backend
|
||||
python3 apply_migration_002.py
|
||||
python3 apply_migration_003.py
|
||||
python3 apply_migration_004.py
|
||||
python3 apply_migration_005.py
|
||||
```
|
||||
|
||||
### 2. Redémarrer le backend
|
||||
|
||||
Reference in New Issue
Block a user