Upgrading TightURL ================== As TightURL is still considered Alpha code, there have been some changes that will break existing applications. Upgrading tighturl will change the name of the field "url" in the database to "uri", for the sake of correctness. I promise not to change it again. ALTER TABLE `turonx`.`turonx` CHANGE COLUMN `url` `uri` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL; Please note that those using nightly builds of TightURL may end up with cruft in their databases. Upgrades are designed to work with released versions. There have been many additions to the configuration file. You may wish to review the sample tighturl.config. SPECIAL NOTES TO USERS OF TIGHTURL CODE ======================================= I have considered that there are apparently some users of TightURL code. Nevertheless, as TightURL is still alpha code, and as I don't want to have to carry a lot of cruft forward, I have changed much of the existing code, including some of the function calls. For example, while the function on_URIBL used to return a HTML string, it now returns a non-HTML string array, as the routines in the new TightURL library are designed to work with non-HTML application interfaces. As a result, those who've ripped code from TightURL for use in other applications are strongly advised to carefully examine every line of TightURL code they copy from this version of TightURL into applications designed for TightURL 0.1.x. They are also strongly advised to change their application to use the new tighturl.lib.php library instead of copying and pasting code into their application. The interfaces used in tighturl.lib.php should hopefully remain stable going forward from here. In the future, I anticipate re-writing TightURL as an object-oriented application, although I plan to offer a functional interface library wrapper around the object-oriented library. Current: -------- ALTER TABLE $dbtable ADD COLUMN status TINYINT UNSIGNED NOT NULL AFTER id, CHANGE url url text NOT NULL AFTER status, ADD COLUMN adddate DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER url; ADD COLUMN addip TEXT NOT NULL AFTER adddate, ADD hits int NOT NULL DEFAULT '' AFTER addip, ADD COLUMN lasthit DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER hits, ADD COLUMN checkcount TINYINT UNSIGNED NOT NULL AFTER lasthit, ADD COLUMN lastcheck DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER checkcount, ADD COLUMN complaints INT UNSIGNED NOT NULL AFTER checkcount, ADD COLUMN lastcomplaint DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER complaints; Old: ---- CREATE TABLE `tighturl` ( `id` int(11) unsigned NOT NULL auto_increment, `url` tinytext NOT NULL default '', PRIMARY KEY (`id`)) TYPE=MyISAM; New: ---- CREATE TABLE `turon`.`turon` ( `id` int(11) unsigned NOT NULL auto_increment, `status` tinyint(3) unsigned NOT NULL, `url` text NOT NULL, `adddate` datetime NOT NULL default '0000-00-00 00:00:00', `addip` text NOT NULL, `hits` int(11) NOT NULL default '0', `lasthit` datetime NOT NULL default '0000-00-00 00:00:00', `checkcount` tinyint(3) unsigned NOT NULL, `lastcheck` datetime NOT NULL default '0000-00-00 00:00:00', `complaints` int(10) unsigned NOT NULL, `lastcomplaint` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=10181 DEFAULT CHARSET=latin1;