From 3d9b46d230acd8f3fe6de207a4885928502d929e Mon Sep 17 00:00:00 2001 From: Joshua Herring Date: Tue, 26 May 2026 12:43:47 -0400 Subject: [PATCH] add a basic db schema --- dbi/schema.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dbi/schema.go b/dbi/schema.go index c7d6223..2813aab 100644 --- a/dbi/schema.go +++ b/dbi/schema.go @@ -2,15 +2,17 @@ package dbi activity_report_schema = ` CREATE TABLE users ( + APIKey text not null, FirstName text not null, LastName text not null, - Username text not null, - PRIMARY KEY Username + Status text not null CHECK (Status in ('faculty', 'admin')), + Username text PRIMARY KEY ); CREATE TABLE scholarship ( UID text PRIMARY KEY, Citation text, Hyperlink text, + Status text not null CHECK (Status in ('reported','posted')), Created text, Modified text, Username text REFERENCES users(Username) @@ -20,6 +22,7 @@ CREATE TABLE activities ( Title text, Description text, Hyperlink text, + Status text not null CHECK (Status in ('reported','posted')), Created text, Modified text, Username text REFERENCES users(Username) @@ -29,6 +32,7 @@ CREATE TABLE appearances ( Title text, Description text, Hyperlink text, + Status text not null CHECK (Status in ('reported','posted')), Created text, Modified text, Username text REFERENCES users(Username)