2023-02-02 10:55:24 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
CREATE TABLE agents (
|
|
|
|
id INTEGER PRIMARY KEY,
|
2023-03-02 13:05:24 +01:00
|
|
|
thumbprint TEXT UNIQUE,
|
|
|
|
keyset TEXT,
|
|
|
|
metadata TEXT,
|
2023-02-02 10:55:24 +01:00
|
|
|
status INTEGER NOT NULL,
|
|
|
|
created_at datetime NOT NULL,
|
|
|
|
updated_at datetime NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE specs (
|
|
|
|
id INTEGER PRIMARY KEY,
|
|
|
|
agent_id INTEGER,
|
|
|
|
name TEXT NOT NULL,
|
|
|
|
revision INTEGER DEFAULT 0,
|
2023-03-02 13:05:24 +01:00
|
|
|
data TEXT,
|
2023-02-02 10:55:24 +01:00
|
|
|
created_at datetime NOT NULL,
|
|
|
|
updated_at datetime NOT NULL,
|
|
|
|
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
|
|
|
|
UNIQUE(agent_id, name) ON CONFLICT REPLACE
|
|
|
|
);
|