Updated DB asset schema

Fixed URL in host details
This commit is contained in:
Luca Deri 2025-03-27 19:36:56 +01:00
parent 486dc0e33e
commit cb03021f4e
4 changed files with 23 additions and 5 deletions

View file

@ -787,9 +787,15 @@ CREATE TABLE IF NOT EXISTS `assets` (
`last_seen` DateTime NOT NULL,
`gateway_mac` String NULL,
`json_info` String NULL, -- A json containing all other info
`version` UInt64 -- Used to not have duplicates
`version` UInt64, -- Used to not have duplicates
`os_type` String NULL,
`model` String NULL
) ENGINE = ReplacingMergeTree(version) PRIMARY KEY (`type`, `key`) ORDER BY (`type`, `key`);
@
ALTER TABLE assets ADD COLUMN IF NOT EXISTS `os_type` String;
@
ALTER TABLE assets ADD COLUMN IF NOT EXISTS `model` String;
@
/* VIEWS */