692 |
gduche |
1 |
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
|
|
|
2 |
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
|
|
|
3 |
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
-- -----------------------------------------------------
|
712 |
jpm |
7 |
-- Table `del_utilisateur`
|
692 |
gduche |
8 |
-- -----------------------------------------------------
|
712 |
jpm |
9 |
DROP TABLE IF EXISTS `del_utilisateur` ;
|
692 |
gduche |
10 |
|
712 |
jpm |
11 |
CREATE TABLE IF NOT EXISTS `del_utilisateur` (
|
|
|
12 |
`id_utilisateur` BIGINT NOT NULL AUTO_INCREMENT COMMENT ' ' ,
|
|
|
13 |
`prenom` VARCHAR(255) NOT NULL ,
|
|
|
14 |
`nom` VARCHAR(255) NOT NULL ,
|
|
|
15 |
`courriel` VARCHAR(255) NOT NULL ,
|
692 |
gduche |
16 |
`mot_de_passe` VARCHAR(45) NULL ,
|
712 |
jpm |
17 |
`licence_acceptee` TINYINT(1) NULL ,
|
692 |
gduche |
18 |
PRIMARY KEY (`id_utilisateur`) )
|
|
|
19 |
ENGINE = MyISAM
|
|
|
20 |
DEFAULT CHARACTER SET = utf8
|
|
|
21 |
COLLATE = utf8_general_ci;
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
-- -----------------------------------------------------
|
712 |
jpm |
25 |
-- Table `del_image`
|
692 |
gduche |
26 |
-- -----------------------------------------------------
|
712 |
jpm |
27 |
DROP TABLE IF EXISTS `del_image` ;
|
692 |
gduche |
28 |
|
712 |
jpm |
29 |
CREATE TABLE IF NOT EXISTS `del_image` (
|
|
|
30 |
`id_image` BIGINT NOT NULL AUTO_INCREMENT ,
|
|
|
31 |
`ce_utilisateur` INT NOT NULL ,
|
692 |
gduche |
32 |
`hauteur` INT NULL ,
|
|
|
33 |
`largeur` INT NULL ,
|
|
|
34 |
`date_prise_de_vue` DATETIME NULL ,
|
|
|
35 |
`mots_cles_texte` LONGTEXT NULL ,
|
|
|
36 |
`commentaire` LONGTEXT NULL ,
|
|
|
37 |
`nom_original` VARCHAR(255) NULL ,
|
712 |
jpm |
38 |
`date_modification` DATETIME NOT NULL ,
|
|
|
39 |
`date_creation` DATETIME NOT NULL ,
|
692 |
gduche |
40 |
`publiable_eflore` TINYINT(1) NULL ,
|
712 |
jpm |
41 |
PRIMARY KEY (`id_image`) )
|
692 |
gduche |
42 |
ENGINE = MyISAM
|
|
|
43 |
DEFAULT CHARACTER SET = utf8
|
|
|
44 |
COLLATE = utf8_general_ci;
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
-- -----------------------------------------------------
|
712 |
jpm |
48 |
-- Table `del_observation`
|
692 |
gduche |
49 |
-- -----------------------------------------------------
|
712 |
jpm |
50 |
DROP TABLE IF EXISTS `del_observation` ;
|
692 |
gduche |
51 |
|
712 |
jpm |
52 |
CREATE TABLE IF NOT EXISTS `del_observation` (
|
|
|
53 |
`id_observation` BIGINT NOT NULL AUTO_INCREMENT ,
|
|
|
54 |
`ce_utilisateur` INT NOT NULL ,
|
|
|
55 |
`nom_sel` VARCHAR(255) NULL DEFAULT 'Nom scientifique sélectionné par l\'utilisateur.' ,
|
|
|
56 |
`nom_sel_nn` INT NULL DEFAULT Identifiant du nom sélectionné. ,
|
|
|
57 |
`nom_ret` VARCHAR(255) NULL DEFAULT 'Nom scientifique retenu correspondant au nom sélectionné.' ,
|
|
|
58 |
`nom_ret_nn` INT NULL DEFAULT Identifiant du nom retenu. ,
|
|
|
59 |
`nt` INT NULL DEFAULT Numéro taxonomique du taxon correspondant au nom sélectionné. ,
|
|
|
60 |
`famille` VARCHAR(255) NULL DEFAULT 'Nom de la famille du nom sélectionné.' ,
|
692 |
gduche |
61 |
`ce_zone_geo` VARCHAR(50) NULL ,
|
|
|
62 |
`zone_geo` VARCHAR(255) NULL ,
|
|
|
63 |
`lieudit` VARCHAR(255) NULL ,
|
|
|
64 |
`station` VARCHAR(255) NULL ,
|
|
|
65 |
`milieu` VARCHAR(255) NULL ,
|
|
|
66 |
`date_observation` DATETIME NULL ,
|
|
|
67 |
`mots_cles_texte` LONGTEXT NULL ,
|
|
|
68 |
`commentaire` TEXT NULL ,
|
712 |
jpm |
69 |
`date_creation` DATETIME NOT NULL ,
|
|
|
70 |
`date_modification` DATETIME NOT NULL ,
|
|
|
71 |
`date_transmission` DATETIME NOT NULL DEFAULT Date à laquelle l'observation a été rendu publique. ,
|
707 |
gduche |
72 |
PRIMARY KEY (`id_observation`) )
|
692 |
gduche |
73 |
ENGINE = MyISAM
|
|
|
74 |
DEFAULT CHARACTER SET = utf8
|
712 |
jpm |
75 |
COLLATE = utf8_general_ci
|
|
|
76 |
COMMENT = 'Observations publiques.' ;
|
692 |
gduche |
77 |
|
|
|
78 |
|
|
|
79 |
-- -----------------------------------------------------
|
712 |
jpm |
80 |
-- Table `del_image_protocole`
|
692 |
gduche |
81 |
-- -----------------------------------------------------
|
712 |
jpm |
82 |
DROP TABLE IF EXISTS `del_image_protocole` ;
|
692 |
gduche |
83 |
|
712 |
jpm |
84 |
CREATE TABLE IF NOT EXISTS `del_image_protocole` (
|
|
|
85 |
`id_protocole` INT(11) NOT NULL AUTO_INCREMENT ,
|
|
|
86 |
`intitule` VARCHAR(255) NOT NULL ,
|
|
|
87 |
`descriptif` TEXT NULL ,
|
692 |
gduche |
88 |
PRIMARY KEY (`id_protocole`) )
|
|
|
89 |
ENGINE = MyISAM
|
|
|
90 |
DEFAULT CHARACTER SET = utf8
|
|
|
91 |
COLLATE = utf8_general_ci;
|
|
|
92 |
|
|
|
93 |
|
|
|
94 |
-- -----------------------------------------------------
|
712 |
jpm |
95 |
-- Table `del_image_vote`
|
692 |
gduche |
96 |
-- -----------------------------------------------------
|
712 |
jpm |
97 |
DROP TABLE IF EXISTS `del_image_vote` ;
|
692 |
gduche |
98 |
|
712 |
jpm |
99 |
CREATE TABLE IF NOT EXISTS `del_image_vote` (
|
|
|
100 |
`id_vote` BIGINT NOT NULL AUTO_INCREMENT ,
|
|
|
101 |
`ce_image` BIGINT NOT NULL ,
|
|
|
102 |
`ce_protocole` INT(11) NOT NULL ,
|
|
|
103 |
`ce_utilisateur` INT NULL ,
|
|
|
104 |
`valeur` TINYINT(1) NOT NULL ,
|
|
|
105 |
`date` DATETIME NOT NULL ,
|
|
|
106 |
PRIMARY KEY (`id_vote`) )
|
|
|
107 |
ENGINE = MyISAM
|
|
|
108 |
DEFAULT CHARACTER SET = utf8
|
|
|
109 |
COLLATE = utf8_general_ci;
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
-- -----------------------------------------------------
|
|
|
113 |
-- Table `del_image_tag`
|
|
|
114 |
-- -----------------------------------------------------
|
|
|
115 |
DROP TABLE IF EXISTS `del_image_tag` ;
|
|
|
116 |
|
|
|
117 |
CREATE TABLE IF NOT EXISTS `del_image_tag` (
|
|
|
118 |
`id_tag` BIGINT NOT NULL AUTO_INCREMENT ,
|
|
|
119 |
`ce_image` BIGINT NOT NULL ,
|
692 |
gduche |
120 |
`ce_utilisateur` INT NOT NULL ,
|
712 |
jpm |
121 |
`tag` VARCHAR(45) NOT NULL ,
|
|
|
122 |
`md5` VARCHAR(32) NOT NULL ,
|
|
|
123 |
PRIMARY KEY (`id_tag`) )
|
692 |
gduche |
124 |
ENGINE = MyISAM
|
|
|
125 |
DEFAULT CHARACTER SET = utf8
|
|
|
126 |
COLLATE = utf8_general_ci;
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
-- -----------------------------------------------------
|
712 |
jpm |
130 |
-- Table `del_commentaire`
|
692 |
gduche |
131 |
-- -----------------------------------------------------
|
712 |
jpm |
132 |
DROP TABLE IF EXISTS `del_commentaire` ;
|
692 |
gduche |
133 |
|
712 |
jpm |
134 |
CREATE TABLE IF NOT EXISTS `del_commentaire` (
|
|
|
135 |
`id_commentaire` BIGINT NOT NULL AUTO_INCREMENT ,
|
|
|
136 |
`ce_observation` BIGINT NOT NULL ,
|
|
|
137 |
`ce_commentaire_parent` BIGINT NULL ,
|
|
|
138 |
`ce_proposition` BIGINT NULL ,
|
|
|
139 |
`texte` TEXT NOT NULL ,
|
692 |
gduche |
140 |
`ce_utilisateur` INT NULL ,
|
712 |
jpm |
141 |
`utilisateur_prenom` VARCHAR(255) NOT NULL ,
|
|
|
142 |
`utilisateur_nom` VARCHAR(255) NOT NULL ,
|
|
|
143 |
`utilisateur_courriel` VARCHAR(255) NOT NULL ,
|
|
|
144 |
PRIMARY KEY (`id_commentaire`) )
|
692 |
gduche |
145 |
ENGINE = MyISAM
|
|
|
146 |
DEFAULT CHARACTER SET = utf8
|
|
|
147 |
COLLATE = utf8_general_ci;
|
|
|
148 |
|
|
|
149 |
|
|
|
150 |
-- -----------------------------------------------------
|
712 |
jpm |
151 |
-- Table `del_proposition`
|
692 |
gduche |
152 |
-- -----------------------------------------------------
|
712 |
jpm |
153 |
DROP TABLE IF EXISTS `del_proposition` ;
|
692 |
gduche |
154 |
|
712 |
jpm |
155 |
CREATE TABLE IF NOT EXISTS `del_proposition` (
|
|
|
156 |
`id_proposition` BIGINT NOT NULL ,
|
|
|
157 |
`nom_sel` VARCHAR(255) NOT NULL COMMENT 'Nom scientifique sélectionné\n' ,
|
695 |
aurelien |
158 |
`nom_sel_nn` INT NULL COMMENT 'Numéro nomenclatural du nom scientifique selectionné\n' ,
|
|
|
159 |
`nom_ret` VARCHAR(255) NULL COMMENT 'Nom scientifique retenu\n' ,
|
|
|
160 |
`nom_ret_nn` INT NULL COMMENT 'Numéro nomenclatural du nom scientifique retenu\n' ,
|
|
|
161 |
`nt` INT NULL COMMENT 'Numéro taxonomique\n' ,
|
712 |
jpm |
162 |
`famille` VARCHAR(255) NULL ,
|
695 |
aurelien |
163 |
`nom_referentiel` VARCHAR(45) NULL COMMENT 'Nom du référentiel utilisé (ex bdtfx_v1)\n' ,
|
707 |
gduche |
164 |
PRIMARY KEY (`id_proposition`) )
|
692 |
gduche |
165 |
ENGINE = MyISAM
|
|
|
166 |
DEFAULT CHARACTER SET = utf8
|
|
|
167 |
COLLATE = utf8_general_ci;
|
|
|
168 |
|
|
|
169 |
|
|
|
170 |
-- -----------------------------------------------------
|
712 |
jpm |
171 |
-- Table `del_proposition_vote`
|
692 |
gduche |
172 |
-- -----------------------------------------------------
|
712 |
jpm |
173 |
DROP TABLE IF EXISTS `del_proposition_vote` ;
|
692 |
gduche |
174 |
|
712 |
jpm |
175 |
CREATE TABLE IF NOT EXISTS `del_proposition_vote` (
|
|
|
176 |
`id_vote` BIGINT NOT NULL AUTO_INCREMENT ,
|
|
|
177 |
`ce_proposition` BIGINT NOT NULL ,
|
692 |
gduche |
178 |
`ce_utilisateur` INT NULL ,
|
712 |
jpm |
179 |
`valeur` TINYINT(1) NOT NULL ,
|
|
|
180 |
`date` DATETIME NOT NULL ,
|
|
|
181 |
PRIMARY KEY (`id_vote`) )
|
692 |
gduche |
182 |
ENGINE = MyISAM
|
|
|
183 |
DEFAULT CHARACTER SET = utf8
|
|
|
184 |
COLLATE = utf8_general_ci;
|
|
|
185 |
|
|
|
186 |
|
|
|
187 |
-- -----------------------------------------------------
|
712 |
jpm |
188 |
-- Table `del_obs_image`
|
692 |
gduche |
189 |
-- -----------------------------------------------------
|
712 |
jpm |
190 |
DROP TABLE IF EXISTS `del_obs_image` ;
|
692 |
gduche |
191 |
|
712 |
jpm |
192 |
CREATE TABLE IF NOT EXISTS `del_obs_image` (
|
|
|
193 |
`id_image` BIGINT NOT NULL ,
|
|
|
194 |
`id_utilisateur` INT NOT NULL ,
|
|
|
195 |
`id_observation` BIGINT NOT NULL ,
|
|
|
196 |
`date_liaison` DATETIME NOT NULL ,
|
|
|
197 |
PRIMARY KEY (`id_image`, `id_observation`, `id_utilisateur`) )
|
692 |
gduche |
198 |
ENGINE = MyISAM
|
|
|
199 |
DEFAULT CHARACTER SET = utf8
|
|
|
200 |
COLLATE = utf8_general_ci;
|
|
|
201 |
|
|
|
202 |
|
|
|
203 |
|
|
|
204 |
SET SQL_MODE=@OLD_SQL_MODE;
|
|
|
205 |
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
|
|
206 |
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
|