2009-02-05 15:22:03 +00:00
|
|
|
-- Semantic Scuttle - Tables creation SQL script
|
2008-03-05 15:50:27 +00:00
|
|
|
-- ! Dont forget to change table names according to $tableprefix defined in config.inc.php !
|
2008-04-21 08:44:44 +00:00
|
|
|
|
2007-12-12 16:29:16 +00:00
|
|
|
--
|
|
|
|
-- Table structure for table `sc_bookmarks`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `sc_bookmarks` (
|
|
|
|
`bId` int(11) NOT NULL auto_increment,
|
|
|
|
`uId` int(11) NOT NULL default '0',
|
|
|
|
`bIp` varchar(40) default NULL,
|
|
|
|
`bStatus` tinyint(1) NOT NULL default '0',
|
|
|
|
`bDatetime` datetime NOT NULL default '0000-00-00 00:00:00',
|
|
|
|
`bModified` datetime NOT NULL default '0000-00-00 00:00:00',
|
|
|
|
`bTitle` varchar(255) NOT NULL default '',
|
2009-02-05 15:22:03 +00:00
|
|
|
`bAddress` varchar(1500) NOT NULL,
|
|
|
|
`bDescription` text default NULL,
|
|
|
|
`bPrivateNote` text default NULL,
|
2007-12-12 16:29:16 +00:00
|
|
|
`bHash` varchar(32) NOT NULL default '',
|
|
|
|
PRIMARY KEY (`bId`),
|
|
|
|
KEY `sc_bookmarks_usd` (`uId`,`bStatus`,`bDatetime`),
|
|
|
|
KEY `sc_bookmarks_hui` (`bHash`,`uId`,`bId`),
|
|
|
|
KEY `sc_bookmarks_du` (`bDatetime`,`uId`)
|
2009-02-05 15:22:03 +00:00
|
|
|
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
2007-12-12 16:29:16 +00:00
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Table structure for table `sc_tags`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `sc_tags` (
|
2008-04-21 08:44:44 +00:00
|
|
|
`tId` int(11) NOT NULL auto_increment,
|
2008-09-24 08:27:34 +00:00
|
|
|
`tag` varchar(100) NOT NULL default '',
|
2008-04-21 08:44:44 +00:00
|
|
|
`uId` int(11) NOT NULL default '0',
|
2009-02-05 15:22:03 +00:00
|
|
|
`tDescription` text default NULL,
|
2008-05-13 17:27:47 +00:00
|
|
|
PRIMARY KEY (`tId`),
|
2008-04-21 08:44:44 +00:00
|
|
|
UNIQUE KEY `sc_tags_tag_uId` (`tag`, `uId`)
|
2009-02-05 15:22:03 +00:00
|
|
|
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
2008-04-21 08:44:44 +00:00
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Table structure for table `sc_bookmarks2tags`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `sc_bookmarks2tags` (
|
2007-12-12 16:29:16 +00:00
|
|
|
`id` int(11) NOT NULL auto_increment,
|
|
|
|
`bId` int(11) NOT NULL default '0',
|
2008-09-24 08:27:34 +00:00
|
|
|
`tag` varchar(100) NOT NULL default '',
|
2007-12-12 16:29:16 +00:00
|
|
|
PRIMARY KEY (`id`),
|
2008-04-21 08:44:44 +00:00
|
|
|
UNIQUE KEY `sc_bookmarks2tags_tag_bId` (`tag`,`bId`),
|
|
|
|
KEY `sc_bookmarks2tags_bId` (`bId`)
|
2009-02-05 15:22:03 +00:00
|
|
|
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
2007-12-12 16:29:16 +00:00
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
2008-01-17 17:18:23 +00:00
|
|
|
-- Table structure for table `sc_users`
|
2007-12-12 16:29:16 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `sc_users` (
|
|
|
|
`uId` int(11) NOT NULL auto_increment,
|
|
|
|
`username` varchar(25) NOT NULL default '',
|
|
|
|
`password` varchar(40) NOT NULL default '',
|
|
|
|
`uDatetime` datetime NOT NULL default '0000-00-00 00:00:00',
|
|
|
|
`uModified` datetime NOT NULL default '0000-00-00 00:00:00',
|
|
|
|
`name` varchar(50) default NULL,
|
|
|
|
`email` varchar(50) NOT NULL default '',
|
|
|
|
`homepage` varchar(255) default NULL,
|
|
|
|
`uContent` text,
|
|
|
|
PRIMARY KEY (`uId`)
|
2009-02-05 15:22:03 +00:00
|
|
|
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
2007-12-12 16:29:16 +00:00
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Table structure for table `sc_watched`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `sc_watched` (
|
|
|
|
`wId` int(11) NOT NULL auto_increment,
|
|
|
|
`uId` int(11) NOT NULL default '0',
|
|
|
|
`watched` int(11) NOT NULL default '0',
|
|
|
|
PRIMARY KEY (`wId`),
|
|
|
|
KEY `sc_watched_uId` (`uId`)
|
2009-02-05 15:22:03 +00:00
|
|
|
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
2008-01-09 15:51:35 +00:00
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
2008-01-17 17:18:23 +00:00
|
|
|
-- Table structure for table `sc_tags2tags`
|
2008-01-09 15:51:35 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `sc_tags2tags` (
|
|
|
|
`ttId` int(11) NOT NULL auto_increment,
|
2008-09-24 08:27:34 +00:00
|
|
|
`tag1` varchar(100) NOT NULL default '',
|
|
|
|
`tag2` varchar(100) NOT NULL default '',
|
2008-01-09 15:51:35 +00:00
|
|
|
`relationType` varchar(32) NOT NULL default '',
|
|
|
|
`uId` int(11) NOT NULL default '0',
|
|
|
|
PRIMARY KEY (`ttId`),
|
|
|
|
UNIQUE KEY `sc_tags2tags_tag1_tag2_uId` (`tag1`,`tag2`,`relationType`,`uId`)
|
2009-02-05 15:22:03 +00:00
|
|
|
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
2008-01-22 16:16:06 +00:00
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Table structure for table `sc_tagsstats`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `sc_tagsstats` (
|
|
|
|
`tstId` int(11) NOT NULL auto_increment,
|
2008-09-24 08:27:34 +00:00
|
|
|
`tag1` varchar(100) NOT NULL default '',
|
2008-01-22 16:16:06 +00:00
|
|
|
`relationType` varchar(32) NOT NULL default '',
|
|
|
|
`uId` int(11) NOT NULL default '0',
|
|
|
|
`nb` int(11) NOT NULL default '0',
|
|
|
|
`depth` int(11) NOT NULL default '0',
|
|
|
|
`nbupdate` int(11) NOT NULL default '0',
|
|
|
|
PRIMARY KEY (`tstId`),
|
|
|
|
UNIQUE KEY `sc_tagsstats_tag1_type_uId` (`tag1`,`relationType`,`uId`)
|
2009-02-05 15:22:03 +00:00
|
|
|
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
2008-02-13 17:34:18 +00:00
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
2008-12-18 11:03:40 +00:00
|
|
|
--
|
|
|
|
-- Table structure for table `sc_tagscache`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `sc_tagscache` (
|
|
|
|
`tcId` int(11) NOT NULL auto_increment,
|
|
|
|
`tag1` varchar(100) NOT NULL default '',
|
|
|
|
`tag2` varchar(100) NOT NULL default '',
|
|
|
|
`relationType` varchar(32) NOT NULL default '',
|
|
|
|
`uId` int(11) NOT NULL default '0',
|
|
|
|
PRIMARY KEY (`tcId`),
|
|
|
|
UNIQUE KEY `sc_tagscache_tag1_tag2_type_uId` (`tag1`,`tag2`,`relationType`,`uId`)
|
2009-02-05 15:22:03 +00:00
|
|
|
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
2008-12-18 11:03:40 +00:00
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
2008-02-13 17:34:18 +00:00
|
|
|
--
|
|
|
|
-- Table structure for table `sc_commondescription`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `sc_commondescription` (
|
|
|
|
`cdId` int(11) NOT NULL auto_increment,
|
|
|
|
`uId` int(11) NOT NULL default '0',
|
2008-09-24 08:27:34 +00:00
|
|
|
`tag` varchar(100) NOT NULL default '',
|
2008-02-13 17:34:18 +00:00
|
|
|
`bHash` varchar(32) NOT NULL default '',
|
|
|
|
`cdTitle` varchar(255) NOT NULL default '',
|
2009-02-05 15:22:03 +00:00
|
|
|
`cdDescription` text default NULL,
|
2008-02-13 17:34:18 +00:00
|
|
|
`cdDatetime` datetime NOT NULL default '0000-00-00 00:00:00',
|
|
|
|
PRIMARY KEY (`cdId`),
|
|
|
|
UNIQUE KEY `sc_commondescription_tag_datetime` (`tag`,`cdDatetime`),
|
|
|
|
UNIQUE KEY `sc_commondescription_bookmark_datetime` (`bHash`,`cdDatetime`)
|
2009-02-05 15:22:03 +00:00
|
|
|
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
2008-03-14 10:32:00 +00:00
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Table structure for table `sc_searchhistory`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `sc_searchhistory` (
|
|
|
|
`shId` int(11) NOT NULL auto_increment,
|
|
|
|
`shTerms` varchar(255) NOT NULL default '',
|
|
|
|
`shRange` varchar(32) NOT NULL default '',
|
|
|
|
`shDatetime` datetime NOT NULL default '0000-00-00 00:00:00',
|
|
|
|
`shNbResults` int(6) NOT NULL default '0',
|
|
|
|
`uId` int(11) NOT NULL default '0',
|
|
|
|
PRIMARY KEY (`shId`)
|
2009-02-05 15:22:03 +00:00
|
|
|
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
|