Subversion Repositories eFlore/Applications.del

Rev

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

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';


-- -----------------------------------------------------
-- Table `del_utilisateur`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del_utilisateur` ;

CREATE  TABLE IF NOT EXISTS `del_utilisateur` (
  `id_utilisateur` BIGINT NOT NULL AUTO_INCREMENT COMMENT '     ' ,
  `prenom` VARCHAR(255) NOT NULL ,
  `nom` VARCHAR(255) NOT NULL ,
  `courriel` VARCHAR(255) NOT NULL ,
  `mot_de_passe` VARCHAR(45) NULL DEFAULT NULL ,
  `licence_acceptee` TINYINT(1) NOT NULL DEFAULT '0' ,
  PRIMARY KEY (`id_utilisateur`) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


-- -----------------------------------------------------
-- Table `del_image`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del_image` ;

CREATE  TABLE IF NOT EXISTS `del_image` (
  `id_image` BIGINT NOT NULL AUTO_INCREMENT ,
  `ce_utilisateur` INT NOT NULL ,
  `hauteur` INT NULL ,
  `largeur` INT NULL ,
  `date_prise_de_vue` DATETIME NULL ,
  `mots_cles_texte` LONGTEXT NULL DEFAULT NULL ,
  `commentaire` LONGTEXT NULL DEFAULT NULL ,
  `nom_original` VARCHAR(255) NOT NULL ,
  `date_modification` DATETIME NOT NULL ,
  `date_creation` DATETIME NOT NULL ,
  `publiable_eflore` TINYINT(1) NOT NULL DEFAULT '1' ,
  PRIMARY KEY (`id_image`) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


-- -----------------------------------------------------
-- Table `del_observation`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del_observation` ;

CREATE  TABLE IF NOT EXISTS `del_observation` (
  `id_observation` BIGINT NOT NULL AUTO_INCREMENT ,
  `ce_utilisateur` INT NOT NULL ,
  `nom_sel` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Nom scientifique sélectionné par l\'utilisateur.' ,
  `nom_sel_nn` DECIMAL(9,0) NULL DEFAULT NULL COMMENT 'Identifiant du nom sélectionné.' ,
  `nom_ret` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Nom scientifique retenu correspondant au nom sélectionné.' ,
  `nom_ret_nn` DECIMAL(9,0) NULL DEFAULT NULL COMMENT 'Identifiant du nom retenu.' ,
  `nt` DECIMAL(9,0) NULL DEFAULT NULL COMMENT 'Numéro taxonomique du taxon correspondant au nom sélectionné.' ,
  `famille` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Nom de la famille du nom sélectionné.' ,
  `nom_referentiel` VARCHAR(255) NULL DEFAULT NULL ,
  `ce_zone_geo` VARCHAR(50) NULL DEFAULT NULL ,
  `zone_geo` VARCHAR(255) NULL DEFAULT NULL ,
  `lieudit` VARCHAR(255) NULL DEFAULT NULL ,
  `station` VARCHAR(255) NULL DEFAULT NULL ,
  `milieu` VARCHAR(255) NULL DEFAULT NULL ,
  `date_observation` DATETIME NULL ,
  `mots_cles_texte` LONGTEXT NULL DEFAULT NULL ,
  `commentaire` TEXT NULL DEFAULT NULL ,
  `date_creation` DATETIME NOT NULL ,
  `date_modification` DATETIME NOT NULL ,
  `date_transmission` DATETIME NOT NULL COMMENT 'Date à laquelle l\'observation a été rendu publique.' ,
  PRIMARY KEY (`id_observation`) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = 'Observations publiques.';


-- -----------------------------------------------------
-- Table `del_image_protocole`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del_image_protocole` ;

CREATE  TABLE IF NOT EXISTS `del_image_protocole` (
  `id_protocole` INT NOT NULL AUTO_INCREMENT ,
  `intitule` VARCHAR(255) NOT NULL ,
  `descriptif` TEXT NULL ,
  PRIMARY KEY (`id_protocole`) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


-- -----------------------------------------------------
-- Table `del_image_vote`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del_image_vote` ;

CREATE  TABLE IF NOT EXISTS `del_image_vote` (
  `id_vote` BIGINT NOT NULL AUTO_INCREMENT ,
  `ce_image` BIGINT NOT NULL ,
  `ce_protocole` INT 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`) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


-- -----------------------------------------------------
-- Table `del_image_tag`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del_image_tag` ;

CREATE  TABLE IF NOT EXISTS `del_image_tag` (
  `id_tag` BIGINT NOT NULL AUTO_INCREMENT ,
  `ce_image` BIGINT NOT NULL ,
  `ce_utilisateur` INT NOT NULL ,
  `tag` VARCHAR(45) NOT NULL ,
  `md5` VARCHAR(32) NOT NULL ,
  PRIMARY KEY (`id_tag`) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


-- -----------------------------------------------------
-- Table `del_commentaire`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del_commentaire` ;

CREATE  TABLE IF NOT EXISTS `del_commentaire` (
  `id_commentaire` BIGINT NOT NULL AUTO_INCREMENT ,
  `ce_observation` BIGINT NOT NULL ,
  `ce_proposition` INT NULL DEFAULT '0' ,
  `ce_commentaire_parent` BIGINT NULL DEFAULT '0' ,
  `texte` TEXT NULL DEFAULT NULL ,
  `ce_utilisateur` INT NULL DEFAULT '0' ,
  `utilisateur_prenom` VARCHAR(255) NOT NULL ,
  `utilisateur_nom` VARCHAR(255) NOT NULL ,
  `utilisateur_courriel` VARCHAR(255) NOT NULL ,
  `nom_sel` VARCHAR(255) NULL DEFAULT NULL ,
  `nom_sel_nn` DECIMAL(9,0) NULL DEFAULT NULL ,
  `nom_ret` VARCHAR(255) NULL DEFAULT NULL ,
  `nom_ret_nn` DECIMAL(9,0) NULL DEFAULT NULL ,
  `nt` DECIMAL(9,0) NULL DEFAULT NULL ,
  `famille` VARCHAR(255) NULL DEFAULT NULL ,
  `nom_referentiel` VARCHAR(255) NULL DEFAULT NULL ,
  PRIMARY KEY (`id_commentaire`) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


-- -----------------------------------------------------
-- Table `del_commentaire_vote`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del_commentaire_vote` ;

CREATE  TABLE IF NOT EXISTS `del_commentaire_vote` (
  `id_vote` BIGINT NOT NULL AUTO_INCREMENT ,
  `ce_proposition` BIGINT NOT NULL ,
  `ce_utilisateur` VARCHAR(32) 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`) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = 'Vote uniquement sur le commentaire de type \'proposition\'.';


-- -----------------------------------------------------
-- Table `del_obs_image`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del_obs_image` ;

CREATE  TABLE IF NOT EXISTS `del_obs_image` (
  `id_image` BIGINT NOT NULL ,
  `id_observation` BIGINT NOT NULL ,
  `date_liaison` DATETIME NOT NULL ,
  PRIMARY KEY (`id_image`, `id_observation`) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;