From 329a234c97dc7b8fa8280fee4ddb74a3e77f3a74 Mon Sep 17 00:00:00 2001
From: Matthew Somerville <matthew@fury.ukcod.org.uk>
Date: Mon, 11 Apr 2011 11:03:26 +0100
Subject: Update contacts trigger, fix typo.

---
 db/schema.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'db/schema.sql')

diff --git a/db/schema.sql b/db/schema.sql
index a44b91ca7..297a13946 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -107,7 +107,7 @@ create table contacts_history (
 create function contacts_updated()
     returns trigger as '
     begin
-        insert into contacts_history (area_id, category, email, editor, whenedited, note, confirmed, deleted) values (new.area_id, new.category, new.email, new.editor, new.whenedited, new.note, new.confirmed, new.deleted);
+        insert into contacts_history (contact_id, area_id, category, email, editor, whenedited, note, confirmed, deleted) values (new.id, new.area_id, new.category, new.email, new.editor, new.whenedited, new.note, new.confirmed, new.deleted);
         return new;
     end;
 ' language 'plpgsql';
-- 
cgit v1.2.3

