Gabriel Simmer
fdbbc6a891
Removes the need for a PVC in my Kubernetes cluster, which is really why I'm doing this. Reviewed-on: #5 Co-authored-by: Gabriel Simmer <g@gmem.ca> Co-committed-by: Gabriel Simmer <g@gmem.ca>
18 lines
462 B
SQL
18 lines
462 B
SQL
-- Correlates to tailcfg.UserProfile
|
|
CREATE TABLE IF NOT EXISTS users
|
|
( id TEXT PRIMARY KEY NOT NULL
|
|
, login_name TEXT NOT NULL
|
|
, display_name TEXT NOT NULL
|
|
, profile_pic_url TEXT NOT NULL
|
|
);
|
|
|
|
-- Paste data
|
|
CREATE TABLE IF NOT EXISTS pastes
|
|
( id TEXT PRIMARY KEY NOT NULL
|
|
, created_at TEXT NOT NULL -- RFC 3339 timestamp
|
|
, user_id TEXT NOT NULL
|
|
, filename TEXT NOT NULL
|
|
, data TEXT NOT NULL
|
|
, FOREIGN KEY(user_id) REFERENCES users(id)
|
|
);
|