From f47de41aa3a2f5ed01da8e135207f6f70565cc82 Mon Sep 17 00:00:00 2001 From: Kaitlyn Parkhurst Date: Thu, 15 Sep 2022 14:45:30 -0700 Subject: [PATCH] Support auth stuff. --- DB/etc/schema.sql | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/DB/etc/schema.sql b/DB/etc/schema.sql index cb836da..12c135f 100644 --- a/DB/etc/schema.sql +++ b/DB/etc/schema.sql @@ -66,6 +66,35 @@ CREATE TABLE blog ( created_at timestamptz not null default current_timestamp ); +CREATE TABLE ssh_key ( + id serial PRIMARY KEY, + person_id int not null references person(id), + title text , + public_key text not null, + private_key text not null, + created_at timestamptz not null default current_timestamp +); + +CREATE TABLE basic_auth ( + id serial PRIMARY KEY, + person_id int not null references person(id), + username text not null, + password text not null, + created_at timestamptz not null default current_timestamp +); + +CREATE TABLE repo ( + id serial PRIMARY KEY, + blog_id int references blog(id), + url text not null, + + -- Auth methods for the url. + basic_auth_id int references basic_auth(id), + ssh_key_id int references ssh_key(id), + + created_at timestamptz not null default current_timestamp +); + CREATE TABLE build ( id serial PRIMARY KEY, blog_id int not null references blog(id),