Closed (fixed)
Project:
Bibliography Module
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Apr 2011 at 05:00 UTC
Updated:
3 Aug 2013 at 03:21 UTC
I'm updating my site to drupal 7. I tried to upgrade biblio from 6.x-1.15 to 7.x-1.x-dev, and received the following error after running update.php:
The following updates returned messages
biblio module
Update #7000
Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key: ALTER TABLE {biblio_contributor_data} DROP PRIMARY KEY; Array ( ) in db_drop_primary_key() (line 2772 of /srv/www/drupal/includes/database/database.inc).
Comments
Comment #1
rjerome commentedActually, I just fixed that last night, so the current -dev release (dated Apr. 29) should work for you.
Comment #2
elopio commentedGreat!
The update finished now :)
*hug*
Comment #3
drupalycious commentedI upgraded from rc5 to the latest dev and received the following message:
Comment #4
rjerome commentedwhich database engine are you using (MySQL, PostgreSQL)?
Comment #5
e5sego commentedI used the -dev version and it is still causing same error as in #3. There seems some wrong syntax here:
Workaround
1. Manually fix the table:
2. Edit biblio.install:
3. Run update.php script
Comment #6
rjerome commentedThe reason I asked about the Database engine is that the "work around" code that you propose
Is exactly what I used to have in that function and it too was causing the same issue with some DB's so I'd like to know which DB's prefer which code.
Comment #7
jippie1948 commentedPerhaps I found the problem: I looked into my database for the cid values and they are not unique. Hence never they can become a primary key...
Best wishes,
JP
Edit:
1. I looked into the wrong table... :( So there is no problem with unique cid values.
2. When I imported the database into a different database replacing a clean D7 install, the problem mysteriously disappeared. :)
Comment #8
kari.nies commentedI just upgraded from 7.x-1.0-rc4 to rc7 and got the same error message.
Comment #9
rjerome commentedshould be fixed in rc7