Subversion Repositories eFlore/Applications.del

Rev

Rev 694 | Rev 698 | 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';

CREATE SCHEMA IF NOT EXISTS `del` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
USE `del` ;

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

CREATE  TABLE IF NOT EXISTS `del`.`del_utilisateur` (
  `id_utilisateur` INT NOT NULL COMMENT '       ' ,
  `prenom` VARCHAR(45) NULL ,
  `nom` VARCHAR(45) NULL ,
  `courriel` VARCHAR(45) NULL ,
  `mot_de_passe` VARCHAR(45) NULL ,
  `licence_acceptee` VARCHAR(45) NULL ,
  PRIMARY KEY (`id_utilisateur`) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


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

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


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

CREATE  TABLE IF NOT EXISTS `del`.`del_observation` (
  `id_observation` INT NOT NULL ,
  `ce_utilisateur` INT NULL ,
  `nom_sel` VARCHAR(255) NULL ,
  `nom_sel_nn` INT(11) NULL ,
  `nom_ret` VARCHAR(255) NULL ,
  `nom_ret_nn` INT(11) NULL ,
  `nt` INT(11) NULL ,
  `famille` VARCHAR(255) NULL ,
  `ce_zone_geo` VARCHAR(50) NULL ,
  `zone_geo` VARCHAR(255) NULL ,
  `lieudit` VARCHAR(255) NULL ,
  `station` VARCHAR(255) NULL ,
  `milieu` VARCHAR(255) NULL ,
  `date_observation` DATETIME NULL ,
  `mots_cles_texte` LONGTEXT NULL ,
  `commentaire` TEXT NULL ,
  `transmission` TINYINT(1) NULL ,
  `date_creation` DATETIME NULL ,
  `date_modification` DATETIME NULL ,
  `date_transmission` DATETIME NULL ,
  PRIMARY KEY (`id_observation`) ,
  INDEX `fk_Observations_Utilisateurs1` (`ce_utilisateur` ASC) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


-- -----------------------------------------------------
-- Table `del`.`del_protocole`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del`.`del_protocole` ;

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


-- -----------------------------------------------------
-- Table `del`.`del_vote_image`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del`.`del_vote_image` ;

CREATE  TABLE IF NOT EXISTS `del`.`del_vote_image` (
  `id_vote_image` INT NOT NULL ,
  `ce_image` INT NOT NULL ,
  `ce_utilisateur` INT NOT NULL ,
  `ce_protocole` INT NOT NULL ,
  `valeur_vote` TINYINT(1) NULL ,
  PRIMARY KEY (`id_vote_image`) ,
  UNIQUE INDEX `ID_UNIQUE` (`id_vote_image` ASC) ,
  INDEX `fk_Vote_images_Protocoles` (`ce_protocole` ASC) ,
  INDEX `fk_Vote_images_Images1` (`ce_image` ASC) ,
  INDEX `fk_Vote_images_Utilisateurs1` (`ce_utilisateur` ASC) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


-- -----------------------------------------------------
-- Table `del`.`del_tag`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del`.`del_tag` ;

CREATE  TABLE IF NOT EXISTS `del`.`del_tag` (
  `id_tag` INT NOT NULL ,
  `tag` VARCHAR(45) NULL ,
  `ce_image` INT NULL ,
  `ce_utilisateur` INT NULL ,
  `md5` VARCHAR(32) NULL ,
  PRIMARY KEY (`id_tag`) ,
  INDEX `fk_Tags_Vote_images1` (`ce_image` ASC) ,
  INDEX `fk_Tags_Utilisateurs1` (`ce_utilisateur` ASC) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


-- -----------------------------------------------------
-- Table `del`.`del_proposition`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del`.`del_proposition` ;

CREATE  TABLE IF NOT EXISTS `del`.`del_proposition` (
  `id_proposition` INT NOT NULL ,
  `nom_sel` VARCHAR(255) NULL COMMENT 'Nom scientifique sélectionné\n' ,
  `nom_sel_nn` INT NULL COMMENT 'Numéro nomenclatural du nom scientifique selectionné\n' ,
  `nom_ret` VARCHAR(255) NULL COMMENT 'Nom scientifique retenu\n' ,
  `nom_ret_nn` INT NULL COMMENT 'Numéro nomenclatural du nom scientifique retenu\n' ,
  `nt` INT NULL COMMENT 'Numéro taxonomique\n' ,
  `nom_referentiel` VARCHAR(45) NULL COMMENT 'Nom du référentiel utilisé (ex bdtfx_v1)\n' ,
  `ce_utilisateur` VARCHAR(45) NULL COMMENT 'identifiant numérique de l\'utilisateur\n' ,
  `ce_observation` INT NOT NULL ,
  PRIMARY KEY (`id_proposition`) ,
  INDEX `fk_Propositions_Observations1` (`ce_observation` ASC) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


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

CREATE  TABLE IF NOT EXISTS `del`.`del_commentaire` (
  `id_commentaire` INT NOT NULL ,
  `texte` VARCHAR(45) NULL ,
  `ce_utilisateur` INT NULL ,
  `ce_proposition` INT NOT NULL ,
  `ce_commentaire` INT NULL ,
  `utilisateur_nom` VARCHAR(45) NULL ,
  `utilisateur_prenom` VARCHAR(45) NULL ,
  `utilisateur_mail` VARCHAR(45) NULL ,
  `ce_observation` INT NULL ,
  PRIMARY KEY (`id_commentaire`, `ce_proposition`) ,
  INDEX `fk_Commentaires_Propositions1` (`ce_proposition` ASC) ,
  INDEX `fk_Commentaires_Commentaires1` (`ce_commentaire` ASC) ,
  INDEX `fk_Commentaires_Utilisateurs1` (`ce_utilisateur` ASC) ,
  INDEX `fk_Commentaires_Observations1` (`ce_observation` ASC) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


-- -----------------------------------------------------
-- Table `del`.`del_vote_observation`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `del`.`del_vote_observation` ;

CREATE  TABLE IF NOT EXISTS `del`.`del_vote_observation` (
  `id_vote_observations` INT NOT NULL ,
  `ce_proposition` INT NOT NULL ,
  `ce_utilisateur` INT NOT NULL ,
  `valeur_vote` TINYINT(1) NULL ,
  PRIMARY KEY (`id_vote_observations`) ,
  UNIQUE INDEX `ID_UNIQUE` (`id_vote_observations` ASC) ,
  INDEX `fk_Vote_observations_Utilisateurs1` (`ce_utilisateur` ASC) ,
  INDEX `fk_Vote_observations_Propositions1` (`ce_proposition` ASC) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


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

CREATE  TABLE IF NOT EXISTS `del`.`del_obs_image` (
  `ce_image` INT NOT NULL ,
  `ce_utilisateur` INT NOT NULL ,
  `ce_observation` INT NOT NULL ,
  `date_liaison` DATETIME NULL ,
  PRIMARY KEY (`ce_image`, `ce_observation`, `ce_utilisateur`) ,
  INDEX `fk_Obs_images_Images1` (`ce_image` ASC) ,
  INDEX `fk_Obs_images_Utilisateurs1` (`ce_utilisateur` ASC) ,
  INDEX `fk_Obs_images_Observations1` (`ce_observation` ASC) )
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;