CREATE TABLE `bibtex` (
  `content_id` int(10) unsigned NOT NULL default '0',
  `journal` text,
  `volume` varchar(255) default NULL,
  `chapter` varchar(255) default NULL,
  `edition` varchar(255) default NULL,
  `month` varchar(45) default NULL,
  `day` varchar(45) default NULL,
  `booktitle` text,
  `howPublished` varchar(255) default NULL,
  `institution` varchar(255) default NULL,
  `organization` varchar(255) default NULL,
  `publisher` varchar(255) default NULL,
  `address` varchar(255) default NULL,
  `school` varchar(255) default NULL,
  `series` varchar(255) default NULL,
  `bibtexKey` varchar(255) default NULL,
  `url` text,
  `type` varchar(255) default NULL,
  `description` text,
  `annote` varchar(255) default NULL,
  `note` text,
  `pages` varchar(15) default NULL,
  `bKey` varchar(255) default NULL,
  `number` varchar(45) default NULL,
  `crossref` varchar(255) default NULL,
  `misc` text,
  `bibtexAbstract` text,
  `simhash0` char(32) NOT NULL default '',
  `simhash1` char(32) NOT NULL default '',
  `simhash2` char(32) NOT NULL default '',
  `entrytype` varchar(30) default NULL,
  `title` text,
  `author` text,
  `editor` text,
  `year` varchar(45) default NULL
);

CREATE TABLE `bibtex_spam` (
  `content_id` int(10) unsigned NOT NULL default '0',
  `journal` text,
  `volume` varchar(255) default NULL,
  `chapter` varchar(255) default NULL,
  `edition` varchar(255) default NULL,
  `month` varchar(45) default NULL,
  `day` varchar(45) default NULL,
  `booktitle` text,
  `howPublished` varchar(255) default NULL,
  `institution` varchar(255) default NULL,
  `organization` varchar(255) default NULL,
  `publisher` varchar(255) default NULL,
  `address` varchar(255) default NULL,
  `school` varchar(255) default NULL,
  `series` varchar(255) default NULL,
  `bibtexKey` varchar(255) default NULL,
  `url` text,
  `type` varchar(255) default NULL,
  `description` text,
  `annote` varchar(255) default NULL,
  `note` text,
  `pages` varchar(15) default NULL,
  `bKey` varchar(255) default NULL,
  `number` varchar(45) default NULL,
  `crossref` varchar(255) default NULL,
  `misc` text,
  `bibtexAbstract` text,
  `simhash0` char(32) NOT NULL default '',
  `simhash1` char(32) NOT NULL default '',
  `simhash2` char(32) NOT NULL default '',
  `entrytype` varchar(30) default NULL,
  `title` text,
  `author` text,
  `editor` text,
  `year` varchar(45) default NULL
);

CREATE TABLE `bookmark` (
  `content_id` int(10) unsigned NOT NULL default '0',
  `book_url_hash` varchar(32) NOT NULL default '',
  `book_url` text NOT NULL,
  `book_description` text NOT NULL,
  `book_extended` text,
  `date` datetime NOT NULL default '1815-12-10 00:00:00'
);

CREATE TABLE `bookmark_spam` (
  `content_id` int(10) unsigned NOT NULL default '0',
  `book_url_hash` varchar(32) NOT NULL default '',
  `book_url` text NOT NULL,
  `book_description` text NOT NULL,
  `book_extended` text,
  `date` datetime NOT NULL default '1815-12-10 00:00:00'
);

CREATE TABLE `tas` (
  `user_id` int(10) unsigned NOT NULL default '0',
  `tag_name` varchar(255) character set utf8 collate utf8_bin NOT NULL default '',
  `content_id` int(10) unsigned NOT NULL default '0',
  `content_type` tinyint(1) unsigned default NULL,
  `date` datetime NOT NULL default '1815-12-10 00:00:00',
  KEY `content_id_idx` (`content_id`),
  KEY `user_name_idx` (`user_id`)
);

CREATE TABLE `tas_spam` (
  `user_id` int(10) unsigned NOT NULL default '0',
  `tag_name` varchar(255) character set utf8 collate utf8_bin NOT NULL default '',
  `content_id` int(10) unsigned NOT NULL default '0',
  `content_type` tinyint(1) unsigned default NULL,
  `date` datetime NOT NULL default '1815-12-10 00:00:00'
);

CREATE TABLE `user_spam` (
  `user_id` int(10) unsigned NOT NULL default '0',
  `spammer` tinyint(1) NOT NULL default '0'
);

load data INFILE '/tmp/bibtex' INTO TABLE bibtex;
load data INFILE '/tmp/bibtex_spam' INTO TABLE bibtex_spam;
load data INFILE '/tmp/bookmark' INTO TABLE bookmark;
load data INFILE '/tmp/bookmark_spam' INTO TABLE bookmark_spam;
load data INFILE '/tmp/tas' INTO TABLE tas;
load data INFILE '/tmp/tas_spam' INTO TABLE tas_spam;
load data INFILE '/tmp/user_spam' INTO TABLE user_spam;



