Forum OpenACS Development: Porting error

Collapse
Posted by Sid Widge on
I get this error anyone know why ERROR: Cannot insert a duplicate key into unique index acs_object_types_pk
create function inline_7 ()
returns integer as'
declare
  attr_id            integer;
begin
  PERFORM content_type__create_type (
		''cr_wp_attachment'',
		''content_revision'',
		''Wimpy Attachment'',
		''Wimpy Attachments'',
		''cr_wp_attachments'',
		''attach_id'',
		null 
  );

 attr_id := content_type__create_attribute (
	     ''cr_wp_attachment'',
	     ''display'',
	     ''text'',
	     ''Where to display'',
	     ''Where to display'',
	     null,		   
	     null,		   
	     ''varchar(20)''
  );
return 0;
end;' language 'plpgsql';