Code: Select all
use dbnew;
CREATE TABLE `phpbb_thanks` (
`thanks_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`thanks_from` mediumint(8) unsigned NOT NULL,
`thanks_to` mediumint(8) unsigned NOT NULL,
`post_id` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`thanks_id`)
) ENGINE=MyISAM;
INSERT INTO dbnew.phpbb_thanks SELECT * from dbold.phpbb_thanks;
Code: Select all
SQL ERROR [ mysqli ]
Key column 'user_id' doesn't exist in table [1072]
SQL
ALTER TABLE phpbb_thanks ADD INDEX user_id (user_id)
Thats why I'm inserting the old data:
Code: Select all
INSERT INTO dbnew.phpbb_thanks SELECT * from dbold.phpbb_thanks;
Ouch, just checked it again and it might be that I was using this mod: