ALTER TABLE `releases` ADD  `preID` INT( 12 ) NULL DEFAULT NULL AFTER  `consoleinfoID`;
ALTER TABLE `releases` DROP `pre`;

UPDATE releases r INNER JOIN predb pre ON (pre.dirname = r.searchname) SET r.preID = pre.ID; 