Index: openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-create.sql,v
diff -u -N -r1.1 -r1.2
--- openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-create.sql	15 May 2002 22:07:52 -0000	1.1
+++ openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-create.sql	12 Jun 2002 13:53:13 -0000	1.2
@@ -6,11 +6,13 @@
 --
 
 create table bulk_mail_messages (
-    bulk_mail_id                constraint bm_messages_bulk_mail_id_fk
+    bulk_mail_id                integer
+                                constraint bm_messages_bulk_mail_id_fk
                                 references acs_objects (object_id)
                                 constraint bm_messages_bulk_mail_id_pk
                                 primary key,
-    package_id                  constraint bm_messages_package_id_fk
+    package_id                  integer
+                                constraint bm_messages_package_id_fk
                                 references apm_packages (package_id)
                                 constraint bm_messages_package_id_nn
                                 not null,
@@ -28,7 +30,7 @@
     subject                     varchar(4000),
     reply_to                    varchar(4000),
     extra_headers               varchar(4000),
-    message                     clob
+    message                     text
                                 constraint bm_messages_message_nn
                                 not null,
     query                       varchar(4000)
@@ -37,20 +39,28 @@
 );
 
 -- create a new object type
+create function inline_0 ()
+returns integer as '
 begin
-    acs_object_type__create_type(
-        'acs_object',
-        'bulk_mail_message',
-        'Bulk Mail Message',
-        'Bulk Mail Messages',
-        'bulk_mail_messages',
-        'bulk_mail_id',
-        'bulk_mail',
-        'acs_object__default_name'
+    perform acs_object_type__create_type(
+        ''bulk_mail_message'',
+        ''Bulk Mail Message'',
+        ''Bulk Mail Messages'',
+        ''acs_object'',
+        ''bulk_mail_messages'',
+        ''bulk_mail_id'',
+        ''bulk_mail'',
+        ''f'',
+        null,
+        ''acs_object__default_name''
     );
-end;
-/
-show errors
 
+    return null;
+end;' language 'plpgsql';
+
+select inline_0();
+
+drop function inline_0 ();
+
 \i bulk-mail-views-create.sql
 \i bulk-mail-package-create.sql
