-- MySQL dump 10.11
--
-- Host: localhost    Database: dabase
-- ------------------------------------------------------
-- Server version	5.0.32-Debian_7etch11-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `articles`
--

DROP TABLE IF EXISTS `articles`;
CREATE TABLE `articles` (
  `id` int(6) NOT NULL auto_increment,
  `topic_id` int(3) NOT NULL default '1',
  `section_id` int(3) NOT NULL default '1',
  `author_id` int(6) NOT NULL default '1',
  `user_id` int(6) NOT NULL default '1',
  `state` tinyint(1) unsigned NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `version` tinyint(3) unsigned NOT NULL default '0',
  `title` varchar(255) NOT NULL default '',
  `keywords` varchar(255) NOT NULL default '',
  `body` mediumtext,
  `intro` mediumtext,
  `outro` mediumtext,
  `chapo` mediumtext NOT NULL,
  `subtitle` varchar(200) NOT NULL default '',
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`),
  KEY `section` (`section_id`),
  KEY `topic` (`topic_id`),
  KEY `user_id` (`user_id`),
  KEY `state` (`state`,`section_id`,`topic_id`),
  KEY `state_2` (`state`,`timestamp`),
  KEY `title` (`title`),
  KEY `state_3` (`state`,`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5815 DEFAULT CHARSET=utf8;

--
-- Table structure for table `articles_sections`
--

DROP TABLE IF EXISTS `articles_sections`;
CREATE TABLE `articles_sections` (
  `id` int(3) NOT NULL auto_increment,
  `section` varchar(50) NOT NULL default '',
  `longname` varchar(50) NOT NULL default '',
  `template` varchar(50) NOT NULL default '',
  `state` tinyint(1) unsigned NOT NULL default '1',
  `main` tinyint(1) unsigned NOT NULL default '1',
  `spec` tinyint(1) unsigned NOT NULL default '0',
  `rank` tinyint(1) unsigned NOT NULL default '0',
  `section_parent` int(3) NOT NULL default '0',
  `has_intro` tinyint(1) unsigned NOT NULL default '0',
  `default_images_sections` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `spec` (`spec`),
  KEY `section_parent` (`section_parent`),
  KEY `state` (`state`,`main`)
) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;

--
-- Table structure for table `auth_users_zones`
--

DROP TABLE IF EXISTS `auth_users_zones`;
CREATE TABLE `auth_users_zones` (
  `user_id` int(6) NOT NULL default '1',
  `zone_id` int(5) NOT NULL default '0',
  `r_read` int(1) NOT NULL default '0',
  `r_write` int(1) NOT NULL default '0',
  KEY `user_id` (`user_id`,`zone_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `auth_zones`
--

DROP TABLE IF EXISTS `auth_zones`;
CREATE TABLE `auth_zones` (
  `id` int(5) NOT NULL auto_increment,
  `name` char(10) NOT NULL default '',
  `state` int(1) NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Table structure for table `board`
--

DROP TABLE IF EXISTS `board`;
CREATE TABLE `board` (
  `id` int(6) NOT NULL auto_increment,
  `message` varchar(255) NOT NULL default '',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `ip` varchar(8) NOT NULL default '0',
  `section` tinyint(3) unsigned NOT NULL default '1',
  `user_id` int(6) NOT NULL default '1',
  PRIMARY KEY  (`id`),
  KEY `timestamp` (`timestamp`)
) ENGINE=MyISAM AUTO_INCREMENT=100568 DEFAULT CHARSET=utf8;

--
-- Table structure for table `board_denied`
--

DROP TABLE IF EXISTS `board_denied`;
CREATE TABLE `board_denied` (
  `user_id` int(6) default NULL,
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `comments`
--

DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments` (
  `id` int(11) NOT NULL auto_increment,
  `subject` varchar(255) NOT NULL default '',
  `body` mediumtext NOT NULL,
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `news_id` int(6) NOT NULL default '0',
  `user_id` int(6) NOT NULL default '1',
  `com_parent` int(11) NOT NULL default '0',
  `com_thread` int(11) NOT NULL default '0',
  `ip` varchar(8) NOT NULL default '0',
  `sig_id` int(6) NOT NULL default '1',
  `res_type` tinyint(3) unsigned NOT NULL default '1',
  `author_id` int(6) NOT NULL default '1',
  `send_email` tinyint(1) NOT NULL default '0',
  `state` tinyint(4) NOT NULL default '0',
  `section_id` tinyint(4) NOT NULL default '1',
  PRIMARY KEY  (`id`),
  KEY `user_id` (`user_id`),
  KEY `com_parent` (`com_parent`),
  KEY `res_type` (`res_type`,`news_id`),
  KEY `score` (`state`)
) ENGINE=MyISAM AUTO_INCREMENT=73951 DEFAULT CHARSET=utf8;

--
-- Table structure for table `comments_abuse`
--

DROP TABLE IF EXISTS `comments_abuse`;
CREATE TABLE `comments_abuse` (
  `event_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `comment_id` int(11) NOT NULL default '0',
  `user_id` int(6) NOT NULL default '1',
  KEY `comment_id` (`comment_id`),
  KEY `event_timestamp` (`event_timestamp`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `comments_audit`
--

DROP TABLE IF EXISTS `comments_audit`;
CREATE TABLE `comments_audit` (
  `event_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `comment_id` int(11) NOT NULL default '0',
  `user_id` int(6) NOT NULL default '1',
  `state` tinyint(1) NOT NULL default '0',
  KEY `comment_id` (`comment_id`),
  KEY `event_timestamp` (`event_timestamp`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `comments_sections`
--

DROP TABLE IF EXISTS `comments_sections`;
CREATE TABLE `comments_sections` (
  `id` tinyint(4) NOT NULL auto_increment,
  `section` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `comments_states`
--

DROP TABLE IF EXISTS `comments_states`;
CREATE TABLE `comments_states` (
  `id` tinyint(4) NOT NULL default '0',
  `state` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `contents_bookmarked`
--

DROP TABLE IF EXISTS `contents_bookmarked`;
CREATE TABLE `contents_bookmarked` (
  `res_type` tinyint(3) unsigned NOT NULL default '1',
  `res_id` int(6) unsigned NOT NULL default '1',
  `user_id` int(6) unsigned NOT NULL default '1',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`res_type`,`res_id`,`user_id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `contents_scored`
--

DROP TABLE IF EXISTS `contents_scored`;
CREATE TABLE `contents_scored` (
  `res_type` tinyint(3) unsigned NOT NULL default '1',
  `res_id` int(6) NOT NULL default '1',
  `user_id` int(6) unsigned NOT NULL default '1',
  `score` tinyint(1) NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`res_type`,`res_id`,`user_id`),
  KEY `id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `countries`
--

DROP TABLE IF EXISTS `countries`;
CREATE TABLE `countries` (
  `id` tinyint(3) unsigned NOT NULL auto_increment,
  `country` char(2) NOT NULL default '',
  `description` varchar(30) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `lang` (`country`)
) ENGINE=MyISAM AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;

--
-- Table structure for table `dates`
--

DROP TABLE IF EXISTS `dates`;
CREATE TABLE `dates` (
  `id` int(6) NOT NULL auto_increment,
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `description` varchar(255) NOT NULL default '',
  `title_id` int(5) NOT NULL default '0',
  `state` tinyint(1) unsigned NOT NULL default '0',
  `user_id` int(6) NOT NULL default '1',
  PRIMARY KEY  (`id`),
  KEY `timestamp2` (`timestamp`),
  KEY `title_id` (`title_id`)
) ENGINE=MyISAM AUTO_INCREMENT=45610 DEFAULT CHARSET=utf8;

--
-- Table structure for table `dates_titles`
--

DROP TABLE IF EXISTS `dates_titles`;
CREATE TABLE `dates_titles` (
  `id` int(5) NOT NULL auto_increment,
  `title` varchar(255) NOT NULL default '',
  `alpha` varchar(255) NOT NULL default '',
  `topic_id` int(3) NOT NULL default '0',
  `main` tinyint(1) unsigned NOT NULL default '0',
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `state` tinyint(1) unsigned NOT NULL default '1',
  `ip` varchar(8) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `title` (`title`),
  KEY `main` (`main`,`topic_id`)
) ENGINE=MyISAM AUTO_INCREMENT=8328 DEFAULT CHARSET=utf8;

--
-- Table structure for table `events`
--

DROP TABLE IF EXISTS `events`;
CREATE TABLE `events` (
  `id` int(11) NOT NULL auto_increment,
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `title` varchar(255) NOT NULL default '',
  `state` tinyint(1) NOT NULL default '0',
  `topic_id` int(6) NOT NULL default '0',
  `details` mediumtext NOT NULL,
  `section_id` int(11) NOT NULL default '1',
  `main_page` tinyint(1) NOT NULL default '1',
  `record_id` int(10) unsigned NOT NULL default '0',
  `generated` tinyint(1) unsigned NOT NULL default '0',
  `level` tinyint(3) unsigned NOT NULL default '0',
  `update_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `end_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `user_id` int(6) NOT NULL default '1',
  `festival_id` int(11) NOT NULL default '0',
  `bug_fixed` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `end_timestamp` (`end_timestamp`,`timestamp`),
  KEY `state` (`state`,`main_page`,`topic_id`,`end_timestamp`),
  KEY `state_2` (`state`,`section_id`,`timestamp`,`end_timestamp`),
  KEY `record_id` (`record_id`),
  KEY `festival_id` (`festival_id`)
) ENGINE=MyISAM AUTO_INCREMENT=3726 DEFAULT CHARSET=utf8;

--
-- Table structure for table `events_default_sections`
--

DROP TABLE IF EXISTS `events_default_sections`;
CREATE TABLE `events_default_sections` (
  `res_type` tinyint(3) unsigned NOT NULL default '0',
  `section_id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`res_type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `events_log`
--

DROP TABLE IF EXISTS `events_log`;
CREATE TABLE `events_log` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `msg` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1094 DEFAULT CHARSET=utf8;

--
-- Table structure for table `events_sections`
--

DROP TABLE IF EXISTS `events_sections`;
CREATE TABLE `events_sections` (
  `id` int(11) NOT NULL auto_increment,
  `section` varchar(100) NOT NULL default '',
  `longname` varchar(255) NOT NULL default '',
  `state` tinyint(1) unsigned NOT NULL default '1',
  `main` tinyint(1) unsigned NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `events_tags_bug`
--

DROP TABLE IF EXISTS `events_tags_bug`;
CREATE TABLE `events_tags_bug` (
  `tag` varchar(255) NOT NULL default '',
  `clean_tag` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`tag`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `festivals`
--

DROP TABLE IF EXISTS `festivals`;
CREATE TABLE `festivals` (
  `id` int(11) NOT NULL auto_increment,
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `title` varchar(255) NOT NULL default '',
  `body` mediumtext,
  `start_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `end_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `state` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;

--
-- Table structure for table `festivals_lineups`
--

DROP TABLE IF EXISTS `festivals_lineups`;
CREATE TABLE `festivals_lineups` (
  `festival_id` int(11) NOT NULL default '0',
  `order_id` tinyint(3) unsigned NOT NULL default '0',
  `lineup_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `subtitle` varchar(255) NOT NULL default '',
  `body` mediumtext,
  PRIMARY KEY  (`festival_id`,`order_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `forums`
--

DROP TABLE IF EXISTS `forums`;
CREATE TABLE `forums` (
  `id` tinyint(4) NOT NULL auto_increment,
  `name` varchar(50) NOT NULL default '',
  `description` varchar(255) NOT NULL default '',
  `state` tinyint(1) unsigned NOT NULL default '0',
  `main_page` tinyint(1) unsigned NOT NULL default '0',
  `is_post` tinyint(1) unsigned NOT NULL default '1',
  PRIMARY KEY  (`id`),
  KEY `state` (`state`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `forums_data`
--

DROP TABLE IF EXISTS `forums_data`;
CREATE TABLE `forums_data` (
  `id` int(10) NOT NULL auto_increment,
  `group_id` tinyint(4) NOT NULL default '0',
  `subject` varchar(255) NOT NULL default '',
  `body` mediumtext,
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `user_id` int(6) NOT NULL default '0',
  `author_id` int(6) NOT NULL default '1',
  `ip` varchar(8) NOT NULL default '',
  `is_sticky` tinyint(1) unsigned NOT NULL default '0',
  `is_locked` tinyint(1) unsigned NOT NULL default '0',
  `send_email` tinyint(1) unsigned NOT NULL default '0',
  `state` tinyint(1) unsigned NOT NULL default '1',
  `sig_id` int(6) NOT NULL default '1',
  PRIMARY KEY  (`id`),
  KEY `group_id` (`state`,`group_id`,`is_sticky`),
  KEY `state` (`state`,`group_id`,`id`),
  KEY `user_id` (`state`,`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=6075 DEFAULT CHARSET=utf8;

--
-- Table structure for table `galleries`
--

DROP TABLE IF EXISTS `galleries`;
CREATE TABLE `galleries` (
  `id` int(4) NOT NULL auto_increment,
  `title` varchar(255) NOT NULL default '',
  `user_id` int(6) NOT NULL default '1',
  `author_id` int(6) NOT NULL default '1',
  `topic_id` int(4) NOT NULL default '0',
  `state` tinyint(1) unsigned NOT NULL default '0',
  `header` mediumtext,
  `content` mediumtext,
  `footer` mediumtext,
  `timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`),
  KEY `topic` (`topic_id`)
) ENGINE=MyISAM AUTO_INCREMENT=158 DEFAULT CHARSET=utf8;

--
-- Table structure for table `images`
--

DROP TABLE IF EXISTS `images`;
CREATE TABLE `images` (
  `id` int(6) NOT NULL auto_increment,
  `name` varchar(250) NOT NULL default '',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `alt` varchar(255) NOT NULL default '',
  `imsection_id` int(3) NOT NULL default '1',
  `path_id` int(3) NOT NULL default '0',
  `state` tinyint(1) unsigned NOT NULL default '0',
  `author_id` int(6) NOT NULL default '1',
  `user_id` int(6) NOT NULL default '1',
  `description` mediumtext NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `path_id` (`path_id`)
) ENGINE=MyISAM AUTO_INCREMENT=9562 DEFAULT CHARSET=utf8;

--
-- Table structure for table `images_path`
--

DROP TABLE IF EXISTS `images_path`;
CREATE TABLE `images_path` (
  `id` int(3) NOT NULL auto_increment,
  `path` varchar(255) NOT NULL default '',
  `tmp` int(1) NOT NULL default '0',
  `state` int(1) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `path` (`path`),
  KEY `state` (`state`)
) ENGINE=MyISAM AUTO_INCREMENT=44 DEFAULT CHARSET=utf8;

--
-- Table structure for table `images_ressources`
--

DROP TABLE IF EXISTS `images_ressources`;
CREATE TABLE `images_ressources` (
  `image_id` int(11) NOT NULL default '0',
  `res_type` tinyint(3) unsigned NOT NULL default '0',
  `res_id` int(11) NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `icon` tinyint(1) unsigned NOT NULL default '0',
  UNIQUE KEY `type_id` (`res_type`,`res_id`,`image_id`),
  KEY `image_id` (`image_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `imsections`
--

DROP TABLE IF EXISTS `imsections`;
CREATE TABLE `imsections` (
  `id` int(3) NOT NULL auto_increment,
  `section` varchar(50) NOT NULL default '',
  `state` int(1) NOT NULL default '1',
  `max_x` int(5) NOT NULL default '0',
  `max_y` int(5) NOT NULL default '0',
  `has_legend` tinyint(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `section` (`section`),
  KEY `state` (`state`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;

--
-- Table structure for table `interest`
--

DROP TABLE IF EXISTS `interest`;
CREATE TABLE `interest` (
  `res_type` tinyint(3) unsigned NOT NULL default '1',
  `res_id` int(6) NOT NULL default '0',
  `interest` int(8) NOT NULL default '0',
  `score` int(8) NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`res_type`,`res_id`),
  KEY `interest` (`interest`),
  KEY `score` (`score`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `lang`
--

DROP TABLE IF EXISTS `lang`;
CREATE TABLE `lang` (
  `id` tinyint(4) NOT NULL auto_increment,
  `lang` char(2) NOT NULL default '',
  `description` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 PACK_KEYS=1;

--
-- Table structure for table `links`
--

DROP TABLE IF EXISTS `links`;
CREATE TABLE `links` (
  `id` int(11) NOT NULL auto_increment,
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `title` varchar(255) NOT NULL default '',
  `body` mediumtext,
  `state` tinyint(1) NOT NULL default '0',
  `main` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=38 DEFAULT CHARSET=utf8;

--
-- Table structure for table `messages`
--

DROP TABLE IF EXISTS `messages`;
CREATE TABLE `messages` (
  `id` int(7) NOT NULL auto_increment,
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `user_id_source` int(6) NOT NULL default '0',
  `user_id_dest` int(6) NOT NULL default '0',
  `state_dest` enum('0','1','2','3') NOT NULL default '0',
  `subject` varchar(150) NOT NULL default '0',
  `body` mediumtext,
  `state_source` enum('0','1','2','3') NOT NULL default '1',
  PRIMARY KEY  (`id`),
  KEY `id` (`id`,`user_id_dest`,`user_id_source`,`timestamp`)
) ENGINE=MyISAM AUTO_INCREMENT=897 DEFAULT CHARSET=utf8;

--
-- Table structure for table `models`
--

DROP TABLE IF EXISTS `models`;
CREATE TABLE `models` (
  `id` int(3) NOT NULL auto_increment,
  `model` varchar(50) NOT NULL default '',
  `template` varchar(50) NOT NULL default '',
  `state` tinyint(1) unsigned NOT NULL default '0',
  `has_country_id` tinyint(1) NOT NULL default '0',
  `has_substyle_id` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `model` (`model`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

--
-- Table structure for table `moderator_last`
--

DROP TABLE IF EXISTS `moderator_last`;
CREATE TABLE `moderator_last` (
  `user_id` int(6) NOT NULL default '0',
  `action` varchar(255) default NULL,
  `lastseen` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`user_id`),
  KEY `lastseen` (`lastseen`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `news`
--

DROP TABLE IF EXISTS `news`;
CREATE TABLE `news` (
  `id` int(6) NOT NULL auto_increment,
  `topic_id` int(3) NOT NULL default '1',
  `section_id` tinyint(3) unsigned NOT NULL default '1',
  `author_id` int(6) NOT NULL default '0',
  `user_id` int(6) NOT NULL default '1',
  `state` tinyint(1) unsigned NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `title` varchar(150) NOT NULL default '',
  `ip` varchar(8) NOT NULL default '0',
  `body` mediumtext,
  `main_page` tinyint(1) unsigned NOT NULL default '1',
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`),
  KEY `user_id` (`user_id`),
  KEY `topic` (`topic_id`),
  KEY `timestamp` (`timestamp`),
  KEY `state` (`state`,`main_page`,`topic_id`)
) ENGINE=MyISAM AUTO_INCREMENT=20623 DEFAULT CHARSET=utf8;

--
-- Table structure for table `news_attachements`
--

DROP TABLE IF EXISTS `news_attachements`;
CREATE TABLE `news_attachements` (
  `id` int(6) NOT NULL auto_increment,
  `news_id` int(6) NOT NULL default '0',
  `attachement` mediumtext NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `news_id` (`news_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2971 DEFAULT CHARSET=utf8;

--
-- Table structure for table `news_author`
--

DROP TABLE IF EXISTS `news_author`;
CREATE TABLE `news_author` (
  `id` int(6) NOT NULL auto_increment,
  `name` varchar(150) NOT NULL default '',
  `contact` varchar(150) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6804 DEFAULT CHARSET=utf8;

--
-- Table structure for table `news_moderated`
--

DROP TABLE IF EXISTS `news_moderated`;
CREATE TABLE `news_moderated` (
  `news_id` int(6) NOT NULL default '0',
  `user_id` int(6) NOT NULL default '0',
  `state` tinyint(1) unsigned NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `res_type` tinyint(3) unsigned NOT NULL default '1',
  KEY `id` (`news_id`,`user_id`),
  KEY `res_type` (`res_type`,`news_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `news_recent`
--

DROP TABLE IF EXISTS `news_recent`;
CREATE TABLE `news_recent` (
  `id` int(6) NOT NULL default '0',
  `title` varchar(150) default '',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `topic_id` int(3) NOT NULL default '0',
  `main_page` tinyint(1) unsigned NOT NULL default '1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `news_sections`
--

DROP TABLE IF EXISTS `news_sections`;
CREATE TABLE `news_sections` (
  `id` int(3) NOT NULL auto_increment,
  `section` varchar(50) default NULL,
  `longname` varchar(255) NOT NULL default '',
  `state` int(1) NOT NULL default '1',
  `main` tinyint(1) unsigned NOT NULL default '1',
  KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `news_urls`
--

DROP TABLE IF EXISTS `news_urls`;
CREATE TABLE `news_urls` (
  `id` int(6) NOT NULL auto_increment,
  `news_id` int(6) NOT NULL default '0',
  `country_id` tinyint(3) unsigned NOT NULL default '0',
  `name` varchar(255) NOT NULL default '',
  `url` varchar(255) NOT NULL default '',
  `hits` int(6) NOT NULL default '0',
  `res_type` tinyint(3) unsigned NOT NULL default '1',
  `description` varchar(255) NOT NULL default '',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`),
  KEY `res_type` (`res_type`,`news_id`),
  KEY `name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=22193 DEFAULT CHARSET=utf8;

--
-- Table structure for table `notes`
--

DROP TABLE IF EXISTS `notes`;
CREATE TABLE `notes` (
  `res_id` int(11) NOT NULL default '0',
  `user_id` int(6) NOT NULL default '1',
  `note` int(2) NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  UNIQUE KEY `user_id` (`user_id`,`res_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `old_forum_ids`
--

DROP TABLE IF EXISTS `old_forum_ids`;
CREATE TABLE `old_forum_ids` (
  `id` int(11) NOT NULL auto_increment,
  `old_id` int(11) NOT NULL,
  `new_id` int(11) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `old_id` (`old_id`)
) ENGINE=MyISAM AUTO_INCREMENT=652 DEFAULT CHARSET=utf8;

--
-- Table structure for table `parameters`
--

DROP TABLE IF EXISTS `parameters`;
CREATE TABLE `parameters` (
  `name` varchar(100) NOT NULL default '',
  `value` varchar(100) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `pboxes`
--

DROP TABLE IF EXISTS `pboxes`;
CREATE TABLE `pboxes` (
  `id` int(6) NOT NULL auto_increment,
  `title` varchar(60) NOT NULL default '',
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `start_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `end_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `state` tinyint(1) unsigned NOT NULL default '0',
  `display_counter` int(10) unsigned NOT NULL default '0',
  `max_display` int(10) unsigned NOT NULL default '0',
  `section_id` tinyint(3) unsigned NOT NULL default '0',
  `content_type` enum('I','H','J','L') NOT NULL default 'I',
  `body` mediumtext NOT NULL,
  `max_daily_display` int(10) unsigned NOT NULL default '0',
  `daily_display_counter` int(10) unsigned NOT NULL default '0',
  `description` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `state` (`state`,`start_timestamp`,`end_timestamp`)
) ENGINE=MyISAM AUTO_INCREMENT=250 DEFAULT CHARSET=utf8;

--
-- Table structure for table `pboxes_sections`
--

DROP TABLE IF EXISTS `pboxes_sections`;
CREATE TABLE `pboxes_sections` (
  `id` tinyint(3) unsigned NOT NULL auto_increment,
  `section` varchar(100) NOT NULL default '',
  `longname` varchar(255) NOT NULL default '',
  `state` tinyint(1) unsigned NOT NULL default '1',
  `main` tinyint(1) unsigned NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `peoples`
--

DROP TABLE IF EXISTS `peoples`;
CREATE TABLE `peoples` (
  `id` smallint(5) unsigned NOT NULL auto_increment,
  `fname` varchar(100) NOT NULL default '',
  `lname` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=38 DEFAULT CHARSET=utf8;

--
-- Table structure for table `peoples_roles`
--

DROP TABLE IF EXISTS `peoples_roles`;
CREATE TABLE `peoples_roles` (
  `id` tinyint(3) unsigned NOT NULL auto_increment,
  `role` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `playlists`
--

DROP TABLE IF EXISTS `playlists`;
CREATE TABLE `playlists` (
  `user_id` int(6) NOT NULL default '1',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `body` mediumtext,
  PRIMARY KEY  (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `poll_answers`
--

DROP TABLE IF EXISTS `poll_answers`;
CREATE TABLE `poll_answers` (
  `question_id` int(6) NOT NULL default '0',
  `answer` varchar(255) NOT NULL default '',
  `number` int(10) NOT NULL default '0',
  `answer_nb` int(3) NOT NULL default '0',
  KEY `question_id` (`question_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `poll_questions`
--

DROP TABLE IF EXISTS `poll_questions`;
CREATE TABLE `poll_questions` (
  `id` int(6) NOT NULL auto_increment,
  `question` varchar(255) NOT NULL default '',
  `comment` varchar(255) NOT NULL default '',
  `date` int(10) NOT NULL default '0',
  `accept` int(2) NOT NULL default '0',
  `state` int(1) NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `multiple` tinyint(1) NOT NULL default '0',
  `number` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `timestamp` (`timestamp`)
) ENGINE=MyISAM AUTO_INCREMENT=110 DEFAULT CHARSET=utf8;

--
-- Table structure for table `quizzes`
--

DROP TABLE IF EXISTS `quizzes`;
CREATE TABLE `quizzes` (
  `id` int(4) NOT NULL auto_increment,
  `title` varchar(150) NOT NULL default '',
  `body` mediumtext,
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `start_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `end_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `state` tinyint(3) unsigned NOT NULL default '0',
  `msg` mediumtext,
  `main` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`id`),
  KEY `state` (`state`,`start_timestamp`,`end_timestamp`)
) ENGINE=MyISAM AUTO_INCREMENT=151 DEFAULT CHARSET=utf8;

--
-- Table structure for table `quizzes_answers`
--

DROP TABLE IF EXISTS `quizzes_answers`;
CREATE TABLE `quizzes_answers` (
  `quiz_form_id` int(10) NOT NULL default '0',
  `quiz_question_id` int(5) NOT NULL default '0',
  `text` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`quiz_form_id`,`quiz_question_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `quizzes_forms`
--

DROP TABLE IF EXISTS `quizzes_forms`;
CREATE TABLE `quizzes_forms` (
  `id` int(10) NOT NULL auto_increment,
  `quiz_id` int(4) NOT NULL default '0',
  `user_id` int(6) NOT NULL default '1',
  `name` varchar(255) NOT NULL default '',
  `address` varchar(255) NOT NULL default '',
  `referer` varchar(255) NOT NULL default '',
  `ip` varchar(8) NOT NULL default '0',
  `hostname` varchar(255) NOT NULL default '',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `email` varchar(100) NOT NULL default '',
  `token` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`id`),
  KEY `quiz_id` (`quiz_id`)
) ENGINE=MyISAM AUTO_INCREMENT=424991 DEFAULT CHARSET=utf8;

--
-- Table structure for table `quizzes_questions`
--

DROP TABLE IF EXISTS `quizzes_questions`;
CREATE TABLE `quizzes_questions` (
  `id` int(5) NOT NULL auto_increment,
  `quiz_id` int(4) NOT NULL default '0',
  `state` tinyint(1) unsigned NOT NULL default '0',
  `text` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `quiz_id` (`quiz_id`,`state`)
) ENGINE=MyISAM AUTO_INCREMENT=319 DEFAULT CHARSET=utf8;

--
-- Table structure for table `quotes`
--

DROP TABLE IF EXISTS `quotes`;
CREATE TABLE `quotes` (
  `id` int(11) NOT NULL auto_increment,
  `author` varchar(50) NOT NULL default '',
  `quote` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;

--
-- Table structure for table `records`
--

DROP TABLE IF EXISTS `records`;
CREATE TABLE `records` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `out_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `substyle_id` smallint(5) unsigned NOT NULL default '0',
  `label_id` smallint(5) unsigned NOT NULL default '0',
  `section_id` tinyint(3) unsigned NOT NULL default '0',
  `title` varchar(255) NOT NULL default '',
  `amazon_asin` varchar(50) NOT NULL default '',
  `state` tinyint(1) unsigned NOT NULL default '0',
  `timestamp_precision` tinyint(3) unsigned NOT NULL default '8',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2051 DEFAULT CHARSET=utf8;

--
-- Table structure for table `records_labels`
--

DROP TABLE IF EXISTS `records_labels`;
CREATE TABLE `records_labels` (
  `id` smallint(5) unsigned NOT NULL auto_increment,
  `title` varchar(255) NOT NULL default '',
  `state` tinyint(1) unsigned NOT NULL default '1',
  `update_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `title` (`title`)
) ENGINE=MyISAM AUTO_INCREMENT=356 DEFAULT CHARSET=utf8;

--
-- Table structure for table `records_peoples`
--

DROP TABLE IF EXISTS `records_peoples`;
CREATE TABLE `records_peoples` (
  `record_id` int(10) unsigned NOT NULL default '0',
  `people_id` smallint(5) unsigned NOT NULL default '0',
  `role_id` tinyint(3) unsigned NOT NULL default '0',
  `order_id` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`record_id`,`people_id`,`role_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='0..N relation records->peoples with an associated role';

--
-- Table structure for table `records_records_labels`
--

DROP TABLE IF EXISTS `records_records_labels`;
CREATE TABLE `records_records_labels` (
  `record_id` int(10) unsigned NOT NULL default '0',
  `records_label_id` smallint(5) unsigned NOT NULL default '0',
  `order_id` tinyint(3) unsigned NOT NULL default '1',
  PRIMARY KEY  (`record_id`,`records_label_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `records_sections`
--

DROP TABLE IF EXISTS `records_sections`;
CREATE TABLE `records_sections` (
  `id` tinyint(3) unsigned NOT NULL auto_increment,
  `section` varchar(100) NOT NULL default '',
  `longname` varchar(255) NOT NULL default '',
  `state` tinyint(1) unsigned NOT NULL default '1',
  `main` tinyint(1) unsigned NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='various sections for records';

--
-- Table structure for table `records_tracklists`
--

DROP TABLE IF EXISTS `records_tracklists`;
CREATE TABLE `records_tracklists` (
  `record_id` int(10) unsigned NOT NULL default '0',
  `order_id` tinyint(3) unsigned NOT NULL default '1',
  `subtitle` varchar(255) NOT NULL default '',
  `tracklist` mediumtext,
  PRIMARY KEY  (`record_id`,`order_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `ressources`
--

DROP TABLE IF EXISTS `ressources`;
CREATE TABLE `ressources` (
  `res_type` tinyint(3) unsigned NOT NULL default '0',
  `res_name` varchar(100) NOT NULL default '',
  `gender` char(1) NOT NULL default '',
  `allow_anonymous` tinyint(1) unsigned NOT NULL default '0',
  `comments_time` int(10) unsigned NOT NULL default '0',
  `link_nb` tinyint(3) unsigned NOT NULL default '0',
  `allow_quick` tinyint(1) unsigned NOT NULL default '0',
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `max_linked_ressources` tinyint(4) NOT NULL default '0',
  `allow_images` tinyint(1) unsigned NOT NULL default '0',
  `res_table` varchar(255) NOT NULL default '',
  `publish_timestamp_field` varchar(255) NOT NULL default '',
  `allow_comments` tinyint(1) unsigned NOT NULL default '0',
  `allow_votes` tinyint(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (`res_type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `ressources_comments`
--

DROP TABLE IF EXISTS `ressources_comments`;
CREATE TABLE `ressources_comments` (
  `res_type` tinyint(3) unsigned NOT NULL default '0',
  `res_id` int(10) unsigned NOT NULL default '0',
  `section_id` tinyint(4) NOT NULL default '1',
  `comment_count` smallint(5) unsigned NOT NULL default '0',
  `comment_last_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `comment_last_user_id` int(11) NOT NULL default '0',
  `comment_last_id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`res_type`,`res_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `ressources_max_links`
--

DROP TABLE IF EXISTS `ressources_max_links`;
CREATE TABLE `ressources_max_links` (
  `res_type_from` tinyint(3) unsigned NOT NULL default '0',
  `res_section_from` int(11) NOT NULL default '0',
  `res_type_to` tinyint(3) unsigned NOT NULL default '0',
  `max_linked_ressources` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`res_type_from`,`res_section_from`,`res_type_to`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `ressources_ressources`
--

DROP TABLE IF EXISTS `ressources_ressources`;
CREATE TABLE `ressources_ressources` (
  `res_type_from` tinyint(3) unsigned NOT NULL default '0',
  `res_id_from` int(6) NOT NULL default '0',
  `res_type_to` tinyint(3) unsigned NOT NULL default '0',
  `res_id_to` int(6) NOT NULL default '0',
  `rank` tinyint(4) unsigned NOT NULL default '0',
  `update_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  UNIQUE KEY `klink` (`res_type_from`,`res_type_to`,`res_id_from`,`res_id_to`),
  KEY `kfrom` (`res_type_from`,`res_id_from`),
  KEY `kto` (`res_type_to`,`res_id_to`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `ressources_views`
--

DROP TABLE IF EXISTS `ressources_views`;
CREATE TABLE `ressources_views` (
  `res_type` tinyint(3) unsigned NOT NULL default '0',
  `res_id` int(10) unsigned NOT NULL default '0',
  `section_id` tinyint(4) NOT NULL default '1',
  `view_count` int(10) unsigned NOT NULL default '0',
  `view_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`section_id`,`res_type`,`res_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `ressources_votes_sessions`
--

DROP TABLE IF EXISTS `ressources_votes_sessions`;
CREATE TABLE `ressources_votes_sessions` (
  `session_id` varchar(255) NOT NULL default '',
  `expiry_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `res_type` tinyint(3) unsigned NOT NULL default '0',
  `res_id` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`session_id`,`res_type`,`res_id`,`expiry_timestamp`),
  KEY `expiry_timestamp` (`expiry_timestamp`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `sessions`
--

DROP TABLE IF EXISTS `sessions`;
CREATE TABLE `sessions` (
  `id` char(32) NOT NULL default '',
  `user_id` int(6) NOT NULL default '0',
  `ip` char(8) NOT NULL default '0',
  `lastseen` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `expire` timestamp NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`),
  KEY `user_id2` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `sig`
--

DROP TABLE IF EXISTS `sig`;
CREATE TABLE `sig` (
  `id` int(6) NOT NULL auto_increment,
  `sig` varchar(250) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=582 DEFAULT CHARSET=utf8;

--
-- Table structure for table `states`
--

DROP TABLE IF EXISTS `states`;
CREATE TABLE `states` (
  `id` tinyint(4) NOT NULL default '0',
  `state` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `stats_daily_guests`
--

DROP TABLE IF EXISTS `stats_daily_guests`;
CREATE TABLE `stats_daily_guests` (
  `guest_count` int(11) NOT NULL default '0',
  `visit_count` int(11) NOT NULL default '0',
  `pages_count` int(11) NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`timestamp`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `stats_guests`
--

DROP TABLE IF EXISTS `stats_guests`;
CREATE TABLE `stats_guests` (
  `guest_id` char(32) NOT NULL default '',
  `counter` int(11) NOT NULL default '1',
  `pages` int(11) NOT NULL default '1',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`guest_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `substyles`
--

DROP TABLE IF EXISTS `substyles`;
CREATE TABLE `substyles` (
  `id` smallint(5) unsigned NOT NULL auto_increment,
  `title` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=105 DEFAULT CHARSET=utf8;

--
-- Table structure for table `tags`
--

DROP TABLE IF EXISTS `tags`;
CREATE TABLE `tags` (
  `id` int(11) NOT NULL auto_increment,
  `tag` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `tag` (`tag`)
) ENGINE=MyISAM AUTO_INCREMENT=9585 DEFAULT CHARSET=utf8;

--
-- Table structure for table `tags_ressources`
--

DROP TABLE IF EXISTS `tags_ressources`;
CREATE TABLE `tags_ressources` (
  `tag_id` int(11) NOT NULL default '0',
  `res_type` tinyint(4) NOT NULL default '0',
  `res_id` int(11) NOT NULL default '0',
  `section_id` tinyint(4) NOT NULL default '0',
  `rank` tinyint(4) NOT NULL default '0',
  `last_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`res_type`,`res_id`,`section_id`,`tag_id`),
  KEY `tag_id` (`tag_id`),
  KEY `res_type` (`res_type`,`section_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `tags_sections`
--

DROP TABLE IF EXISTS `tags_sections`;
CREATE TABLE `tags_sections` (
  `id` tinyint(4) NOT NULL auto_increment,
  `section` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `section` (`section`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `threads_lastseen`
--

DROP TABLE IF EXISTS `threads_lastseen`;
CREATE TABLE `threads_lastseen` (
  `user_id` int(6) NOT NULL default '0',
  `thread_id` int(11) NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`user_id`,`thread_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `tips`
--

DROP TABLE IF EXISTS `tips`;
CREATE TABLE `tips` (
  `id` int(6) NOT NULL auto_increment,
  `tip_section_id` int(6) NOT NULL default '0',
  `user_id` int(6) NOT NULL default '0',
  `state` int(1) NOT NULL default '0',
  `name` varchar(128) NOT NULL default '',
  `tip` mediumtext NOT NULL,
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `tips_sections`
--

DROP TABLE IF EXISTS `tips_sections`;
CREATE TABLE `tips_sections` (
  `id` int(6) NOT NULL auto_increment,
  `tip_section_referer_id` int(6) NOT NULL default '0',
  `tip_section` varchar(50) default NULL,
  `state` int(1) NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Table structure for table `topics`
--

DROP TABLE IF EXISTS `topics`;
CREATE TABLE `topics` (
  `id` int(3) NOT NULL auto_increment,
  `topic` varchar(40) NOT NULL default '',
  `title` varchar(255) NOT NULL default '',
  `state` tinyint(1) unsigned NOT NULL default '0',
  `description` varchar(255) NOT NULL default '',
  `main` tinyint(1) unsigned NOT NULL default '0',
  `topic_parent` int(3) NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `model_id` int(3) NOT NULL default '1',
  `substyle_id` smallint(5) unsigned NOT NULL default '0',
  `country_id` tinyint(3) unsigned NOT NULL default '0',
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `longname` (`title`),
  UNIQUE KEY `topic` (`topic`),
  KEY `topic_parent` (`topic_parent`),
  KEY `state` (`state`,`main`)
) ENGINE=MyISAM AUTO_INCREMENT=2145 DEFAULT CHARSET=utf8;

--
-- Table structure for table `topics_lookup`
--

DROP TABLE IF EXISTS `topics_lookup`;
CREATE TABLE `topics_lookup` (
  `label` varchar(255) NOT NULL default '',
  `topic_id` int(3) NOT NULL default '1',
  `main` int(1) NOT NULL default '0',
  PRIMARY KEY  (`label`),
  KEY `topic_id` (`topic_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `topics_topics`
--

DROP TABLE IF EXISTS `topics_topics`;
CREATE TABLE `topics_topics` (
  `topic_id` int(3) NOT NULL default '0',
  `topic_next` int(3) NOT NULL default '0',
  `state` int(1) default NULL,
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `title` varchar(200) NOT NULL default '',
  UNIQUE KEY `topic2topic` (`topic_id`,`topic_next`),
  KEY `topic` (`topic_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `tracker`
--

DROP TABLE IF EXISTS `tracker`;
CREATE TABLE `tracker` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `title` varchar(255) NOT NULL default '',
  `body` mediumtext,
  `sender_id` int(10) unsigned NOT NULL default '0',
  `assign_id` int(10) unsigned NOT NULL default '0',
  `section_id` tinyint(3) unsigned NOT NULL default '0',
  `open_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `close_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `state` tinyint(1) unsigned NOT NULL default '0',
  `privilege` tinyint(1) unsigned NOT NULL default '1',
  `update_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=126 DEFAULT CHARSET=utf8;

--
-- Table structure for table `tracker_sections`
--

DROP TABLE IF EXISTS `tracker_sections`;
CREATE TABLE `tracker_sections` (
  `id` tinyint(3) unsigned NOT NULL auto_increment,
  `name` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `turing`
--

DROP TABLE IF EXISTS `turing`;
CREATE TABLE `turing` (
  `id` int(11) NOT NULL auto_increment,
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `random` char(25) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `random` (`random`)
) ENGINE=MyISAM AUTO_INCREMENT=688107 DEFAULT CHARSET=utf8;

--
-- Table structure for table `urls_avgtime`
--

DROP TABLE IF EXISTS `urls_avgtime`;
CREATE TABLE `urls_avgtime` (
  `url` varchar(250) NOT NULL default '',
  `avgtime` float NOT NULL default '0',
  `number` int(11) NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `avgsqltime` float NOT NULL default '0',
  UNIQUE KEY `url` (`url`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `urls_sections`
--

DROP TABLE IF EXISTS `urls_sections`;
CREATE TABLE `urls_sections` (
  `id` tinyint(3) unsigned NOT NULL auto_increment,
  `section` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `id` int(6) NOT NULL auto_increment,
  `lname` varchar(40) NOT NULL default '',
  `fname` varchar(40) NOT NULL default '',
  `login` varchar(20) NOT NULL default '',
  `passwd` varchar(40) NOT NULL default '',
  `email` varchar(128) NOT NULL default '',
  `homesite` varchar(255) NOT NULL default '',
  `level` int(20) unsigned NOT NULL default '0',
  `param` int(10) unsigned NOT NULL default '0',
  `created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `sig_id` int(6) NOT NULL default '1',
  `status` tinyint(1) unsigned NOT NULL default '0',
  `lastseen` timestamp NOT NULL default '0000-00-00 00:00:00',
  `ip` varchar(8) NOT NULL default '0',
  `comment_count` smallint(5) unsigned NOT NULL default '0',
  `prev_lastseen` timestamp NOT NULL default '0000-00-00 00:00:00',
  `nickname` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `email` (`email`),
  UNIQUE KEY `login` (`login`),
  KEY `lastseen2` (`lastseen`)
) ENGINE=MyISAM AUTO_INCREMENT=6017 DEFAULT CHARSET=utf8;

--
-- Table structure for table `users_friends`
--

DROP TABLE IF EXISTS `users_friends`;
CREATE TABLE `users_friends` (
  `user_id` int(11) NOT NULL default '0',
  `friend_id` int(11) NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `state` tinyint(1) NOT NULL default '0',
  UNIQUE KEY `user_id` (`user_id`,`friend_id`),
  UNIQUE KEY `friend_id` (`friend_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `users_journal`
--

DROP TABLE IF EXISTS `users_journal`;
CREATE TABLE `users_journal` (
  `id` int(8) NOT NULL auto_increment,
  `user_id` int(6) NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `ip` varchar(8) NOT NULL default '0',
  `subject` varchar(255) NOT NULL default '',
  `body` mediumtext,
  `state` tinyint(1) unsigned NOT NULL default '1',
  `last_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`),
  KEY `user_id` (`user_id`),
  KEY `state` (`state`,`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=393 DEFAULT CHARSET=utf8;

--
-- Table structure for table `users_lastseen`
--

DROP TABLE IF EXISTS `users_lastseen`;
CREATE TABLE `users_lastseen` (
  `user_id` int(6) NOT NULL default '0',
  `obj_id` int(6) NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `res_type` tinyint(3) unsigned NOT NULL default '1',
  `count` smallint(5) unsigned NOT NULL default '1',
  PRIMARY KEY  (`res_type`,`user_id`,`obj_id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `users_shoutbox`
--

DROP TABLE IF EXISTS `users_shoutbox`;
CREATE TABLE `users_shoutbox` (
  `id` int(11) NOT NULL auto_increment,
  `post_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `user_id_from` int(11) NOT NULL default '0',
  `user_id_to` int(11) NOT NULL default '0',
  `body` mediumtext NOT NULL,
  `state` tinyint(1) unsigned NOT NULL default '1',
  PRIMARY KEY  (`id`),
  KEY `user_id_to` (`user_id_to`)
) ENGINE=MyISAM AUTO_INCREMENT=34 DEFAULT CHARSET=utf8;

--
-- Table structure for table `users_supp`
--

DROP TABLE IF EXISTS `users_supp`;
CREATE TABLE `users_supp` (
  `user_id` int(6) NOT NULL default '0',
  `page_public` mediumtext NOT NULL,
  `addr` varchar(255) NOT NULL default '',
  `icq` varchar(100) NOT NULL default '',
  `aim` varchar(100) NOT NULL default '',
  `msn` varchar(100) NOT NULL default '',
  `jabber` varchar(100) NOT NULL default '',
  `audioscrobbler` varchar(30) NOT NULL default '',
  `birth_day` tinyint(4) NOT NULL default '0',
  `birth_month` tinyint(4) NOT NULL default '0',
  `location` varchar(255) NOT NULL default '',
  `about_me` mediumtext NOT NULL,
  `birth_year` mediumint(8) unsigned NOT NULL default '0',
  `user_sex` char(1) NOT NULL default '',
  `page_private` mediumtext NOT NULL,
  PRIMARY KEY  (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `users_tempo`
--

DROP TABLE IF EXISTS `users_tempo`;
CREATE TABLE `users_tempo` (
  `id` int(6) NOT NULL auto_increment,
  `user_id` int(6) NOT NULL default '0',
  `email` varchar(128) NOT NULL default '',
  `tempo_id` int(6) NOT NULL default '0',
  `session_id` varchar(32) NOT NULL default '',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`),
  KEY `session_id` (`session_id`)
) ENGINE=MyISAM AUTO_INCREMENT=504 DEFAULT CHARSET=utf8;

--
-- Table structure for table `venues`
--

DROP TABLE IF EXISTS `venues`;
CREATE TABLE `venues` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(255) NOT NULL default '',
  `address` varchar(255) NOT NULL default '',
  `country_id` tinyint(3) unsigned NOT NULL default '1',
  `phone` varchar(100) NOT NULL default '',
  `state` tinyint(1) NOT NULL default '0',
  `user_id` int(6) NOT NULL default '1',
  `insert_timestamp` timestamp NOT NULL default '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `direction` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `title` (`title`)
) ENGINE=MyISAM AUTO_INCREMENT=246 DEFAULT CHARSET=utf8;

--
-- Table structure for table `xspf_playlist`
--

DROP TABLE IF EXISTS `xspf_playlist`;
CREATE TABLE `xspf_playlist` (
  `artist` varchar(255) NOT NULL default '',
  `annotation` varchar(255) NOT NULL default '',
  `info` varchar(255) NOT NULL default '',
  `location` varchar(255) NOT NULL default '',
  `id` int(11) NOT NULL auto_increment,
  `vote_plus` int(11) NOT NULL default '0',
  `vote_minus` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=189 DEFAULT CHARSET=utf8;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2010-01-18  4:30:59
