SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!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 */;

-- --------------------------------------------------------

--
-- Structure de la table `abonnements`
--

CREATE TABLE IF NOT EXISTS `abonnements` (
  `journal` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `last_check` date DEFAULT NULL,
  UNIQUE KEY `journal` (`journal`,`email`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `abonnements_queue`
--

CREATE TABLE IF NOT EXISTS `abonnements_queue` (
  `journal` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `ecrit` int(10) unsigned NOT NULL,
  `date` datetime NOT NULL,
  PRIMARY KEY (`ecrit`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `acces_prives`
--

CREATE TABLE IF NOT EXISTS `acces_prives` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `membre` int(11) DEFAULT NULL,
  `journal` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `login` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `password` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `membre` (`membre`,`journal`),
  KEY `journal` (`journal`,`login`,`password`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=659 ;

-- --------------------------------------------------------

--
-- Structure de la table `ecrits`
--

CREATE TABLE IF NOT EXISTS `ecrits` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `journal` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `titre` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
  `date` int(20) DEFAULT NULL,
  `ip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `mois` int(6) NOT NULL DEFAULT '0',
  `uri` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `status` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `journal` (`journal`),
  KEY `mois` (`mois`),
  KEY `uri` (`uri`),
  KEY `status` (`status`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=123210 ;

-- --------------------------------------------------------

--
-- Structure de la table `ecrits_html`
--

CREATE TABLE IF NOT EXISTS `ecrits_html` (
  `id` int(11) NOT NULL DEFAULT '0',
  `texte` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  FULLTEXT KEY `texte` (`texte`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `forums`
--

CREATE TABLE IF NOT EXISTS `forums` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `journal` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `nom` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `contact` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `titre` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Pas de sujet',
  `date` int(20) DEFAULT NULL,
  `parent` int(11) NOT NULL DEFAULT '0',
  `dernier_message` int(20) DEFAULT NULL,
  `ip` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
  `reponses` int(3) NOT NULL DEFAULT '0',
  `uri` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `status` tinyint(4) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `journal` (`journal`),
  KEY `parent` (`parent`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=82922 ;

-- --------------------------------------------------------

--
-- Structure de la table `forums_textes`
--

CREATE TABLE IF NOT EXISTS `forums_textes` (
  `id` int(11) NOT NULL DEFAULT '0',
  `texte` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `journaux`
--

CREATE TABLE IF NOT EXISTS `journaux` (
  `id` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `auteur` int(11) NOT NULL DEFAULT '0',
  `titre` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `texte` text COLLATE utf8_unicode_ci,
  `statut` tinyint(4) NOT NULL DEFAULT '0',
  `forum` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `abonnement` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `contact` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `print` int(11) NOT NULL DEFAULT '0',
  `dernier` int(11) NOT NULL DEFAULT '0',
  `visuel` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'default',
  `force_private` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `notifications` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `statut` (`statut`),
  KEY `auteur` (`auteur`),
  KEY `force_private` (`force_private`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `membres`
--

CREATE TABLE IF NOT EXISTS `membres` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(200) CHARACTER SET latin1 NOT NULL DEFAULT '',
  `password` varchar(32) CHARACTER SET latin1 NOT NULL DEFAULT '',
  `date` int(20) DEFAULT NULL,
  `ip` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
  `courant` varchar(30) CHARACTER SET latin1 DEFAULT NULL,
  `timezone` varchar(200) CHARACTER SET latin1 NOT NULL DEFAULT 'Europe/Paris',
  `date_inscription` int(11) NOT NULL DEFAULT '0',
  `ip_inscription` varchar(50) CHARACTER SET latin1 NOT NULL DEFAULT '',
  `banned` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `session_id` varchar(32) CHARACTER SET latin1 DEFAULT NULL,
  `admin` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`),
  KEY `date` (`date`),
  KEY `session_id` (`session_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=11907 ;

-- --------------------------------------------------------

--
-- Structure de la table `user_secret_keys`
--

CREATE TABLE IF NOT EXISTS `user_secret_keys` (
  `key` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `action` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `expires` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `content` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`key`),
  KEY `action` (`action`,`user_id`,`expires`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
