add go bench client
This commit is contained in:
5
backend/migrations/012_add_pci_device_id.sql
Normal file
5
backend/migrations/012_add_pci_device_id.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Migration 012: Add pci_device_id field to peripherals table
|
||||
-- Date: 2026-01-05
|
||||
-- Description: Add PCI device ID field (vendor:device format, e.g., 10ec:8168)
|
||||
|
||||
ALTER TABLE peripherals ADD COLUMN pci_device_id VARCHAR(20);
|
||||
10
backend/migrations/013_add_device_id.sql
Normal file
10
backend/migrations/013_add_device_id.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Migration 013: Add generic device_id field
|
||||
-- This field stores the physical identifier of the device:
|
||||
-- - For PCI devices: the slot (e.g., "08:00.0")
|
||||
-- - For USB devices: the bus-device (e.g., "001-004")
|
||||
-- - For other devices: any relevant identifier
|
||||
|
||||
ALTER TABLE peripherals ADD COLUMN device_id VARCHAR(50);
|
||||
|
||||
-- Add index for faster lookups
|
||||
CREATE INDEX idx_peripherals_device_id ON peripherals(device_id);
|
||||
7
backend/migrations/014_add_pci_slot.sql
Normal file
7
backend/migrations/014_add_pci_slot.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- Migration 014: Add pci_slot field
|
||||
-- This field stores the PCI slot identifier (e.g., "08:00.0")
|
||||
|
||||
ALTER TABLE peripherals ADD COLUMN pci_slot VARCHAR(20);
|
||||
|
||||
-- Add index for faster lookups
|
||||
CREATE INDEX idx_peripherals_pci_slot ON peripherals(pci_slot);
|
||||
8
backend/migrations/015_add_utilisation.sql
Normal file
8
backend/migrations/015_add_utilisation.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- Migration 015: Add utilisation field
|
||||
-- This field stores the host/device where the peripheral is used
|
||||
-- Can be a reference to a host in host.yaml or "non-utilisé"
|
||||
|
||||
ALTER TABLE peripherals ADD COLUMN utilisation VARCHAR(255);
|
||||
|
||||
-- Add index for faster lookups
|
||||
CREATE INDEX idx_peripherals_utilisation ON peripherals(utilisation);
|
||||
7
backend/migrations/016_add_ram_max_capacity.sql
Normal file
7
backend/migrations/016_add_ram_max_capacity.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- Migration 016: Ajout du champ ram_max_capacity_mb
|
||||
-- Date: 2026-01-10
|
||||
-- Description: Ajoute la capacité maximale de RAM supportée par la carte mère
|
||||
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN ram_max_capacity_mb INTEGER;
|
||||
|
||||
-- Note: Peut être NULL pour les snapshots existants
|
||||
9
backend/migrations/017_add_proxmox_fields.sql
Normal file
9
backend/migrations/017_add_proxmox_fields.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Migration 017: Ajout des champs Proxmox
|
||||
-- Date: 2026-01-10
|
||||
-- Description: Ajoute des champs pour détecter les environnements Proxmox (hôte et invité)
|
||||
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN is_proxmox_host BOOLEAN DEFAULT FALSE;
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN is_proxmox_guest BOOLEAN DEFAULT FALSE;
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN proxmox_version TEXT;
|
||||
|
||||
-- Note: Peut être NULL pour les snapshots existants
|
||||
2
backend/migrations/018_add_device_ip_url.sql
Normal file
2
backend/migrations/018_add_device_ip_url.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Migration 018: Add IP URL field to devices
|
||||
ALTER TABLE devices ADD COLUMN ip_url VARCHAR(512);
|
||||
2
backend/migrations/019_add_audio_info.sql
Normal file
2
backend/migrations/019_add_audio_info.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN audio_hardware_json TEXT;
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN audio_software_json TEXT;
|
||||
15
backend/migrations/020_update_uptime_seconds_float.sql
Normal file
15
backend/migrations/020_update_uptime_seconds_float.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- Migration 020: Store uptime_seconds as REAL for fractional values
|
||||
-- Date: 2026-01-11
|
||||
-- Description: Change hardware_snapshots.uptime_seconds from INTEGER to REAL
|
||||
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
ALTER TABLE hardware_snapshots ADD COLUMN uptime_seconds_real REAL;
|
||||
UPDATE hardware_snapshots
|
||||
SET uptime_seconds_real = uptime_seconds
|
||||
WHERE uptime_seconds IS NOT NULL;
|
||||
|
||||
ALTER TABLE hardware_snapshots DROP COLUMN uptime_seconds;
|
||||
ALTER TABLE hardware_snapshots RENAME COLUMN uptime_seconds_real TO uptime_seconds;
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user