feat: initial commit

This commit is contained in:
2023-02-02 10:55:24 +01:00
commit 088b6843a9
92 changed files with 7300 additions and 0 deletions

View File

@ -0,0 +1,3 @@
DROP TABLE specs;
DROP TABLE agents;

View File

@ -0,0 +1,21 @@
---
CREATE TABLE agents (
id INTEGER PRIMARY KEY,
remote_id TEXT NOT NULL UNIQUE,
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,
data TEXT,
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
);