summaryrefslogtreecommitdiffstats
path: root/lib/sql
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2010-10-22 14:14:10 +0800
committerJeremy Kerr <jk@ozlabs.org>2010-11-01 10:24:04 -0400
commitddb04aaac7d9875f1dfd7970944dab6aa6557099 (patch)
tree0ee4cc15b728dd228fba03083ff4e81b53e572f2 /lib/sql
parent3c1fe032cde2289a6ba2f87f09546e646d0e26bb (diff)
downloadpatchwork-ddb04aaac7d9875f1dfd7970944dab6aa6557099.tar.bz2
patchwork-ddb04aaac7d9875f1dfd7970944dab6aa6557099.tar.xz
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>
Diffstat (limited to 'lib/sql')
-rw-r--r--lib/sql/migration/007-patch-pull-requests.sql6
1 files changed, 6 insertions, 0 deletions
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;