# IncDirectory SQL dump for 0.5a
# Incutio Limited
# www.incutio.com
# Andrew Piggott : andy@incutio.com


#
# Table structure for table 'incDirectoryBreadCache'
#
CREATE TABLE `incDirectoryBreadCache` (
  `categoryID` int(10) unsigned NOT NULL default '0',
  `breadcrumbObject` text NOT NULL,
  UNIQUE KEY `id_2` (`categoryID`),
  KEY `id` (`categoryID`)
) TYPE=MyISAM;



#
# Table structure for table 'incDirectoryCategories'
#
CREATE TABLE `incDirectoryCategories` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `name` varchar(50) default '0',
  `shortname` varchar(20) default '0',
  `description` text,
  `parentCategory` int(10) unsigned default '0',
  `numLinks` int(10) unsigned default '0',
  `numLinksTotal` int(10) unsigned default '0',
  `numCats` int(10) unsigned default '0',
  `numCatsTotal` int(10) unsigned default '0',
  `enableSubmit` enum('yes','no') default 'yes',
  PRIMARY KEY  (`id`),
  KEY `name` (`name`),
  KEY `shortname` (`shortname`),
  KEY `parentCategory` (`parentCategory`),
  FULLTEXT KEY `fulltextSearch` (`name`,`description`)
) TYPE=MyISAM;



#
# Table structure for table 'incDirectoryHits'
#
CREATE TABLE `incDirectoryHits` (
  `linkID` int(11) NOT NULL default '0',
  `datetime` datetime default NULL,
  `userAgent` varchar(255) default NULL,
  KEY `linkID` (`linkID`,`datetime`)
) TYPE=MyISAM COMMENT='records the number of hits for each link with a date';



#
# Table structure for table 'incDirectoryLinks'
#
CREATE TABLE `incDirectoryLinks` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `parentCategory` int(11) unsigned default NULL,
  `title` varchar(80) default NULL,
  `url` varchar(255) default NULL,
  `description` text,
  `numHits` int(11) unsigned default '0',
  `numVotes` int(11) unsigned default '0',
  `totalRating` int(11) unsigned default '0',
  `isVisible` enum('no','yes') NOT NULL default 'no',
  `isCool` enum('no','yes') NOT NULL default 'no',
  `dateAdded` datetime default NULL,
  `dateEdited` datetime default NULL,
  `ownerName` varchar(20) default NULL,
  `ownerEmail` varchar(60) default NULL,
  `ownerPassword` varchar(10) default NULL,
  PRIMARY KEY  (`id`),
  KEY `parentCategory` (`parentCategory`),
  KEY `parentCatAndVisible` (`parentCategory`,`isVisible`),
  FULLTEXT KEY `title` (`title`,`description`)
) TYPE=MyISAM;



#
# Table structure for table 'incDirectorySearches'
#
CREATE TABLE `incDirectorySearches` (
  `datetime` datetime default NULL,
  `searchTerms` varchar(255) default NULL,
  `searchType` enum('AND','OR') default 'AND',
  `noCategoryResults` smallint(5) unsigned default '0',
  `noLinksResults` smallint(5) unsigned default '0',
  KEY `datetime` (`datetime`,`searchType`)
) TYPE=MyISAM COMMENT='Record search success information';