Topic: error while update database from older versions
Desc:
Drupal 4.4.0 database.mysql file say:
--
-- Table structure for table 'boxes'
--
CREATE TABLE boxes (
bid tinyint(4) NOT NULL auto_increment,
title varchar(64) NOT NULL default '',
body longtext,
info varchar(128) NOT NULL default '',
type tinyint(2) NOT NULL default '0',
PRIMARY KEY (bid),
UNIQUE KEY subject (title),
UNIQUE KEY info (info)
) TYPE=MyISAM;
If you try update your database 4.4.0 -> 4.6.0 -> 4.6.5 everything is OK.
But if you continue the update process, and try to update 4.6.5 -> 4.7.0-beta{1-2-3} you get following error message:
Update #131
* Failed: ALTER TABLE {boxes} DROP INDEX title
Solution:
Before you try to update from 4.6.5 to 4.7.0-beta{1-2-3}:
ALTER TABLE `boxes` DROP INDEX `subject` ,
ADD UNIQUE `title` ( `title` );
Comments
Comment #1
mfbLooks like this is actually a missing database update which should have happened between drupal 4.4 and 4.5. The boxes.title index was renamed from `subject` to `title`. Not sure how to add a database update which should have happened some time ago. We could perhaps remove both indexes, with some error suppression since it would be "normal" for one of the indexes to not exist.
Comment #2
mfbThis bug is only apparent when upgrading to 4.7 beta.
Comment #3
dries commentedSomething is wrong but an index that can' t be dropped isn't necessarily a critical bug.
Is your upgraded boxes table identical to the one in database/database.mysql?
Comment #4
mcduarte2000 commentedI had the same problem... I took the index by hand and it seemed to work.
Comment #5
gerhard killesreiter commentedProbably some people added/removed indices by themselves.
Comment #6
(not verified) commented