feat: COM-port support for workstation devices + agent UI fixes
- EquipmentPage: add COM-port connection type with port field (COM1, /dev/ttyUSB0) - api.ts: add comPort field to WorkstationDevice type - workstations route: pass com_port to INSERT/PATCH - migration 042: extend connection check constraint to include 'com', add com_port column - agent index.html: highlight first cell on load, reset input on unpair Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
13
backend/migrations/042_workstation_devices_com.sql
Normal file
13
backend/migrations/042_workstation_devices_com.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- Добавляем поддержку COM-порта для устройств рабочего места
|
||||
|
||||
-- Расширяем CHECK constraint для connection (добавляем 'com')
|
||||
ALTER TABLE workstation_devices
|
||||
DROP CONSTRAINT IF EXISTS workstation_devices_connection_check;
|
||||
|
||||
ALTER TABLE workstation_devices
|
||||
ADD CONSTRAINT workstation_devices_connection_check
|
||||
CHECK (connection IN ('usb', 'network', 'com'));
|
||||
|
||||
-- Добавляем поле com_port (например: COM1, COM3, /dev/ttyUSB0)
|
||||
ALTER TABLE workstation_devices
|
||||
ADD COLUMN IF NOT EXISTS com_port VARCHAR(50);
|
||||
Reference in New Issue
Block a user