Hi,
I guess I've been away from this for too long to solve that myself :-) I upgraded from -1.1 to -1.7 and got these messages:
- user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE biblio_contributor_data DROP PRIMARY KEY in /usr/share/drupal/includes/database.mysql-common.inc on line 386.
- user warning: Multiple primary key defined query: ALTER TABLE biblio_contributor_data ADD PRIMARY KEY (cid, aka) in /usr/share/drupal/includes/database.mysql-common.inc on line 374.
I have an idea what it means, but not how to fix this now. Anything I can type into my mysql prompt to correct the tables?
I'm not sure if I can edit or add any entries before this is fixed...
cu,
Frank
Comments
Comment #1
Frank Steiner commentedI got a little help from a mysql expert. He told me that the primary key could not be deleted because cid has "auto_increment" set.
He proposed to remove that extra, then delete the PRI from cid, then add it for (cid,aka) and re-add the auto_increment.
I don't see auto_increment anywhere in the scheme definition in biblio.install, but after deleting biblio (including the removal of all tables) and reinstalling it, the table looks like this
so I guess the above steps would be ok?
Comment #2
rjerome commentedHi Frank, long time no hear...
In "Drupal Schema" speak, auto_increment is "serial"...
Ron.
Comment #3
Frank Steiner commentedYes, our drupal installation was sitting asleep ;-) Now I need to upgrade some stuff.
Ok, I understand that I can fix the stuff with the steps above. But I guess the update code should remove the autoincrement first to avoid this bug, right?
Comment #4
rjerome commentedCorrect, although I'm surprised you are the first to run into this. I'll have to try an upgrade from 1.1 -> 1.7 and see what happens.
Comment #5
liam morlandThis version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.