-- Convert SQL ;)

CREATE TABLE `browser_stats` (
  `name` varchar(20) collate latin1_general_ci NOT NULL default '',
  `hitcount` bigint(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`name`)
) ENGINE=HEAP;


ALTER TABLE `comments` ADD `text_parsed` TEXT NOT NULL AFTER `text` ;
ALTER TABLE `forums` ADD `lastpost_txt` TEXT NOT NULL ;
ALTER TABLE `messages` ADD `msg_parsed` TEXT NOT NULL AFTER `msg` ;
ALTER TABLE `messages` ADD `inverted_added` INT( 10 ) UNSIGNED NOT NULL ;
ALTER TABLE `pollanswers` ADD UNIQUE (
`pollid` ,
`userid`
);
ALTER TABLE `posts` ADD `body_parsed` TEXT NOT NULL AFTER `body` ;
ALTER TABLE `sitelog` ADD `inverted_timestamp` INT( 10 ) UNSIGNED NOT NULL ;
ALTER TABLE `sitelog` ADD INDEX ( `inverted_timestamp` );

CREATE TABLE `thanks` (
  `torrentid` int(11) NOT NULL default '0',
  `userid` int(11) NOT NULL default '0',
  `id` int(11) NOT NULL auto_increment,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `torrentid` (`torrentid`,`userid`)
) ENGINE=MyISAM;

ALTER TABLE `topics` ADD `lastpost_txt` TEXT NOT NULL ,
ADD `replies` INT( 10 ) UNSIGNED NOT NULL ;

ALTER TABLE `torrents` ADD `descr_parsed` TEXT NOT NULL AFTER `descr` ;
ALTER TABLE `torrents` ADD `inverted_timestamp` INT( 10 ) UNSIGNED NOT NULL ,
ADD `description` VARCHAR( 120 ) NOT NULL ;

ALTER TABLE `users` ADD `anonymous` ENUM( 'yes', 'no' ) NOT NULL AFTER `savepms` ;
ALTER TABLE `users` ADD `override_class` TINYINT( 3 ) DEFAULT '255' NOT NULL AFTER `class` ;
ALTER TABLE `users` ADD `comments` MEDIUMINT( 10 ) UNSIGNED NOT NULL AFTER `invitedate` ,
ADD `posts` MEDIUMINT( 10 ) UNSIGNED NOT NULL AFTER `comments` ,
ADD `messages` MEDIUMINT( 10 ) UNSIGNED NOT NULL AFTER `posts` ,
ADD `inverted_added` INT( 10 ) NOT NULL AFTER `messages` ,
ADD `support` ENUM( 'yes', 'no' ) NOT NULL AFTER `inverted_added` ,
ADD `supportfor` TEXT NOT NULL AFTER `support` ,
ADD `client` INT( 10 ) UNSIGNED NOT NULL AFTER `supportfor` ;

