Index: openacs-4/packages/contacts-lite/sql/postgresql/cn-phones.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts-lite/sql/postgresql/cn-phones.sql,v
diff -u -N -r1.1 -r1.2
--- openacs-4/packages/contacts-lite/sql/postgresql/cn-phones.sql	20 Jan 2021 18:35:37 -0000	1.1
+++ openacs-4/packages/contacts-lite/sql/postgresql/cn-phones.sql	20 Jan 2021 21:01:04 -0000	1.2
@@ -1,6 +1,8 @@
 -- @cvs-id: $Id$
 
-create table cn_phone_types (
+DROP TABLE IF EXISTS cn_phone_types CASCADE;
+
+create table IF NOT EXISTS cn_phone_types (
     phone_type_id                  integer
                                    constraint cn_phone_types_id_pk
                                      primary key,
@@ -9,13 +11,13 @@
                                      not null
 );
 
-insert into cn_phone_types values (acs_object_id_seq.nextval,'Business - Primary');
-insert into cn_phone_types values (acs_object_id_seq.nextval,'Business - Fax');
-insert into cn_phone_types values (acs_object_id_seq.nextval,'Cellular');
-insert into cn_phone_types values (acs_object_id_seq.nextval,'Pager');
+insert into cn_phone_types values (nextval('t_acs_attribute_id_seq'), 'Business - Primary');
+insert into cn_phone_types values (nextval('t_acs_attribute_id_seq'), 'Business - Fax');
+insert into cn_phone_types values (nextval('t_acs_attribute_id_seq'), 'Cellular');
+insert into cn_phone_types values (nextval('t_acs_attribute_id_seq'), 'Pager');
 
 
-create table cn_phone_numbers
+create table IF NOT EXISTS cn_phone_numbers
 (
     phone_number_id                  integer
                                      constraint cn_phone_number_id_pk
