ALTER TABLE `dictionary`  DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

ALTER TABLE `dictionary` CHANGE `user` `User` INT( 11 ) NOT NULL ;
ALTER TABLE `dictionary` ADD `Entry` INT NOT NULL AFTER `ID` ;
ALTER TABLE `dictionary` ADD `Text` VARCHAR( 255 ) NOT NULL AFTER `Entry` ,
ADD `Language` INT NOT NULL AFTER `Text` ;

ALTER TABLE `banner`  DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `banner` CHANGE `Description` `Description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
CHANGE `LastURL` `LastURL` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;

ALTER TABLE `dictionary` CHANGE `Text` `Text` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
CHANGE `AJWord` `AJWord` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
CHANGE `CZWord` `CZWord` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
CHANGE `Description` `Description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;


INSERT INTO `dictionary` (SELECT 0 AS ID, ID AS Entry, AJWord AS Text, 0 AS Language, "" AS AJWord, "" AS CZWord, "" AS Description, 0 AS User
FROM `dictionary`
WHERE `Entry` =0);

INSERT INTO `dictionary` (SELECT 0 AS ID, ID AS Entry, CZWord AS Text, 1 AS Language, "" AS AJWord, "" AS CZWord, Description, User
FROM `dictionary`
WHERE `Entry` =0);

DELETE FROM `dictionary` WHERE `Entry` = 0;

ALTER TABLE `dictionary` DROP `AJWord` ,
DROP `CZWord` ;

ALTER TABLE `dictionary` ADD INDEX ( `Language` );
ALTER TABLE `dictionary` ADD INDEX ( `Entry` );
