From ddb04aaac7d9875f1dfd7970944dab6aa6557099 Mon Sep 17 00:00:00 2001
From: Jeremy Kerr <jk@ozlabs.org>
Date: Fri, 22 Oct 2010 14:14:10 +0800
Subject: Add support for git-pull requests

Add a a pull_url to the Patch object, and update the parser to look for
git-pull style emails.

Requires SQL migration script.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---
 lib/sql/migration/007-patch-pull-requests.sql | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 lib/sql/migration/007-patch-pull-requests.sql

(limited to 'lib/sql/migration/007-patch-pull-requests.sql')

diff --git a/lib/sql/migration/007-patch-pull-requests.sql b/lib/sql/migration/007-patch-pull-requests.sql
new file mode 100644
index 0000000..9155133
--- /dev/null
+++ b/lib/sql/migration/007-patch-pull-requests.sql
@@ -0,0 +1,6 @@
+BEGIN;
+ALTER TABLE patchwork_patch ADD column pull_url varchar(255);
+ALTER TABLE patchwork_patch ALTER COLUMN content DROP NOT NULL;
+ALTER TABLE patchwork_patch ADD CONSTRAINT has_content_or_url
+	CHECK (pull_url IS NOT NULL OR content IS NOT NULL);
+COMMIT;
-- 
cgit v1.2.3

