From ff06783c6dc50321100a54b4d4a624fde2212689 Mon Sep 17 00:00:00 2001
From: Matthew Somerville <matthew@mysociety.org>
Date: Fri, 14 Dec 2012 12:11:13 +0000
Subject: Make from_body a foreign key.

---
 db/schema_0032-add-from_body-reference.sql | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 db/schema_0032-add-from_body-reference.sql

(limited to 'db/schema_0032-add-from_body-reference.sql')

diff --git a/db/schema_0032-add-from_body-reference.sql b/db/schema_0032-add-from_body-reference.sql
new file mode 100644
index 000000000..4fa526963
--- /dev/null
+++ b/db/schema_0032-add-from_body-reference.sql
@@ -0,0 +1,6 @@
+begin;
+
+ALTER TABLE users ADD CONSTRAINT users_from_body_fkey
+    FOREIGN KEY (from_body) REFERENCES body(id);
+
+commit;
-- 
cgit v1.2.3

