## SVN $Id$

CREATE TABLE `favourite` (
  `userid` INT(10) UNSIGNED NOT NULL, 
  `bugid` INT(10) UNSIGNED NOT NULL
);

ALTER TABLE `favourite` ADD PRIMARY KEY (`userid`,`bugid`);

CREATE TABLE `vote` (
  `bugid` INT(10) UNSIGNED NOT NULL, 
  `userids` MEDIUMTEXT NOT NULL, 
  `votefor` INT(10) UNSIGNED NOT NULL,
  `voteagainst` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`bugid`)
);

ALTER TABLE `language` DROP `filename`;

CREATE TABLE `search` (
  `userid` INT(10) UNSIGNED NOT NULL, 
  `dateline` INT(20) UNSIGNED NOT NULL, 
  `query` MEDIUMTEXT NOT NULL, 
  `ids` MEDIUMTEXT NOT NULL
);

ALTER TABLE `search` ADD PRIMARY KEY(`userid`);

ALTER TABLE `search` ADD `orderby` MEDIUMTEXT NOT NULL;

ALTER TABLE `search` ADD `hilight` VARCHAR(255) NOT NULL;

ALTER TABLE `language` ADD `debug` INT(2) UNSIGNED NOT NULL;

ALTER TABLE `phrase` DROP INDEX `varname`;

ALTER TABLE `phrase` CHANGE `varname` `localkey` MEDIUMTEXT NOT NULL;

ALTER TABLE `phrase` DROP `imported`;

DROP TABLE `locale`;

ALTER TABLE `phrase` RENAME `localization`;

ALTER TABLE `localization` ADD `languageid` INT(10) UNSIGNED NOT NULL;

ALTER TABLE `localization` ADD `localid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;

ALTER TABLE `localization` CHANGE `phrasetext` `localtext` MEDIUMTEXT NOT NULL;

ALTER TABLE `language` ADD `filename` VARCHAR(255) NOT NULL AFTER `direction`;