aboutsummaryrefslogtreecommitdiff
path: root/schema.sql
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-19 21:19:15 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-19 21:19:15 +0800
commit7fb71b36ad50153f6e05d066284688d1128a7a21 (patch)
treefbbcc33fdeeb43b1c495baba122a5be845b61ad9 /schema.sql
parentssh/recv, users, schema: Create pubkey_only users (diff)
downloadforge-7fb71b36ad50153f6e05d066284688d1128a7a21.tar.gz
forge-7fb71b36ad50153f6e05d066284688d1128a7a21.tar.zst
forge-7fb71b36ad50153f6e05d066284688d1128a7a21.zip
ssh/recv, hooks: Create MRs on push, reject pushes to others' MRs
Diffstat (limited to '')
-rw-r--r--schema.sql8
1 files changed, 4 insertions, 4 deletions
diff --git a/schema.sql b/schema.sql
index 3db8967..684c32d 100644
--- a/schema.sql
+++ b/schema.sql
@@ -66,14 +66,14 @@ CREATE TABLE sessions (
UNIQUE(user_id, session_id)
);
-// TODO:
+-- TODO:
CREATE TABLE merge_requests (
id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
- title TEXT NOT NULL,
+ title TEXT,
repo_id INTEGER NOT NULL REFERENCES repos(id) ON DELETE CASCADE,
- creator INTEGER NOT NULL REFERENCES users(id) ON DELETE SET NULL,
+ creator INTEGER REFERENCES users(id) ON DELETE SET NULL,
source_ref TEXT NOT NULL,
- destination_branch TEXT NOT NULL,
+ destination_branch TEXT,
status TEXT NOT NULL CHECK (status IN ('open', 'merged', 'closed')),
UNIQUE (repo_id, source_ref, destination_branch),
UNIQUE (repo_id, id)