My Update from rc4 to rc7 failed with the following error:

Failed: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'biblio_contributor_data' doesn't exist: ALTER TABLE `biblio_contributor_data` DROP PRIMARY KEY , ADD PRIMARY KEY ( `cid` ); Array ( ) in biblio_update_7020() (Zeile 2162 von /var/www/sites/all/modules/biblio/biblio.install).

Apart from the table not found, the "Array ( )" in the error message looks wrong...

I have biblio_zotero installed.

CommentFileSizeAuthor
#4 biblio-table_alias-2058817-4-D7.patch548 bytesliam morland

Comments

bdreispringer’s picture

The Bug was in line 2162 of the biblio.install file. It didn't use the Table aliasing and therefore ignored table prefixes.

Line 2162 needs to be:
db_query('ALTER TABLE {biblio_contributor_data} DROP PRIMARY KEY , ADD PRIMARY KEY ( `cid` )');

Instead of:
db_query('ALTER TABLE `biblio_contributor_data` DROP PRIMARY KEY , ADD PRIMARY KEY ( `cid` )');

ulysse68’s picture

Hey thanks! Had the same issue, solved with your help!
U.

macko’s picture

Issue summary: View changes

This fixed the problem, confirmed!

liam morland’s picture

Version: 7.x-1.0-rc7 » 7.x-1.x-dev
Priority: Major » Normal
Status: Active » Needs review
StatusFileSize
new548 bytes

Fix as a patch.

  • Liam Morland committed 242c689 on 7.x-1.x
    Issue #2058817 by Liam Morland, bdreispringer: Allow table prefixing in...
liam morland’s picture

Title: Update from rc4 to rc7 failed » Allow table prefixing in biblio_update_7019()
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.