aboutsummaryrefslogtreecommitdiff
path: root/lib/sql/migration/003-add-comment-parent.sql
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2010-08-10 11:22:01 +0800
committerJeremy Kerr <jk@ozlabs.org>2010-08-10 11:49:36 +0800
commita4c18dfd4492e61c4025c378a68a0d3511308b89 (patch)
tree54f4abd975b566e08dd96ddc8e7752e87fca8c58 /lib/sql/migration/003-add-comment-parent.sql
parente11f1b02e5e9eaaf813dc4a5f1d17755a2244628 (diff)
downloadpatchwork-a4c18dfd4492e61c4025c378a68a0d3511308b89.tar
patchwork-a4c18dfd4492e61c4025c378a68a0d3511308b89.tar.gz
sql: Add uncommitted migration scripts
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib/sql/migration/003-add-comment-parent.sql')
-rw-r--r--lib/sql/migration/003-add-comment-parent.sql7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sql/migration/003-add-comment-parent.sql b/lib/sql/migration/003-add-comment-parent.sql
new file mode 100644
index 0000000..e6f9f64
--- /dev/null
+++ b/lib/sql/migration/003-add-comment-parent.sql
@@ -0,0 +1,7 @@
+BEGIN;
+ALTER TABLE "patchwork_comment" ADD COLUMN "parent_id" integer NULL;
+ALTER TABLE "patchwork_comment" ADD CONSTRAINT parent_id_refs_id_7b721867
+ FOREIGN KEY ("parent_id")
+ REFERENCES "patchwork_comment" ("id")
+ DEFERRABLE INITIALLY DEFERRED;
+COMMIT;