Location: PHPKode > projects > TorrentTrader > TorrentTrader-v2.06/Upgrading from v2.x.txt
Last Updated: 07/Feb/10 21:41

======================================
This applies to any version under 2.06
======================================
SQL:
ALTER TABLE `warnings` ADD `active` ENUM('yes', 'no') DEFAULT 'yes'; 
ALTER TABLE `completed` ADD UNIQUE `userid_torrentid` (`userid`, `torrentid`);
add to backend/config.php:
$site_config['ENABLEINVITES'] = true;		// Enable invites regardless of INVITEONLY setting
$site_config['maxusers'] = 20000; // Max # of enabled accounts
$site_config['maxusers_invites'] = $site_config['maxsiteusers'] + 5000; // Max # of enabled accounts when inviting

// Caching settings
$site_config["cache_type"] = "disk"; // disk = Save cache to disk, memcache = Use memcache, apc = Use APC
$site_config["cache_memcache_host"] = "localhost"; // Host memcache is running on
$site_config["cache_memcache_port"] = 11211; // Port memcache is running on
$site_config['cache_dir'] = getcwd().'/cache'; // Cache dir (only used if type is "disk"). Must be CHMOD 777


=========================
Upgrading from v2.00-2.02
=========================
Change the version number in config.php
Overwrite all files except backend/mysql.php and backend/config.php then run the following SQL:
ALTER TABLE `users` ADD `tzoffset` INT(4) UNSIGNED DEFAULT 0;
ALTER TABLE `categories` ADD UNIQUE `parent_cat-name` (`parent_cat`, `name` );
ALTER TABLE `torrents` ADD `anon` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' AFTER `owner`;
UPDATE `torrents` SET `anon` = 'yes' WHERE `owner` = 0;
add:
$site_config["torrenttable_columns"] = "category,name,dl,uploader,comments,size,seeders,leechers,health,external";
$site_config["torrenttable_expand"] = "";
to config.php


=========================
Upgrading from v2.03
=========================
Change the version number in config.php
SQL:
ALTER TABLE `categories` ADD UNIQUE `parent_cat-name` (`parent_cat`, `name` );
ALTER TABLE `torrents` ADD `anon` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' AFTER `owner`;
UPDATE `torrents` SET `anon` = 'yes' WHERE `owner` = 0;
add:
$site_config["torrenttable_columns"] = "category,name,dl,uploader,comments,size,seeders,leechers,health,external";
$site_config["torrenttable_expand"] = "";
to config.php


=========================
Upgrading from v2.04
=========================

Change the version number in config.php
Overwite all files except backend/mysql.php and backend/config.php
SQL:
CREATE TABLE `censor` (
  `word` varchar(10) NOT NULL default '',
  `censor` varchar(10) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

INSERT INTO `censor` VALUES ('fuck', 'f**k');
Return current item: TorrentTrader