add a basic db schema

master
Joshua Herring 4 weeks ago
parent aa1908864b
commit 3d9b46d230

@ -2,15 +2,17 @@ package dbi
activity_report_schema = ` activity_report_schema = `
CREATE TABLE users ( CREATE TABLE users (
APIKey text not null,
FirstName text not null, FirstName text not null,
LastName text not null, LastName text not null,
Username text not null, Status text not null CHECK (Status in ('faculty', 'admin')),
PRIMARY KEY Username Username text PRIMARY KEY
); );
CREATE TABLE scholarship ( CREATE TABLE scholarship (
UID text PRIMARY KEY, UID text PRIMARY KEY,
Citation text, Citation text,
Hyperlink text, Hyperlink text,
Status text not null CHECK (Status in ('reported','posted')),
Created text, Created text,
Modified text, Modified text,
Username text REFERENCES users(Username) Username text REFERENCES users(Username)
@ -20,6 +22,7 @@ CREATE TABLE activities (
Title text, Title text,
Description text, Description text,
Hyperlink text, Hyperlink text,
Status text not null CHECK (Status in ('reported','posted')),
Created text, Created text,
Modified text, Modified text,
Username text REFERENCES users(Username) Username text REFERENCES users(Username)
@ -29,6 +32,7 @@ CREATE TABLE appearances (
Title text, Title text,
Description text, Description text,
Hyperlink text, Hyperlink text,
Status text not null CHECK (Status in ('reported','posted')),
Created text, Created text,
Modified text, Modified text,
Username text REFERENCES users(Username) Username text REFERENCES users(Username)

Loading…
Cancel
Save