Index: openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.2b4-1.2b5.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.2b4-1.2b5.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.2b4-1.2b5.sql	18 Feb 2006 11:02:10 -0000	1.1
+++ openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.2b4-1.2b5.sql	20 Feb 2006 08:53:58 -0000	1.2
@@ -7,16 +7,24 @@
 -- @cvs-id $Id$
 --
 
-create function inline_0() returns integer as '
+create or replace function inline_0() returns integer as '
 declare 
 	v_labels_p   boolean;
+        v_envelopes_p boolean;
 begin
 	v_labels_p := ''1'' from contact_message_types where message_type = ''label'';
 
         if v_labels_p is not true then 
-	   insert into contact_message_types (message_type) values (''label'',''#contacts.Labels#'');
+	   insert into contact_message_types (message_type,pretty_name) values (''label'',''#contacts.Labels#'');
         end if;
 
+	v_envelopes_p := ''1'' from contact_message_types where message_type = ''envelope'';
+
+        if v_envelopes_p is not true then 
+	   insert into contact_message_types (message_type,pretty_name) values (''envelope'',''#contacts.Envelopes#'');
+        end if;
+
+
      return 0;
 
 end;' language 'plpgsql';
