make fleet routes endpoint authoritative

This commit is contained in:
lda committed 2026-05-27 01:52:05 +07:00 Verified
1 parent 8628af6bd3
commit ba95257309
4 files changed
+228 -63

No files matched your search

@@ -59,29 +59,6 @@ CREATE TABLE agent_device_ips (
CREATE INDEX agent_device_ips_ip_idx
ON agent_device_ips(ip);
CREATE TABLE agent_device_endpoints (
agent_id TEXT NOT NULL,
device_key TEXT NOT NULL,
endpoint_key TEXT NOT NULL,
source TEXT NOT NULL,
mac TEXT,
ip TEXT,
hostname TEXT,
interface TEXT,
presence TEXT NOT NULL,
first_seen_unix INTEGER NOT NULL,
last_seen_unix INTEGER NOT NULL,
PRIMARY KEY (agent_id, device_key, endpoint_key),
FOREIGN KEY (agent_id, device_key)
REFERENCES agent_devices(agent_id, device_key) ON DELETE CASCADE
) WITHOUT ROWID;
CREATE INDEX agent_device_endpoints_mac_idx
ON agent_device_endpoints(mac);
CREATE INDEX agent_device_endpoints_ip_idx
ON agent_device_endpoints(ip);
CREATE TABLE agent_device_hostnames (
agent_id TEXT NOT NULL,
device_key TEXT NOT NULL,