Line 2... |
Line 2... |
2 |
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_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';
|
3 |
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
|
Line 4... |
Line 4... |
4 |
|
4 |
|
- |
|
5 |
|
- |
|
6 |
-- -----------------------------------------------------
|
- |
|
7 |
-- Table `cel_obs_images`
|
- |
|
8 |
-- -----------------------------------------------------
|
- |
|
9 |
DROP TABLE IF EXISTS `cel_obs_images` ;
|
- |
|
10 |
|
- |
|
11 |
CREATE TABLE IF NOT EXISTS `cel_obs_images` (
|
- |
|
12 |
`id_image` BIGINT NOT NULL ,
|
- |
|
13 |
`id_observation` BIGINT NOT NULL ,
|
- |
|
14 |
`date_liaison` DATETIME NOT NULL ,
|
- |
|
15 |
PRIMARY KEY (`id_image`, `id_observation`) ,
|
- |
|
16 |
INDEX `observation` (`id_observation` ASC) ,
|
- |
|
17 |
INDEX `image` (`id_image` ASC) )
|
- |
|
18 |
ENGINE = MyISAM
|
- |
|
19 |
DEFAULT CHARACTER SET = utf8
|
- |
|
20 |
COLLATE = utf8_unicode_ci;
|
- |
|
21 |
|
5 |
|
22 |
|
6 |
-- -----------------------------------------------------
|
23 |
-- -----------------------------------------------------
|
7 |
-- Table `cel_utilisateurs`
|
24 |
-- Table `cel_utilisateurs`
|
Line 8... |
Line 25... |
8 |
-- -----------------------------------------------------
|
25 |
-- -----------------------------------------------------
|
Line 23... |
Line 40... |
23 |
DEFAULT CHARACTER SET = utf8
|
40 |
DEFAULT CHARACTER SET = utf8
|
24 |
COLLATE = utf8_general_ci;
|
41 |
COLLATE = utf8_general_ci;
|
Line 25... |
Line 42... |
25 |
|
42 |
|
26 |
|
- |
|
27 |
-- -----------------------------------------------------
|
- |
|
28 |
-- Table `cel_obs_images`
|
- |
|
29 |
-- -----------------------------------------------------
|
- |
|
30 |
DROP TABLE IF EXISTS `cel_obs_images` ;
|
- |
|
31 |
|
- |
|
32 |
CREATE TABLE IF NOT EXISTS `cel_obs_images` (
|
- |
|
33 |
`id_image` BIGINT NOT NULL ,
|
- |
|
34 |
`id_utilisateur` VARCHAR(32) NOT NULL ,
|
- |
|
35 |
`id_observation` BIGINT NOT NULL ,
|
- |
|
36 |
`date_liaison` DATETIME NOT NULL ,
|
- |
|
37 |
PRIMARY KEY (`id_image`, `id_utilisateur`, `id_observation`) ,
|
- |
|
38 |
INDEX `observation` (`id_observation` ASC) ,
|
- |
|
39 |
INDEX `image` (`id_image` ASC) )
|
- |
|
40 |
ENGINE = MyISAM
|
- |
|
41 |
DEFAULT CHARACTER SET = utf8
|
- |
|
42 |
COLLATE = utf8_unicode_ci;
|
- |
|
43 |
|
- |
|
44 |
|
43 |
|
45 |
-- -----------------------------------------------------
|
44 |
-- -----------------------------------------------------
|
46 |
-- Table `cel_mots_cles_images`
|
45 |
-- Table `cel_mots_cles_images`
|
Line 47... |
Line 46... |
47 |
-- -----------------------------------------------------
|
46 |
-- -----------------------------------------------------
|
48 |
DROP TABLE IF EXISTS `cel_mots_cles_images` ;
|
47 |
DROP TABLE IF EXISTS `cel_mots_cles_images` ;
|
49 |
|
48 |
|
50 |
CREATE TABLE IF NOT EXISTS `cel_mots_cles_images` (
|
49 |
CREATE TABLE IF NOT EXISTS `cel_mots_cles_images` (
|
51 |
`id_mot_cle_image` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL COMMENT 'Identifiant du mot-clé pour une position donnée dans l\'arbre d\'utilisateur.\nLe même mot-clé peut être placé à plusieurs endroits de l\'arbre et aura donc deux id distincts.' ,
|
50 |
`id_mot_cle_image` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL COMMENT 'Identifiant du mot-clé pour une position donnée dans l\'arbre d\'utilisateur.\nLe même mot-clé peut être placé à plusieurs endroits de l\'arbre et aura donc deux id distincts.' ,
|
52 |
`ce_utilisateur` VARCHAR(32) NOT NULL ,
|
51 |
`id_utilisateur` VARCHAR(32) NOT NULL ,
|
53 |
`mot_cle` VARCHAR(50) NOT NULL COMMENT 'Mot clé de l\'utilisateur pour une position dans l\'arbre.' ,
|
52 |
`mot_cle` VARCHAR(50) NOT NULL COMMENT 'Mot clé de l\'utilisateur pour une position dans l\'arbre.' ,
|
54 |
`md5` VARCHAR(32) NOT NULL COMMENT 'MD5 du mot clé en minuscule.' ,
|
53 |
`md5` VARCHAR(32) NOT NULL COMMENT 'MD5 du mot clé en minuscule.' ,
|
55 |
`bg` BIGINT NOT NULL COMMENT 'Bordure gauche.' ,
|
54 |
`bg` BIGINT NOT NULL COMMENT 'Bordure gauche.' ,
|
56 |
`bd` BIGINT NOT NULL COMMENT 'bordure droite.' ,
|
55 |
`bd` BIGINT NOT NULL COMMENT 'bordure droite.' ,
|
57 |
`niveau` INT NOT NULL COMMENT 'Niveau du mot clé dans l\'arbre.' ,
|
56 |
`niveau` INT NOT NULL COMMENT 'Niveau du mot clé dans l\'arbre.' ,
|
58 |
`ce_mot_cle_image_parent` VARCHAR(128) NOT NULL ,
|
57 |
`ce_mot_cle_image_parent` VARCHAR(128) NOT NULL ,
|
59 |
PRIMARY KEY (`id_mot_cle_image`) )
|
58 |
PRIMARY KEY (`id_mot_cle_image`, `id_utilisateur`) )
|
60 |
ENGINE = InnoDB
|
59 |
ENGINE = InnoDB
|
61 |
DEFAULT CHARACTER SET = utf8
|
60 |
DEFAULT CHARACTER SET = utf8
|
Line 70... |
Line 69... |
70 |
DROP TABLE IF EXISTS `cel_images_mots_cles` ;
|
69 |
DROP TABLE IF EXISTS `cel_images_mots_cles` ;
|
Line 71... |
Line 70... |
71 |
|
70 |
|
72 |
CREATE TABLE IF NOT EXISTS `cel_images_mots_cles` (
|
71 |
CREATE TABLE IF NOT EXISTS `cel_images_mots_cles` (
|
73 |
`id_image` BIGINT NOT NULL ,
|
72 |
`id_image` BIGINT NOT NULL ,
|
- |
|
73 |
`id_mot_cle_image` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
|
74 |
`id_mot_cle_image` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
|
74 |
`id_utilisateur` VARCHAR(32) NOT NULL ,
|
75 |
PRIMARY KEY (`id_image`, `id_mot_cle_image`) ,
|
75 |
PRIMARY KEY (`id_image`, `id_mot_cle_image`, `id_utilisateur`) ,
|
76 |
INDEX `image` (`id_image` ASC) )
|
76 |
INDEX `image` (`id_image` ASC) )
|
77 |
ENGINE = MyISAM
|
77 |
ENGINE = MyISAM
|
78 |
DEFAULT CHARACTER SET = utf8
|
78 |
DEFAULT CHARACTER SET = utf8
|
Line 103... |
Line 103... |
103 |
`md5` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
|
103 |
`md5` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
|
104 |
`meta_exif` LONGTEXT CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
|
104 |
`meta_exif` LONGTEXT CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
|
105 |
`meta_iptc` LONGTEXT CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
|
105 |
`meta_iptc` LONGTEXT CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
|
106 |
`meta_xmp` LONGTEXT NULL DEFAULT NULL ,
|
106 |
`meta_xmp` LONGTEXT NULL DEFAULT NULL ,
|
107 |
`meta_makernote` LONGTEXT NULL DEFAULT NULL ,
|
107 |
`meta_makernote` LONGTEXT NULL DEFAULT NULL ,
|
- |
|
108 |
`meta_autres` LONGTEXT NULL DEFAULT NULL ,
|
108 |
`date_modification` DATETIME NOT NULL ,
|
109 |
`date_modification` DATETIME NOT NULL ,
|
109 |
`date_creation` DATETIME NOT NULL COMMENT 'Date d\'ajout de l\'image au CEL.' ,
|
110 |
`date_creation` DATETIME NOT NULL COMMENT 'Date d\'ajout de l\'image au CEL.' ,
|
110 |
`publiable_eflore` TINYINT(1) NOT NULL DEFAULT 1 ,
|
111 |
`publiable_eflore` TINYINT(1) NOT NULL DEFAULT 1 ,
|
111 |
PRIMARY KEY (`id_image`) ,
|
112 |
PRIMARY KEY (`id_image`) ,
|
112 |
INDEX `id_image` (`id_image` ASC, `ordre` ASC, `ce_utilisateur` ASC) )
|
113 |
INDEX `id_image` (`id_image` ASC, `ordre` ASC, `ce_utilisateur` ASC) )
|
Line 121... |
Line 122... |
121 |
-- -----------------------------------------------------
|
122 |
-- -----------------------------------------------------
|
122 |
DROP TABLE IF EXISTS `cel_mots_cles_obs` ;
|
123 |
DROP TABLE IF EXISTS `cel_mots_cles_obs` ;
|
Line 123... |
Line 124... |
123 |
|
124 |
|
124 |
CREATE TABLE IF NOT EXISTS `cel_mots_cles_obs` (
|
125 |
CREATE TABLE IF NOT EXISTS `cel_mots_cles_obs` (
|
125 |
`id_mot_cle_obs` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
|
126 |
`id_mot_cle_obs` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
|
126 |
`ce_utilisateur` VARCHAR(32) NOT NULL ,
|
127 |
`id_utilisateur` VARCHAR(32) NOT NULL ,
|
127 |
`mot_cle` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
|
128 |
`mot_cle` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
|
128 |
`md5` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
|
129 |
`md5` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
|
129 |
`bg` BIGINT NOT NULL ,
|
130 |
`bg` BIGINT NOT NULL ,
|
130 |
`bd` BIGINT NOT NULL ,
|
131 |
`bd` BIGINT NOT NULL ,
|
131 |
`niveau` INT NOT NULL ,
|
132 |
`niveau` INT NOT NULL ,
|
132 |
`ce_mot_cle_obs_parent` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
|
133 |
`ce_mot_cle_obs_parent` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
|
133 |
PRIMARY KEY (`id_mot_cle_obs`) )
|
134 |
PRIMARY KEY (`id_mot_cle_obs`, `id_utilisateur`) )
|
134 |
ENGINE = InnoDB
|
135 |
ENGINE = InnoDB
|
135 |
DEFAULT CHARACTER SET = utf8
|
136 |
DEFAULT CHARACTER SET = utf8
|
136 |
COLLATE = utf8_general_ci
|
137 |
COLLATE = utf8_general_ci
|
137 |
COMMENT = 'Table des mots clés, à utiliser avec des transactions !'
|
138 |
COMMENT = 'Table des mots clés, à utiliser avec des transactions !'
|
Line 144... |
Line 145... |
144 |
DROP TABLE IF EXISTS `cel_obs_mots_cles` ;
|
145 |
DROP TABLE IF EXISTS `cel_obs_mots_cles` ;
|
Line 145... |
Line 146... |
145 |
|
146 |
|
146 |
CREATE TABLE IF NOT EXISTS `cel_obs_mots_cles` (
|
147 |
CREATE TABLE IF NOT EXISTS `cel_obs_mots_cles` (
|
147 |
`id_observation` BIGINT NOT NULL ,
|
148 |
`id_observation` BIGINT NOT NULL ,
|
- |
|
149 |
`id_mot_cle_obs` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
|
148 |
`id_mot_cle_obs` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
|
150 |
`id_utilisateur` VARCHAR(32) NOT NULL ,
|
149 |
PRIMARY KEY (`id_observation`, `id_mot_cle_obs`) ,
|
151 |
PRIMARY KEY (`id_observation`, `id_mot_cle_obs`, `id_utilisateur`) ,
|
150 |
INDEX `observation` (`id_observation` ASC) )
|
152 |
INDEX `observation` (`id_observation` ASC) )
|
151 |
ENGINE = MyISAM
|
153 |
ENGINE = MyISAM
|
152 |
DEFAULT CHARACTER SET = utf8
|
154 |
DEFAULT CHARACTER SET = utf8
|
Line 241... |
Line 243... |
241 |
COLLATE = utf8_general_ci
|
243 |
COLLATE = utf8_general_ci
|
242 |
COMMENT = 'Contient les infos utilisateurs spécifiques au CEL.\nA utilis' /* comment truncated */;
|
244 |
COMMENT = 'Contient les infos utilisateurs spécifiques au CEL.\nA utilis' /* comment truncated */;
|
Line 243... |
Line 245... |
243 |
|
245 |
|
- |
|
246 |
|
- |
|
247 |
-- -----------------------------------------------------
|
- |
|
248 |
-- Placeholder table for view `cel_utilisateurs`
|
- |
|
249 |
-- -----------------------------------------------------
|
- |
|
250 |
CREATE TABLE IF NOT EXISTS `cel_utilisateurs` (`id_utilisateur` INT, `prenom` INT, `nom` INT, `courriel` INT, `mot_de_passe` INT, `licence_acceptee` INT, `admin` INT, `preferences` INT, `date_premiere_utilisation` INT);
|
244 |
|
251 |
|
245 |
-- -----------------------------------------------------
|
252 |
-- -----------------------------------------------------
|
246 |
-- Placeholder table for view `cel_tapir`
|
253 |
-- Placeholder table for view `cel_tapir`
|
Line 247... |
Line 254... |
247 |
-- -----------------------------------------------------
|
254 |
-- -----------------------------------------------------
|
Line 289... |
Line 296... |
289 |
concat(o.prenom_utilisateur,_utf8' ',o.nom_utilisateur) AS observateur_intitule,
|
296 |
concat(o.prenom_utilisateur,_utf8' ',o.nom_utilisateur) AS observateur_intitule,
|
290 |
o.commentaire AS observation_commentaire,
|
297 |
o.commentaire AS observation_commentaire,
|
291 |
concat(_utf8'<?xml version="1.0" encoding="UTF-8"?>',
|
298 |
concat(_utf8'<?xml version="1.0" encoding="UTF-8"?>',
|
292 |
'<info>',
|
299 |
'<info>',
|
293 |
'<nom_num_nomenclatural>',o.nom_sel_nn,'</nom_num_nomenclatural>',
|
300 |
'<nom_num_nomenclatural>',o.nom_sel_nn,'</nom_num_nomenclatural>',
|
- |
|
301 |
'<nom_ret>',o.nom_ret,'</nom_ret>',
|
- |
|
302 |
'<nom_num_ret>',o.nom_ret_nn,'</nom_num_ret>',
|
294 |
'<nom_num_taxonomique>',o.nt,'</nom_num_taxonomique>',
|
303 |
'<nom_num_taxonomique>',o.nt,'</nom_num_taxonomique>',
|
295 |
'<nom_referentiel>',o.nom_referentiel,'</nom_referentiel>',
|
304 |
'<nom_referentiel>',o.nom_referentiel,'</nom_referentiel>',
|
296 |
'<saisie_date_transmission>',o.date_transmission,'</saisie_date_transmission>',
|
305 |
'<saisie_date_transmission>',o.date_transmission,'</saisie_date_transmission>',
|
297 |
'<saisie_date_creation>',o.date_creation,'</saisie_date_creation>',
|
306 |
'<saisie_date_creation>',o.date_creation,'</saisie_date_creation>',
|
298 |
'<lieu_commune_utm_secteur>',o.utm_secteur,'</lieu_commune_utm_secteur>',
|
- |
|
299 |
'<ordre>',o.ordre,'</ordre>',
|
307 |
'<ordre>',o.ordre,'</ordre>',
|
300 |
'<nom_ret>',o.nom_ret,'</nom_ret>',
|
- |
|
301 |
'<num_nom_ret>',o.nom_ret_nn,'</num_nom_ret>',
|
- |
|
302 |
'<station>',o.station,'</station>',
|
308 |
'<station>',o.station,'</station>',
|
303 |
'<milieu>',o.milieu,'</milieu>',
|
309 |
'<milieu>',o.milieu,'</milieu>',
|
304 |
'<mots_cles>',o.mots_cles_texte,'</mots_cles>',
|
310 |
'<mots_cles>',o.mots_cles_texte,'</mots_cles>',
|
- |
|
311 |
'<zg_utm_secteur>',zg.utm_secteur,'</zg_utm_secteur>',
|
305 |
'<zg_date_modification>',zg.date_modification,'</zg_date_modification>',
|
312 |
'<zg_date_modification>',zg.date_modification,'</zg_date_modification>',
|
306 |
'</info>') AS observation_information_complement,
|
313 |
'</info>') AS observation_information_complement,
|
307 |
o.date_modification AS saisie_date_modification,
|
314 |
o.date_modification AS saisie_date_modification,
|
308 |
o.date_creation AS saisie_date_creation
|
315 |
o.date_creation AS saisie_date_creation
|
309 |
FROM cel_obs AS o
|
316 |
FROM cel_obs AS o
|
310 |
LEFT JOIN cel_zones_geo AS zg ON (o.ce_zone_geo = zg.id_zone_geo)
|
317 |
LEFT JOIN cel_zones_geo AS zg ON (o.ce_zone_geo = zg.id_zone_geo)
|
311 |
WHERE o.transmission = 1;
|
318 |
WHERE o.transmission = 1;
|
312 |
|
- |
|
313 |
$$
|
319 |
$$
|
314 |
DELIMITER ;
|
320 |
DELIMITER ;
|
Line 315... |
Line 321... |
315 |
|
321 |
|