|
|
|
|
@ -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), |
|
|
|
|
|