Subversion Repositories eFlore/Applications.coel

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1505 jpm 1
SET @id_table_cmlv = '112';
2
SET @id_admin = '1';
3
SET @ip_admin = '162.38.234.1';
4
SET @id_meta = '';
5
SET @enrg = '';
6
#+--------------------------------------------------------------------------------------------------------------------+#
1514 jpm 7
# MODIFICATION ONTOLOGIE
1505 jpm 8
SET @id_etat_modif = '2';
9
 
10
# Mise à jour des abréviations de la liste 40 id 1043
11
SET @notes = 'Remplacement de l''abréviation numérique par un code.';
12
 
13
SET @id_valeur = '2246';
14
INSERT INTO tb_coel.coel_meta_historique_ligne (cmhl_ce_table, cmhl_cle_ligne, cmhl_enregistrement, cmhl_date_modification, cmhl_notes, cmhl_ce_modifier_par, cmhl_ce_etat ,cmhl_ip)
15
	VALUES	(@id_table_cmlv, @id_valeur, NULL , NOW( ) , @notes, @id_admin, @id_etat_modif, @ip_admin);
16
SELECT @id_meta := cmhl_id_historique_ligne, cmhl_date_modification FROM tb_coel.coel_meta_historique_ligne WHERE cmhl_ce_table = CONVERT(@id_table_cmlv USING utf8) AND cmhl_cle_ligne = CONVERT(@id_valeur USING utf8) ORDER BY cmhl_date_modification DESC LIMIT 1;
17
UPDATE tb_coel.coel_meta_liste_valeur SET
18
	cmlv_abreviation = 'PH',
19
	cmlv_ce_meta = @id_meta
20
	WHERE cmlv_id_valeur = @id_valeur;
21
SELECT @enrg := CONCAT('<?xml version="1.0" encoding="UTF-8" ?>\n<resultset>\n',
22
	'<row>\n',
23
	'<cmlv_id_valeur>', cmlv_id_valeur, '</cmlv_id_valeur>\n',
24
	'<cmlv_ce_parent>', cmlv_ce_parent, '</cmlv_ce_parent>\n',
25
	'<cmlv_ce_projet>', cmlv_ce_projet, '</cmlv_ce_projet>\n',
26
	'<cmlv_nom>', cmlv_nom, '</cmlv_nom>\n',
27
	'<cmlv_abreviation>', cmlv_abreviation, '</cmlv_abreviation>\n',
28
	'<cmlv_description>', cmlv_description, '</cmlv_description>\n',
29
	'<cmlv_ce_meta>', cmlv_ce_meta, '</cmlv_ce_meta>\n',
30
	'</row>\n',
31
	'</resultset>') AS xmldoc
32
	FROM tb_coel.coel_meta_liste_valeur
33
	WHERE cmlv_id_valeur = @id_valeur;
34
UPDATE tb_coel.coel_meta_historique_ligne SET
35
	cmhl_enregistrement = @enrg
36
	WHERE cmhl_id_historique_ligne = @id_meta;
37
 
38
SET @id_valeur = '2247';
39
INSERT INTO tb_coel.coel_meta_historique_ligne (cmhl_ce_table, cmhl_cle_ligne, cmhl_enregistrement, cmhl_date_modification, cmhl_notes, cmhl_ce_modifier_par, cmhl_ce_etat ,cmhl_ip)
40
	VALUES	(@id_table_cmlv, @id_valeur, NULL , NOW( ) , @notes, @id_admin, @id_etat_modif, @ip_admin);
41
SELECT @id_meta := cmhl_id_historique_ligne, cmhl_date_modification FROM tb_coel.coel_meta_historique_ligne WHERE cmhl_ce_table = CONVERT(@id_table_cmlv USING utf8) AND cmhl_cle_ligne = CONVERT(@id_valeur USING utf8) ORDER BY cmhl_date_modification DESC LIMIT 1;
42
UPDATE tb_coel.coel_meta_liste_valeur SET
43
	cmlv_abreviation = 'GY',
44
	cmlv_ce_meta = @id_meta
45
	WHERE cmlv_id_valeur = @id_valeur;
46
SELECT @enrg := CONCAT('<?xml version="1.0" encoding="UTF-8" ?>\n<resultset>\n',
47
	'<row>\n',
48
	'<cmlv_id_valeur>', cmlv_id_valeur, '</cmlv_id_valeur>\n',
49
	'<cmlv_ce_parent>', cmlv_ce_parent, '</cmlv_ce_parent>\n',
50
	'<cmlv_ce_projet>', cmlv_ce_projet, '</cmlv_ce_projet>\n',
51
	'<cmlv_nom>', cmlv_nom, '</cmlv_nom>\n',
52
	'<cmlv_abreviation>', cmlv_abreviation, '</cmlv_abreviation>\n',
53
	'<cmlv_description>', cmlv_description, '</cmlv_description>\n',
54
	'<cmlv_ce_meta>', cmlv_ce_meta, '</cmlv_ce_meta>\n',
55
	'</row>\n',
56
	'</resultset>') AS xmldoc
57
	FROM tb_coel.coel_meta_liste_valeur
58
	WHERE cmlv_id_valeur = @id_valeur;
59
UPDATE tb_coel.coel_meta_historique_ligne SET
60
	cmhl_enregistrement = @enrg
61
	WHERE cmhl_id_historique_ligne = @id_meta;
62
 
63
SET @id_valeur = '2248';
64
INSERT INTO tb_coel.coel_meta_historique_ligne (cmhl_ce_table, cmhl_cle_ligne, cmhl_enregistrement, cmhl_date_modification, cmhl_notes, cmhl_ce_modifier_par, cmhl_ce_etat ,cmhl_ip)
65
	VALUES	(@id_table_cmlv, @id_valeur, NULL , NOW( ) , @notes, @id_admin, @id_etat_modif, @ip_admin);
66
SELECT @id_meta := cmhl_id_historique_ligne, cmhl_date_modification FROM tb_coel.coel_meta_historique_ligne WHERE cmhl_ce_table = CONVERT(@id_table_cmlv USING utf8) AND cmhl_cle_ligne = CONVERT(@id_valeur USING utf8) ORDER BY cmhl_date_modification DESC LIMIT 1;
67
UPDATE tb_coel.coel_meta_liste_valeur SET
68
	cmlv_abreviation = 'AN',
69
	cmlv_ce_meta = @id_meta
70
	WHERE cmlv_id_valeur = @id_valeur;
71
SELECT @enrg := CONCAT('<?xml version="1.0" encoding="UTF-8" ?>\n<resultset>\n',
72
	'<row>\n',
73
	'<cmlv_id_valeur>', cmlv_id_valeur, '</cmlv_id_valeur>\n',
74
	'<cmlv_ce_parent>', cmlv_ce_parent, '</cmlv_ce_parent>\n',
75
	'<cmlv_ce_projet>', cmlv_ce_projet, '</cmlv_ce_projet>\n',
76
	'<cmlv_nom>', cmlv_nom, '</cmlv_nom>\n',
77
	'<cmlv_abreviation>', cmlv_abreviation, '</cmlv_abreviation>\n',
78
	'<cmlv_description>', cmlv_description, '</cmlv_description>\n',
79
	'<cmlv_ce_meta>', cmlv_ce_meta, '</cmlv_ce_meta>\n',
80
	'</row>\n',
81
	'</resultset>') AS xmldoc
82
	FROM tb_coel.coel_meta_liste_valeur
83
	WHERE cmlv_id_valeur = @id_valeur;
84
UPDATE tb_coel.coel_meta_historique_ligne SET
85
	cmhl_enregistrement = @enrg
86
	WHERE cmhl_id_historique_ligne = @id_meta;
87
 
88
SET @id_valeur = '2249';
89
INSERT INTO tb_coel.coel_meta_historique_ligne (cmhl_ce_table, cmhl_cle_ligne, cmhl_enregistrement, cmhl_date_modification, cmhl_notes, cmhl_ce_modifier_par, cmhl_ce_etat ,cmhl_ip)
90
	VALUES	(@id_table_cmlv, @id_valeur, NULL , NOW( ) , @notes, @id_admin, @id_etat_modif, @ip_admin);
91
SELECT @id_meta := cmhl_id_historique_ligne, cmhl_date_modification FROM tb_coel.coel_meta_historique_ligne WHERE cmhl_ce_table = CONVERT(@id_table_cmlv USING utf8) AND cmhl_cle_ligne = CONVERT(@id_valeur USING utf8) ORDER BY cmhl_date_modification DESC LIMIT 1;
92
UPDATE tb_coel.coel_meta_liste_valeur SET
93
	cmlv_abreviation = 'CR',
94
	cmlv_ce_meta = @id_meta
95
	WHERE cmlv_id_valeur = @id_valeur;
96
SELECT @enrg := CONCAT('<?xml version="1.0" encoding="UTF-8" ?>\n<resultset>\n',
97
	'<row>\n',
98
	'<cmlv_id_valeur>', cmlv_id_valeur, '</cmlv_id_valeur>\n',
99
	'<cmlv_ce_parent>', cmlv_ce_parent, '</cmlv_ce_parent>\n',
100
	'<cmlv_ce_projet>', cmlv_ce_projet, '</cmlv_ce_projet>\n',
101
	'<cmlv_nom>', cmlv_nom, '</cmlv_nom>\n',
102
	'<cmlv_abreviation>', cmlv_abreviation, '</cmlv_abreviation>\n',
103
	'<cmlv_description>', cmlv_description, '</cmlv_description>\n',
104
	'<cmlv_ce_meta>', cmlv_ce_meta, '</cmlv_ce_meta>\n',
105
	'</row>\n',
106
	'</resultset>') AS xmldoc
107
	FROM tb_coel.coel_meta_liste_valeur
108
	WHERE cmlv_id_valeur = @id_valeur;
109
UPDATE tb_coel.coel_meta_historique_ligne SET
110
	cmhl_enregistrement = @enrg
111
	WHERE cmhl_id_historique_ligne = @id_meta;
112
 
113
SET @id_valeur = '2250';
114
INSERT INTO tb_coel.coel_meta_historique_ligne (cmhl_ce_table, cmhl_cle_ligne, cmhl_enregistrement, cmhl_date_modification, cmhl_notes, cmhl_ce_modifier_par, cmhl_ce_etat ,cmhl_ip)
115
	VALUES	(@id_table_cmlv, @id_valeur, NULL , NOW( ) , @notes, @id_admin, @id_etat_modif, @ip_admin);
116
SELECT @id_meta := cmhl_id_historique_ligne, cmhl_date_modification FROM tb_coel.coel_meta_historique_ligne WHERE cmhl_ce_table = CONVERT(@id_table_cmlv USING utf8) AND cmhl_cle_ligne = CONVERT(@id_valeur USING utf8) ORDER BY cmhl_date_modification DESC LIMIT 1;
117
UPDATE tb_coel.coel_meta_liste_valeur SET
118
	cmlv_abreviation = 'AL',
119
	cmlv_ce_meta = @id_meta
120
	WHERE cmlv_id_valeur = @id_valeur;
121
SELECT @enrg := CONCAT('<?xml version="1.0" encoding="UTF-8" ?>\n<resultset>\n',
122
	'<row>\n',
123
	'<cmlv_id_valeur>', cmlv_id_valeur, '</cmlv_id_valeur>\n',
124
	'<cmlv_ce_parent>', cmlv_ce_parent, '</cmlv_ce_parent>\n',
125
	'<cmlv_ce_projet>', cmlv_ce_projet, '</cmlv_ce_projet>\n',
126
	'<cmlv_nom>', cmlv_nom, '</cmlv_nom>\n',
127
	'<cmlv_abreviation>', cmlv_abreviation, '</cmlv_abreviation>\n',
128
	'<cmlv_description>', cmlv_description, '</cmlv_description>\n',
129
	'<cmlv_ce_meta>', cmlv_ce_meta, '</cmlv_ce_meta>\n',
130
	'</row>\n',
131
	'</resultset>') AS xmldoc
132
	FROM tb_coel.coel_meta_liste_valeur
133
	WHERE cmlv_id_valeur = @id_valeur;
134
UPDATE tb_coel.coel_meta_historique_ligne SET
135
	cmhl_enregistrement = @enrg
136
	WHERE cmhl_id_historique_ligne = @id_meta;
137
 
138
SET @id_valeur = '2251';
139
INSERT INTO tb_coel.coel_meta_historique_ligne (cmhl_ce_table, cmhl_cle_ligne, cmhl_enregistrement, cmhl_date_modification, cmhl_notes, cmhl_ce_modifier_par, cmhl_ce_etat ,cmhl_ip)
140
	VALUES	(@id_table_cmlv, @id_valeur, NULL , NOW( ) , @notes, @id_admin, @id_etat_modif, @ip_admin);
141
SELECT @id_meta := cmhl_id_historique_ligne, cmhl_date_modification FROM tb_coel.coel_meta_historique_ligne WHERE cmhl_ce_table = CONVERT(@id_table_cmlv USING utf8) AND cmhl_cle_ligne = CONVERT(@id_valeur USING utf8) ORDER BY cmhl_date_modification DESC LIMIT 1;
142
UPDATE tb_coel.coel_meta_liste_valeur SET
143
	cmlv_abreviation = 'CH',
144
	cmlv_ce_meta = @id_meta
145
	WHERE cmlv_id_valeur = @id_valeur;
146
SELECT @enrg := CONCAT('<?xml version="1.0" encoding="UTF-8" ?>\n<resultset>\n',
147
	'<row>\n',
148
	'<cmlv_id_valeur>', cmlv_id_valeur, '</cmlv_id_valeur>\n',
149
	'<cmlv_ce_parent>', cmlv_ce_parent, '</cmlv_ce_parent>\n',
150
	'<cmlv_ce_projet>', cmlv_ce_projet, '</cmlv_ce_projet>\n',
151
	'<cmlv_nom>', cmlv_nom, '</cmlv_nom>\n',
152
	'<cmlv_abreviation>', cmlv_abreviation, '</cmlv_abreviation>\n',
153
	'<cmlv_description>', cmlv_description, '</cmlv_description>\n',
154
	'<cmlv_ce_meta>', cmlv_ce_meta, '</cmlv_ce_meta>\n',
155
	'</row>\n',
156
	'</resultset>') AS xmldoc
157
	FROM tb_coel.coel_meta_liste_valeur
158
	WHERE cmlv_id_valeur = @id_valeur;
159
UPDATE tb_coel.coel_meta_historique_ligne SET
160
	cmhl_enregistrement = @enrg
161
	WHERE cmhl_id_historique_ligne = @id_meta;
162
 
163
SET @id_valeur = '2252';
164
INSERT INTO tb_coel.coel_meta_historique_ligne (cmhl_ce_table, cmhl_cle_ligne, cmhl_enregistrement, cmhl_date_modification, cmhl_notes, cmhl_ce_modifier_par, cmhl_ce_etat ,cmhl_ip)
165
	VALUES	(@id_table_cmlv, @id_valeur, NULL , NOW( ) , @notes, @id_admin, @id_etat_modif, @ip_admin);
166
SELECT @id_meta := cmhl_id_historique_ligne, cmhl_date_modification FROM tb_coel.coel_meta_historique_ligne WHERE cmhl_ce_table = CONVERT(@id_table_cmlv USING utf8) AND cmhl_cle_ligne = CONVERT(@id_valeur USING utf8) ORDER BY cmhl_date_modification DESC LIMIT 1;
167
UPDATE tb_coel.coel_meta_liste_valeur SET
168
	cmlv_abreviation = 'LI',
169
	cmlv_ce_meta = @id_meta
170
	WHERE cmlv_id_valeur = @id_valeur;
171
SELECT @enrg := CONCAT('<?xml version="1.0" encoding="UTF-8" ?>\n<resultset>\n',
172
	'<row>\n',
173
	'<cmlv_id_valeur>', cmlv_id_valeur, '</cmlv_id_valeur>\n',
174
	'<cmlv_ce_parent>', cmlv_ce_parent, '</cmlv_ce_parent>\n',
175
	'<cmlv_ce_projet>', cmlv_ce_projet, '</cmlv_ce_projet>\n',
176
	'<cmlv_nom>', cmlv_nom, '</cmlv_nom>\n',
177
	'<cmlv_abreviation>', cmlv_abreviation, '</cmlv_abreviation>\n',
178
	'<cmlv_description>', cmlv_description, '</cmlv_description>\n',
179
	'<cmlv_ce_meta>', cmlv_ce_meta, '</cmlv_ce_meta>\n',
180
	'</row>\n',
181
	'</resultset>') AS xmldoc
182
	FROM tb_coel.coel_meta_liste_valeur
183
	WHERE cmlv_id_valeur = @id_valeur;
184
UPDATE tb_coel.coel_meta_historique_ligne SET
185
	cmhl_enregistrement = @enrg
186
	WHERE cmhl_id_historique_ligne = @id_meta;
187
 
188
SET @id_valeur = '2253';
189
INSERT INTO tb_coel.coel_meta_historique_ligne (cmhl_ce_table, cmhl_cle_ligne, cmhl_enregistrement, cmhl_date_modification, cmhl_notes, cmhl_ce_modifier_par, cmhl_ce_etat ,cmhl_ip)
190
	VALUES	(@id_table_cmlv, @id_valeur, NULL , NOW( ) , @notes, @id_admin, @id_etat_modif, @ip_admin);
191
SELECT @id_meta := cmhl_id_historique_ligne, cmhl_date_modification FROM tb_coel.coel_meta_historique_ligne WHERE cmhl_ce_table = CONVERT(@id_table_cmlv USING utf8) AND cmhl_cle_ligne = CONVERT(@id_valeur USING utf8) ORDER BY cmhl_date_modification DESC LIMIT 1;
192
UPDATE tb_coel.coel_meta_liste_valeur SET
193
	cmlv_abreviation = 'BR',
194
	cmlv_ce_meta = @id_meta
195
	WHERE cmlv_id_valeur = @id_valeur;
196
SELECT @enrg := CONCAT('<?xml version="1.0" encoding="UTF-8" ?>\n<resultset>\n',
197
	'<row>\n',
198
	'<cmlv_id_valeur>', cmlv_id_valeur, '</cmlv_id_valeur>\n',
199
	'<cmlv_ce_parent>', cmlv_ce_parent, '</cmlv_ce_parent>\n',
200
	'<cmlv_ce_projet>', cmlv_ce_projet, '</cmlv_ce_projet>\n',
201
	'<cmlv_nom>', cmlv_nom, '</cmlv_nom>\n',
202
	'<cmlv_abreviation>', cmlv_abreviation, '</cmlv_abreviation>\n',
203
	'<cmlv_description>', cmlv_description, '</cmlv_description>\n',
204
	'<cmlv_ce_meta>', cmlv_ce_meta, '</cmlv_ce_meta>\n',
205
	'</row>\n',
206
	'</resultset>') AS xmldoc
207
	FROM tb_coel.coel_meta_liste_valeur
208
	WHERE cmlv_id_valeur = @id_valeur;
209
UPDATE tb_coel.coel_meta_historique_ligne SET
210
	cmhl_enregistrement = @enrg
211
	WHERE cmhl_id_historique_ligne = @id_meta;
212
 
213
SET @id_valeur = '2254';
214
INSERT INTO tb_coel.coel_meta_historique_ligne (cmhl_ce_table, cmhl_cle_ligne, cmhl_enregistrement, cmhl_date_modification, cmhl_notes, cmhl_ce_modifier_par, cmhl_ce_etat ,cmhl_ip)
215
	VALUES	(@id_table_cmlv, @id_valeur, NULL , NOW( ) , @notes, @id_admin, @id_etat_modif, @ip_admin);
216
SELECT @id_meta := cmhl_id_historique_ligne, cmhl_date_modification FROM tb_coel.coel_meta_historique_ligne WHERE cmhl_ce_table = CONVERT(@id_table_cmlv USING utf8) AND cmhl_cle_ligne = CONVERT(@id_valeur USING utf8) ORDER BY cmhl_date_modification DESC LIMIT 1;
217
UPDATE tb_coel.coel_meta_liste_valeur SET
218
	cmlv_abreviation = 'PT',
219
	cmlv_ce_meta = @id_meta
220
	WHERE cmlv_id_valeur = @id_valeur;
221
SELECT @enrg := CONCAT('<?xml version="1.0" encoding="UTF-8" ?>\n<resultset>\n',
222
	'<row>\n',
223
	'<cmlv_id_valeur>', cmlv_id_valeur, '</cmlv_id_valeur>\n',
224
	'<cmlv_ce_parent>', cmlv_ce_parent, '</cmlv_ce_parent>\n',
225
	'<cmlv_ce_projet>', cmlv_ce_projet, '</cmlv_ce_projet>\n',
226
	'<cmlv_nom>', cmlv_nom, '</cmlv_nom>\n',
227
	'<cmlv_abreviation>', cmlv_abreviation, '</cmlv_abreviation>\n',
228
	'<cmlv_description>', cmlv_description, '</cmlv_description>\n',
229
	'<cmlv_ce_meta>', cmlv_ce_meta, '</cmlv_ce_meta>\n',
230
	'</row>\n',
231
	'</resultset>') AS xmldoc
232
	FROM tb_coel.coel_meta_liste_valeur
233
	WHERE cmlv_id_valeur = @id_valeur;
234
UPDATE tb_coel.coel_meta_historique_ligne SET
235
	cmhl_enregistrement = @enrg
236
	WHERE cmhl_id_historique_ligne = @id_meta;
1514 jpm 237
 
238
#+--------------------------------------------------------------------------------------------------------------------+#
239
# MODIFICATION PUBLICATION
240
ALTER TABLE tb_coel.coel_publication CHANGE
241
	`cpu_date_parution` `cpu_date_parution` VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
242
	COMMENT 'Année(s) de parution de la publication. Formats acceptés : AAAA-MM-JJ ou AAAA ou AAAA-AAAA.'