From 7fb71b36ad50153f6e05d066284688d1128a7a21 Mon Sep 17 00:00:00 2001
From: Runxi Yu <me@runxiyu.org>
Date: Wed, 19 Feb 2025 21:19:15 +0800
Subject: ssh/recv, hooks: Create MRs on push, reject pushes to others' MRs

---
 schema.sql | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'schema.sql')

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)
-- 
cgit v1.2.3

