Files
harbor/crates/cli/migrations/2026-07-13-221551-0000_create_tables/up.sql
T
pure_sagacity c64ed1be4e added database stuff
added clap arguments
added the gen_or_get_key func in lib
git ignore for .env
migrations
2026-07-13 17:43:00 -05:00

20 lines
492 B
SQL

CREATE TABLE projects (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE secrets (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
project_id TEXT NOT NULL,
config TEXT NOT NULL,
secret BLOB NOT NULL,
nonce BLOB NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE,
UNIQUE (project_id, config, name)
);