I got this error while updating message module.

message module
Update #7013

Failed: PDOException: SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation "message_mid_seq" already exists: CREATE SEQUENCE {message}_mid_seq; Array ( ) em db_change_field() (line 3076 ..../includes/database/database.inc).

Comments

nailsoncunha created an issue. See original summary.

nailsoncunha’s picture

And now, this error too

Update #7013

Failed: DatabaseSchemaObjectExistsException: Cannot add unique key temp_key to table message: unique key already exists. em DatabaseSchema_pgsql->addUniqueKey() (line 461 in .../includes/database/pgsql/schema.inc).

alex-b’s picture

Project: Drupal core » Message
Version: 7.51 » 7.x-1.12
Component: database update system » Code
alex-b’s picture

You seem to be using PostgreSQL as database which appears to not like the patch developed in issue 2051751.

alex-b’s picture

nailsoncunha’s picture

Thanks

nailsoncunha’s picture

Status: Active » Fixed
kschisler’s picture

Status: Fixed » Active

I don't think this issue should be marked as fixed. I am also running postgres and am receiving the same errors when trying to update. I am digging into this issue and if I can fix it I will post a patch for it.

kschisler’s picture

Found out I do not actually need this module anymore so I have uninstalled it and will not be actively working on a patch

alex-b’s picture

Status: Active » Needs review
StatusFileSize
new539 bytes

PostgreSQL does not have the original problem fixed in update 7013 (looking at DatabaseSchema_pgsql::processField()) , so the attached patch which prevents that update from running in this case should be fine.

kschisler’s picture

Status: Needs review » Reviewed & tested by the community

Tested this one out. Works like a charm.

Thanks alex-b!

rosk0’s picture

+1 for RTBC.

Tested on PHP 5.5 and PostgreSQL 9.3.17.

bluegeek9’s picture

Status: Reviewed & tested by the community » Closed (outdated)