mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-11-03 05:23:45 +00:00
feat: Implement machine_id based host identification
- Add machine_id field to hosts schema (unique, indexed) - Remove unique constraint from friendly_name (allow duplicate hostnames) - Agent installer now generates/reads persistent machine_id - Proxmox script retrieves machine_id from LXC containers - Backend will check machine_id instead of hostname for duplicates This allows multiple hosts with same hostname to coexist in PatchMon
This commit is contained in:
@@ -60,7 +60,8 @@ model host_repositories {
|
||||
|
||||
model hosts {
|
||||
id String @id
|
||||
friendly_name String @unique
|
||||
machine_id String @unique
|
||||
friendly_name String
|
||||
ip String?
|
||||
os_type String
|
||||
os_version String
|
||||
@@ -92,6 +93,10 @@ model hosts {
|
||||
host_repositories host_repositories[]
|
||||
host_groups host_groups? @relation(fields: [host_group_id], references: [id])
|
||||
update_history update_history[]
|
||||
|
||||
@@index([machine_id])
|
||||
@@index([friendly_name])
|
||||
@@index([hostname])
|
||||
}
|
||||
|
||||
model packages {
|
||||
|
||||
Reference in New Issue
Block a user