aboutsummaryrefslogtreecommitdiff
path: root/schema.sql
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-13 01:28:35 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-13 01:28:35 +0800
commit14326ba9be276d2649b4681d3ebed1c32f65013f (patch)
tree9bd8717b6968b5a977d925d193042a92bc68f311 /schema.sql
parentssh_{server,utils}: Swap filenames (diff)
downloadforge-14326ba9be276d2649b4681d3ebed1c32f65013f.tar.gz
forge-14326ba9be276d2649b4681d3ebed1c32f65013f.tar.zst
forge-14326ba9be276d2649b4681d3ebed1c32f65013f.zip
_header.html: Add header
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql6
1 files changed, 6 insertions, 0 deletions
diff --git a/schema.sql b/schema.sql
index fbd9ac8..6317819 100644
--- a/schema.sql
+++ b/schema.sql
@@ -51,6 +51,12 @@ CREATE TABLE users (
password TEXT NOT NULL
);
+CREATE TABLE sessions (
+ user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
+ session_id TEXT NOT NULL,
+ PRIMARY KEY (user_id, session_id)
+);
+
CREATE TABLE merge_requests (
id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
repo_id INTEGER NOT NULL REFERENCES repos(id) ON DELETE CASCADE,