Location: PHPKode > scripts > Football Pool > football-pool/data/update.txt
INSERT INTO {$prefix}bonusquestions_type ( question_id, type, options, image )
SELECT q.id, 1, '', ''
FROM {$prefix}bonusquestions q
LEFT OUTER JOIN {$prefix}bonusquestions_type qt
	ON ( qt.question_id = q.id )
WHERE qt.type IS NULL;

ALTER TABLE `{$prefix}bonusquestions` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `{$prefix}bonusquestions` CHANGE `question` `question` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
ALTER TABLE `{$prefix}bonusquestions` CHANGE `answer` `answer` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';

ALTER TABLE `{$prefix}bonusquestions_type` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `{$prefix}bonusquestions_type` CHANGE `options` `options` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `{$prefix}bonusquestions_type` CHANGE `image` `image` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

ALTER TABLE `{$prefix}bonusquestions_useranswers` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `{$prefix}bonusquestions_useranswers` CHANGE `answer` `answer` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

ALTER TABLE `{$prefix}groups` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `{$prefix}groups` CHANGE `name` `name` VARCHAR( 40 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';

ALTER TABLE `{$prefix}leagues` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `{$prefix}leagues` CHANGE `name` `name` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
ALTER TABLE `{$prefix}leagues` CHANGE `image` `image` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

ALTER TABLE `{$prefix}matchtypes` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `{$prefix}matchtypes` CHANGE `name` `name` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';

ALTER TABLE `{$prefix}shoutbox` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `{$prefix}shoutbox` CHANGE `shoutText` `shoutText` TINYTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

ALTER TABLE `{$prefix}stadiums` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `{$prefix}stadiums` CHANGE `name` `name` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
ALTER TABLE `{$prefix}stadiums` CHANGE `photo` `photo` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
ALTER TABLE `{$prefix}stadiums` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;

ALTER TABLE `{$prefix}teams` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `{$prefix}teams` CHANGE `name` `name` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
ALTER TABLE `{$prefix}teams` CHANGE `photo` `photo` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
ALTER TABLE `{$prefix}teams` CHANGE `flag` `flag` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
ALTER TABLE `{$prefix}teams` CHANGE `link` `link` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
ALTER TABLE `{$prefix}teams` CHANGE `id` `id` INT NOT NULL AUTO_INCREMENT;

ALTER TABLE `{$prefix}matches` CHANGE `nr` `nr` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
CHANGE `stadiumId` `stadiumId` INT UNSIGNED NOT NULL ,
CHANGE `homeTeamId` `homeTeamId` INT NOT NULL ,
CHANGE `awayTeamId` `awayTeamId` INT NOT NULL ,
CHANGE `matchtypeId` `matchtypeId` INT UNSIGNED NOT NULL;

ALTER TABLE `{$prefix}bonusquestions_useranswers` CHANGE `questionId` `questionId` INT UNSIGNED NOT NULL;
Return current item: Football Pool