model device endpoints for fleet wake routes
This commit is contained in:
@@ -59,6 +59,29 @@ 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,
|
||||
|
||||
Reference in New Issue
Block a user