host_rolesStores host roles separately from hosts so the host table does not grow a role-specific column set.
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
host_fqdn |
TEXT |
no | none | Target host. References hosts(fqdn). |
role |
TEXT |
no | none | Role label, for example proxmox, pbs, storage. |
status |
TEXT |
no | 'active' |
Role lifecycle state. |
created_at |
TEXT |
no | none | ISO UTC creation timestamp. |
retired_at |
TEXT |
yes | NULL |
ISO UTC retirement timestamp. |
(host_fqdn, role)host_fqdn references hosts(fqdn) with ON UPDATE CASCADE ON DELETE RESTRICTCREATE TABLE IF NOT EXISTS host_roles (
host_fqdn TEXT NOT NULL,
role TEXT NOT NULL,
status TEXT NOT NULL DEFAULT 'active',
created_at TEXT NOT NULL,
retired_at TEXT,
PRIMARY KEY (host_fqdn, role),
FOREIGN KEY (host_fqdn) REFERENCES hosts(fqdn) ON UPDATE CASCADE ON DELETE RESTRICT
);