Forum OpenACS Development: tables related

Collapse
Posted by Iuri Sampaio on
Does anyone know what tables are related with this error

Error: apm_package_install: Error installing Contacts version 1.2b14: psql:contacts-create.sql:17: ERROR: relation "contact_party_revisions" already exists
psql:contacts-create.sql:28: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement

psql:contacts-create.sql:17: ERROR: relation "contact_party_revisions" already exists
psql:contacts-create.sql:28: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement
PL/pgSQL function "content_type__create_type" line 41 at perform

------
I can see some there such as
contact_party_revisions
acs_object_types

Collapse
2: Re: tables related (response to 1)
Posted by Dave Bauer on
It appears that you have run the contacts package install SQL scripts more than once on the same database.

One way to attempt to fix it is to run the drop script under /contacts/sql/postgresql/contacts-drop.sql

This should remove the data model. If you do that you should then be able to uninstall contacts and try again.

If you do not want to uninstall contacts the other option is to look at contacts-create.sql and run that script plus any scripts referred to in contacts-create.sql manually.

This will ensure all the scripts are run.

Then, if you are attempting to install the contacts package you'll need to go to acs-admin/apm/ and click Install Packages, choose contacts, then after you click the "Choose Data Model Scripts" button UNCHECK all the contacts SQL files. This will install the package without running the SQL again and should avoid those errors.