database update problem
gurukripa - April 14, 2007 - 10:34
| Project: | Flag content |
| Version: | 5.x-2.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
The following queries were executed
flag_content module
Update #1
ALTER TABLE {flag_content} CHANGE nid eid INT NOT NULL
ALTER TABLE {flag_content} ADD uid INT NOT NULL AFTER eid
ALTER TABLE {flag_content} ADD type VARCHAR( 10 ) NOT NULL AFTER uid
Failed: ALTER TABLE {flag_content} ADD fid INT( 11 ) NOT NULL AUTO_INCREMENT FIRST
ALTER TABLE {flag_content} DROP PRIMARY KEY
Failed: ALTER TABLE {flag_content} ADD PRIMARY KEY ( fid )
ALTER TABLE {flag_content} ADD INDEX ( eid )
ALTER TABLE {flag_content} ADD INDEX ( type )
UPDATE {flag_content} SET type = 'node'
Two failures happened when the Database were updated...pls help...

#1
Do you have data from a previous version or is this a new install?
If it is a new install, you can ignore this error.
Otherwise, you can try running the following commands from mysql command line or phpMyAdmin.
ALTER TABLE flag_content ADD fid INT NOT NULL AUTO_INCREMENT FIRST;ALTER TABLE flag_content CHANGE nid eid INT NOT NULL;
ALTER TABLE flag_content ADD uid INT NOT NULL AFTER eid;
ALTER TABLE flag_content ADD type VARCHAR(10) NOT NULL AFTER uid;
ALTER TABLE flag_content DROP PRIMARY KEY;
ALTER TABLE flag_content ADD PRIMARY KEY (fid);
ALTER TABLE flag_content ADD INDEX (eid);
ALTER TABLE flag_content ADD INDEX (type);
UPDATE flag_content SET type = 'node';
See if that fixes