Subversion Repositories eFlore/Applications.del

Rev

Rev 1210 | Rev 1267 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le : Mer 30 Janvier 2013 à 16:55
-- Version du serveur: 5.5.16
-- Version de PHP: 5.3.8

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


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

--
-- Base de données: `del`
--

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

--
-- Structure de la table `del_commentaire`
--

CREATE TABLE IF NOT EXISTS `del_commentaire` (
  `id_commentaire` bigint(20) NOT NULL AUTO_INCREMENT,
  `ce_observation` bigint(20) NOT NULL,
  `ce_proposition` int(11) DEFAULT '0',
  `ce_commentaire_parent` bigint(20) DEFAULT '0',
  `texte` text CHARACTER SET utf8,
  `ce_utilisateur` int(11) DEFAULT '0',
  `utilisateur_prenom` varchar(255) CHARACTER SET utf8 NOT NULL,
  `utilisateur_nom` varchar(255) CHARACTER SET utf8 NOT NULL,
  `utilisateur_courriel` varchar(255) CHARACTER SET utf8 NOT NULL,
  `nom_sel` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
  `nom_sel_nn` decimal(9,0) DEFAULT NULL,
  `nom_ret` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
  `nom_ret_nn` decimal(9,0) DEFAULT NULL,
  `nt` decimal(9,0) DEFAULT NULL,
  `famille` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
  `nom_referentiel` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
  `date` datetime NOT NULL,
  `proposition_initiale` int(1) DEFAULT '0',
  PRIMARY KEY (`id_commentaire`),
  KEY `ce_commentaire_parent` (`ce_commentaire_parent`),
  KEY `ce_proposition` (`ce_proposition`),
  KEY `ce_utilisateur` (`ce_utilisateur`),
  KEY `ce_observation` (`ce_observation`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=255 ;

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

--
-- Structure de la table `del_commentaire_vote`
--

CREATE TABLE IF NOT EXISTS `del_commentaire_vote` (
  `id_vote` bigint(20) NOT NULL AUTO_INCREMENT,
  `ce_proposition` bigint(20) NOT NULL,
  `ce_utilisateur` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0' COMMENT 'Identifiant de session ou id de l''utilisateur.',
  `valeur` tinyint(1) NOT NULL,
  `date` datetime NOT NULL,
  PRIMARY KEY (`id_vote`),
  UNIQUE KEY `ce_proposition_2` (`ce_proposition`,`ce_utilisateur`),
  KEY `ce_utilisateur` (`ce_utilisateur`),
  KEY `ce_proposition` (`ce_proposition`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='Vote uniquement sur le commentaire de type ''proposition''.' AUTO_INCREMENT=117 ;

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

--
-- Doublure de structure pour la vue `del_image`
--
CREATE TABLE IF NOT EXISTS `del_image` (
`id_image` bigint(20)
,`ce_utilisateur` varchar(128)
,`hauteur` int(11)
,`largeur` int(11)
,`date_prise_de_vue` datetime
,`mots_cles_texte` longtext
,`commentaire` longtext
,`nom_original` varchar(255)
,`date_modification` datetime
,`date_creation` datetime
,`publiable_eflore` tinyint(4)
);
-- --------------------------------------------------------

--
-- Structure de la table `del_image_protocole`
--

CREATE TABLE IF NOT EXISTS `del_image_protocole` (
  `id_protocole` int(11) NOT NULL AUTO_INCREMENT,
  `intitule` varchar(255) NOT NULL,
  `descriptif` text,
  `tag` varchar(255) NOT NULL,
  PRIMARY KEY (`id_protocole`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

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

--
-- Structure de la table `del_image_tag`
--

CREATE TABLE IF NOT EXISTS `del_image_tag` (
  `id_tag` bigint(20) NOT NULL AUTO_INCREMENT,
  `ce_image` bigint(20) NOT NULL,
  `ce_utilisateur` varchar(32) NOT NULL,
  `tag` varchar(255) NOT NULL,
  `tag_normalise` varchar(255) NOT NULL,
  `date` datetime NOT NULL COMMENT 'Date de création du tag.',
  `actif` int(1) NOT NULL,
  `date_modification` datetime NOT NULL,
  PRIMARY KEY (`id_tag`),
  KEY `tag` (`tag`),
  KEY `tag_normalise` (`tag_normalise`),
  KEY `ce_image` (`ce_image`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=102 ;

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

--
-- Structure de la table `del_image_vote`
--

CREATE TABLE IF NOT EXISTS `del_image_vote` (
  `id_vote` bigint(20) NOT NULL AUTO_INCREMENT,
  `ce_image` bigint(20) NOT NULL,
  `ce_protocole` int(11) NOT NULL,
  `ce_utilisateur` varchar(32) NOT NULL COMMENT 'Identifiant de session ou id utilisateur.',
  `valeur` tinyint(1) NOT NULL,
  `date` datetime NOT NULL,
  PRIMARY KEY (`id_vote`),
  UNIQUE KEY `ce_image_2` (`ce_image`,`ce_protocole`,`ce_utilisateur`),
  KEY `ce_protocole` (`ce_protocole`),
  KEY `ce_image` (`ce_image`),
  KEY `ce_utilisateur` (`ce_utilisateur`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=61 ;

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

--
-- Doublure de structure pour la vue `del_observation`
--
CREATE TABLE IF NOT EXISTS `del_observation` (
`id_observation` bigint(20)
,`ce_utilisateur` varchar(128)
,`nom_sel` varchar(255)
,`nom_sel_nn` int(11)
,`nom_ret` varchar(255)
,`nom_ret_nn` int(11)
,`nt` int(11)
,`famille` varchar(255)
,`ce_zone_geo` varchar(50)
,`zone_geo` varchar(255)
,`lieudit` varchar(255)
,`station` varchar(255)
,`milieu` varchar(255)
,`date_observation` datetime
,`mots_cles_texte` longtext
,`commentaire` text
,`date_creation` datetime
,`date_modification` datetime
,`date_transmission` datetime
);
-- --------------------------------------------------------

--
-- Doublure de structure pour la vue `del_obs_image`
--
CREATE TABLE IF NOT EXISTS `del_obs_image` (
`id_image` int(11)
,`id_observation` int(11)
,`date_liaison` datetime
);
-- --------------------------------------------------------

--
-- Doublure de structure pour la vue `del_utilisateur`
--
CREATE TABLE IF NOT EXISTS `del_utilisateur` (
`id_utilisateur` int(11)
,`prenom` varchar(32)
,`nom` varchar(32)
,`courriel` varchar(128)
,`mot_de_passe` varchar(32)
);
-- --------------------------------------------------------

--
-- Structure de la table `del_utilisateur_infos`
--

CREATE TABLE IF NOT EXISTS `del_utilisateur_infos` (
  `id_utilisateur` int(11) NOT NULL,
  `admin` tinyint(1) NOT NULL,
  `preferences` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `date_premiere_utilisation` datetime DEFAULT NULL,
  PRIMARY KEY (`id_utilisateur`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la vue `del_image`
--
DROP TABLE IF EXISTS `del_image`;

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `del_image` AS select `i`.`id_image` AS `id_image`,`i`.`ce_utilisateur` AS `ce_utilisateur`,`i`.`hauteur` AS `hauteur`,`i`.`largeur` AS `largeur`,`i`.`date_prise_de_vue` AS `date_prise_de_vue`,`i`.`mots_cles_texte` AS `mots_cles_texte`,`i`.`commentaire` AS `commentaire`,`i`.`nom_original` AS `nom_original`,`i`.`date_modification` AS `date_modification`,`i`.`date_creation` AS `date_creation`,`i`.`publiable_eflore` AS `publiable_eflore` from (((`tb_cel`.`cel_images` `i` join `tb_cel`.`cel_obs_images` `oi` on((`i`.`id_image` = `oi`.`id_image`))) join `tb_cel`.`cel_obs` `o` on((`oi`.`id_observation` = `o`.`id_observation`))) join `tb_cel`.`cel_utilisateurs_infos` `u` on((`i`.`ce_utilisateur` = `u`.`id_utilisateur`))) where (`o`.`transmission` = '1');

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

--
-- Structure de la vue `del_observation`
--
DROP TABLE IF EXISTS `del_observation`;

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `del_observation` AS select `o`.`id_observation` AS `id_observation`,`o`.`ce_utilisateur` AS `ce_utilisateur`,`o`.`nom_sel` AS `nom_sel`,`o`.`nom_sel_nn` AS `nom_sel_nn`,`o`.`nom_ret` AS `nom_ret`,`o`.`nom_ret_nn` AS `nom_ret_nn`,`o`.`nt` AS `nt`,`o`.`famille` AS `famille`,`o`.`ce_zone_geo` AS `ce_zone_geo`,`o`.`zone_geo` AS `zone_geo`,`o`.`lieudit` AS `lieudit`,`o`.`station` AS `station`,`o`.`milieu` AS `milieu`,`o`.`date_observation` AS `date_observation`,`o`.`mots_cles_texte` AS `mots_cles_texte`,`o`.`commentaire` AS `commentaire`,`o`.`date_creation` AS `date_creation`,`o`.`date_modification` AS `date_modification`,`o`.`date_transmission` AS `date_transmission` from ((`tb_cel`.`cel_obs` `o` join `tb_cel`.`cel_utilisateurs_infos` `u` on((`o`.`ce_utilisateur` = `u`.`id_utilisateur`))) join `tb_cel`.`cel_obs_images` `coi` on((`o`.`id_observation` = `coi`.`id_observation`))) where (`o`.`transmission` = '1');

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

--
-- Structure de la vue `del_obs_image`
--
DROP TABLE IF EXISTS `del_obs_image`;

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `del_obs_image` AS select `oi`.`id_image` AS `id_image`,`oi`.`id_observation` AS `id_observation`,`oi`.`date_liaison` AS `date_liaison` from ((`tb_cel`.`cel_obs_images` `oi` join `tb_cel`.`cel_obs` `o` on((`oi`.`id_observation` = `o`.`id_observation`))) join `tb_cel`.`cel_utilisateurs_infos` `u` on((`o`.`ce_utilisateur` = `u`.`id_utilisateur`))) where (`o`.`transmission` = '1');

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

--
-- Structure de la vue `del_utilisateur`
--
DROP TABLE IF EXISTS `del_utilisateur`;

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `del_utilisateur` AS select `at`.`U_ID` AS `id_utilisateur`,`at`.`U_SURNAME` AS `prenom`,`at`.`U_NAME` AS `nom`,`at`.`U_MAIL` AS `courriel`,`at`.`U_PASSWD` AS `mot_de_passe` from (`tb_cel`.`cel_utilisateurs_infos` `ui` left join `tela_prod`.`annuaire_tela` `at` on((`ui`.`id_utilisateur` = `at`.`U_ID`)));

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