From 4e1ad1b28507f67c0d1b01025ab9a79f2971879e Mon Sep 17 00:00:00 2001 From: juancwu <46619361+juancwu@users.noreply.github.com> Date: Sun, 11 Jan 2026 17:43:02 -0500 Subject: [PATCH] add unique user and host constraint to db --- migrations/00001_init.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migrations/00001_init.sql b/migrations/00001_init.sql index 0c61351..cbb222e 100644 --- a/migrations/00001_init.sql +++ b/migrations/00001_init.sql @@ -5,7 +5,8 @@ CREATE TABLE IF NOT EXISTS keys ( host_pattern TEXT NOT NULL, user_pattern TEXT NOT NULL, encrypted_pem BLOB NOT NULL, - comment TEXT + comment TEXT, + UNIQUE (user_pattern, host_pattern) ); -- +goose StatementEnd