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)