From c0e3bdb2ff9ae979cc5f12e996522b0c21ad8a3b Mon Sep 17 00:00:00 2001 From: Kaitlyn Parkhurst Date: Wed, 7 Sep 2022 05:14:40 +0000 Subject: [PATCH] Update schema. --- DB/etc/schema.sql | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/DB/etc/schema.sql b/DB/etc/schema.sql index 9dc45cc..cb836da 100644 --- a/DB/etc/schema.sql +++ b/DB/etc/schema.sql @@ -37,4 +37,39 @@ CREATE TABLE auth_token ( created_at timestamptz not null default current_timestamp ); +CREATE TABLE domain ( + id serial PRIMARY KEY, + person_id int not null references person(id), + name citext not null unique, + created_at timestamptz not null default current_timestamp +); + +CREATE TABLE blog ( + id serial PRIMARY KEY, + person_id int not null references person(id), + domain_id int references domain(id), + + -- Settings: File Allowances + max_static_file_count int not null default 100, + max_static_file_size int not null default 5, -- MiB + max_static_webroot_size int not null default 50, -- MiB + + -- Settings: Build Timers + minutes_wait_after_build int not null default 10, + builds_per_hour int not null default 3, + builds_per_day int not null default 12, + + -- Settings: Features + build_priority int not null default 1, + + is_enabled boolean not null default true, + created_at timestamptz not null default current_timestamp +); + +CREATE TABLE build ( + id serial PRIMARY KEY, + blog_id int not null references blog(id), + job_id int not null, -- For minion->job($id) + created_at timestamptz not null default current_timestamp +);