Files
Homelab-manager/server/drizzle/0018_even_marvel_zombies.sql
T
bobbanandClaude Sonnet 5.5 44cc9d1cf2 Add address aliases for the Uptime Kuma maintenance sync, and ignore Kuma's "null"
Uptime Kuma often watches a host by another address than the one it was added
with here (a Proxmox host monitored over Tailscale, say). Address aliases on
the Maintenance page say that an address belongs to a server, integration or
DNS provider, so the sync puts the window there; matching stays exact.
Migration 0018 adds maintenance_aliases.

Also fixes monitors whose empty hostname/URL/port arrive from Kuma's metrics as
the text "null": they were taken as an address, hiding the real URL.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-13 20:25:57 +02:00

9 lines
374 B
SQL

CREATE TABLE `maintenance_aliases` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`address` text NOT NULL,
`target_type` text NOT NULL,
`target_id` integer NOT NULL,
`created_at` text DEFAULT (current_timestamp) NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX `maintenance_aliases_unique_idx` ON `maintenance_aliases` (`address`,`target_type`,`target_id`);