tclip/cmd/tclipd/schema.sql
Gabriel Simmer fdbbc6a891
All checks were successful
Nix build / build-docker (push) Successful in 2m10s
Nix build / build-docker-arm (push) Successful in 4m53s
PostgreSQL compatibility (#5)
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>
2024-04-30 23:57:37 +01:00

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)
);