784 |
jpm |
1 |
-- -----------------------------------------------------
|
809 |
jpm |
2 |
-- Placeholder table for view `del_utilisateur`
|
808 |
jpm |
3 |
-- -----------------------------------------------------
|
809 |
jpm |
4 |
CREATE TABLE IF NOT EXISTS `del_utilisateur` (`id_utilisateur` INT, `prenom` INT, `nom` INT, `courriel` INT, `mot_de_passe` INT);
|
808 |
jpm |
5 |
|
|
|
6 |
-- -----------------------------------------------------
|
809 |
jpm |
7 |
-- Placeholder table for view `del_observation`
|
808 |
jpm |
8 |
-- -----------------------------------------------------
|
809 |
jpm |
9 |
CREATE TABLE IF NOT EXISTS `del_observation` (`id_observation` INT, `ce_utilisateur` INT, `nom_sel` INT, `nom_sel_nn` INT, `nom_ret` INT, `nom_ret_nn` INT, `nt` INT, `famille` INT, `ce_zone_geo` INT, `zone_geo` INT, `lieudit` INT, `station` INT, `milieu` INT, `date_observation` INT, `mots_cles_texte` INT, `commentaire` INT, `date_creation` INT, `date_modification` INT, `date_transmission` INT);
|
808 |
jpm |
10 |
|
|
|
11 |
-- -----------------------------------------------------
|
809 |
jpm |
12 |
-- Placeholder table for view `del_image`
|
808 |
jpm |
13 |
-- -----------------------------------------------------
|
809 |
jpm |
14 |
CREATE TABLE IF NOT EXISTS `del_image` (`id_image` INT, `ce_utilisateur` INT, `hauteur` INT, `largeur` INT, `date_prise_de_vue` INT, `mots_cles_texte` INT, `commentaire` INT, `nom_original` INT, `date_modification` INT, `date_creation` INT, `publiable_eflore` INT);
|
808 |
jpm |
15 |
|
|
|
16 |
-- -----------------------------------------------------
|
809 |
jpm |
17 |
-- Placeholder table for view `del_obs_image`
|
808 |
jpm |
18 |
-- -----------------------------------------------------
|
809 |
jpm |
19 |
CREATE TABLE IF NOT EXISTS `del_obs_image` (`id_image` INT, `id_observation` INT, `date_liaison` INT);
|
808 |
jpm |
20 |
|
|
|
21 |
-- -----------------------------------------------------
|
784 |
jpm |
22 |
-- View `del_utilisateurs`
|
|
|
23 |
-- -----------------------------------------------------
|
809 |
jpm |
24 |
DROP VIEW IF EXISTS `del_utilisateur` ;
|
|
|
25 |
DROP TABLE IF EXISTS `del_utilisateur`;
|
784 |
jpm |
26 |
DELIMITER $$
|
1032 |
benjamin |
27 |
CREATE OR REPLACE ALGORITHM=MERGE VIEW del_utilisateur AS
|
808 |
jpm |
28 |
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
|
735 |
jpm |
29 |
FROM tb_cel.cel_utilisateurs_infos AS ui
|
733 |
jpm |
30 |
LEFT JOIN tela_prod_v4.annuaire_tela AS at ON (ui.id_utilisateur = at.U_ID);
|
784 |
jpm |
31 |
$$
|
|
|
32 |
DELIMITER ;
|
712 |
jpm |
33 |
|
784 |
jpm |
34 |
;
|
712 |
jpm |
35 |
|
784 |
jpm |
36 |
-- -----------------------------------------------------
|
|
|
37 |
-- View `del_observations`
|
|
|
38 |
-- -----------------------------------------------------
|
809 |
jpm |
39 |
DROP VIEW IF EXISTS `del_observation` ;
|
1031 |
aurelien |
40 |
DROP TABLE IF EXISTS `del_observation`
|
|
|
41 |
|
784 |
jpm |
42 |
DELIMITER $$
|
1032 |
benjamin |
43 |
CREATE OR REPLACE ALGORITHM=MERGE VIEW del_observation AS
|
1031 |
aurelien |
44 |
SELECT o.id_observation, ce_utilisateur, nom_sel, nom_sel_nn, nom_ret, nom_ret_nn, nt, famille,
|
784 |
jpm |
45 |
ce_zone_geo, zone_geo, lieudit, station, milieu,
|
|
|
46 |
date_observation, mots_cles_texte, commentaire,
|
|
|
47 |
date_creation, date_modification, date_transmission
|
|
|
48 |
FROM tb_cel.cel_obs AS o
|
1030 |
aurelien |
49 |
WHERE transmission = '1'
|
784 |
jpm |
50 |
$$
|
1031 |
aurelien |
51 |
|
784 |
jpm |
52 |
DELIMITER ;
|
714 |
jpm |
53 |
|
784 |
jpm |
54 |
;
|
|
|
55 |
|
|
|
56 |
-- -----------------------------------------------------
|
|
|
57 |
-- View `del_images`
|
|
|
58 |
-- -----------------------------------------------------
|
809 |
jpm |
59 |
DROP VIEW IF EXISTS `del_image` ;
|
|
|
60 |
DROP TABLE IF EXISTS `del_image`;
|
784 |
jpm |
61 |
DELIMITER $$
|
1032 |
benjamin |
62 |
CREATE OR REPLACE ALGORITHM=MERGE VIEW del_image AS
|
784 |
jpm |
63 |
SELECT i.id_image, i.ce_utilisateur, i.hauteur, i.largeur, i.date_prise_de_vue, i.mots_cles_texte,
|
|
|
64 |
i.commentaire, i.nom_original, i.date_modification, i.date_creation, i.publiable_eflore
|
1032 |
benjamin |
65 |
FROM tb_cel.cel_images AS i
|
784 |
jpm |
66 |
$$
|
|
|
67 |
DELIMITER ;
|
|
|
68 |
|
|
|
69 |
;
|
|
|
70 |
|
|
|
71 |
-- -----------------------------------------------------
|
|
|
72 |
-- View `del_obs_images`
|
|
|
73 |
-- -----------------------------------------------------
|
809 |
jpm |
74 |
DROP VIEW IF EXISTS `del_obs_image` ;
|
|
|
75 |
DROP TABLE IF EXISTS `del_obs_image`;
|
784 |
jpm |
76 |
DELIMITER $$
|
1032 |
benjamin |
77 |
CREATE OR REPLACE ALGORITHM=MERGE VIEW del_obs_image AS
|
784 |
jpm |
78 |
SELECT oi.id_image, oi.id_observation, oi.date_liaison
|
|
|
79 |
FROM tb_cel.cel_obs_images AS oi
|
|
|
80 |
INNER JOIN tb_cel.cel_obs AS o ON (oi.id_observation = o.id_observation)
|
|
|
81 |
WHERE o.transmission = '1'
|
|
|
82 |
$$
|
|
|
83 |
DELIMITER ;
|
|
|
84 |
|
|
|
85 |
;
|