From 9d14d9ca39b46042c4196382613dd9c4bf711fcb Mon Sep 17 00:00:00 2001
From: Joel Klinghed <the_jk@spawned.biz>
Date: Mon, 27 Jan 2025 22:57:15 +0100
Subject: Add user keys to database

Next step is to generate authorized_keys files for git server
based on keys.
---
 server/migrations/1_initial_eyeballs.sql | 13 +++++++++++++
 1 file changed, 13 insertions(+)

(limited to 'server/migrations/1_initial_eyeballs.sql')

diff --git a/server/migrations/1_initial_eyeballs.sql b/server/migrations/1_initial_eyeballs.sql
index 3f31781..728c329 100644
--- a/server/migrations/1_initial_eyeballs.sql
+++ b/server/migrations/1_initial_eyeballs.sql
@@ -69,3 +69,16 @@ CREATE TABLE IF NOT EXISTS review_users (
          ON DELETE CASCADE
          ON UPDATE RESTRICT
 );
+
+CREATE TABLE IF NOT EXISTS user_keys (
+       id BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
+       user VARCHAR(128) NOT NULL,
+       kind VARCHAR(128) NOT NULL,
+       data VARCHAR(8192) NOT NULL,
+       comment VARCHAR(1024) NOT NULL,
+
+       CONSTRAINT `fk_user_keys_user`
+         FOREIGN KEY (user) REFERENCES users (id)
+         ON DELETE CASCADE
+         ON UPDATE RESTRICT
+);
-- 
cgit v1.2.3-70-g09d2

