[SPIP] +2.1.12
[velocampus/web/www.git] / www / ecrire / maj / vieille_base / 10000 / serial.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2011 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
8 * *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
12
13
14 if (!defined('_ECRIRE_INC_VERSION')) return;
15
16
17 $spip_articles = array(
18 "id_article" => "bigint(21) NOT NULL",
19 "surtitre" => "text DEFAULT '' NOT NULL",
20 "titre" => "text DEFAULT '' NOT NULL",
21 "soustitre" => "text DEFAULT '' NOT NULL",
22 "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL",
23 "descriptif" => "text DEFAULT '' NOT NULL",
24 "chapo" => "mediumtext DEFAULT '' NOT NULL",
25 "texte" => "longtext DEFAULT '' NOT NULL",
26 "ps" => "mediumtext DEFAULT '' NOT NULL",
27 "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
28 "statut" => "varchar(10) DEFAULT '0' NOT NULL",
29 "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL",
30 "maj" => "TIMESTAMP",
31 "export" => "VARCHAR(10) DEFAULT 'oui'",
32 "date_redac" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
33 "visites" => "integer DEFAULT '0' NOT NULL",
34 "referers" => "integer DEFAULT '0' NOT NULL",
35 "popularite" => "DOUBLE DEFAULT '0' NOT NULL",
36 "accepter_forum" => "CHAR(3) DEFAULT '' NOT NULL",
37 "date_modif" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
38 "lang" => "VARCHAR(10) DEFAULT '' NOT NULL",
39 "langue_choisie" => "VARCHAR(3) DEFAULT 'non'",
40 "id_trad" => "bigint(21) DEFAULT '0' NOT NULL",
41 "extra" => "longtext NULL",
42 "id_version" => "int unsigned DEFAULT '0' NOT NULL",
43 "nom_site" => "tinytext DEFAULT '' NOT NULL",
44 "url_site" => "VARCHAR(255) DEFAULT '' NOT NULL",
45 "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL");
46
47 $spip_articles_key = array(
48 "PRIMARY KEY" => "id_article",
49 "KEY id_rubrique" => "id_rubrique",
50 "KEY id_secteur" => "id_secteur",
51 "KEY id_trad" => "id_trad",
52 "KEY lang" => "lang",
53 "KEY statut" => "statut, date",
54 "KEY url_site" => "url_site",
55 "KEY date_modif" => "date_modif",
56 "KEY url_propre" => "url_propre");
57 $spip_articles_join = array(
58 "id_article"=>"id_article",
59 "id_rubrique"=>"id_rubrique");
60
61 $spip_auteurs = array(
62 "id_auteur" => "bigint(21) NOT NULL",
63 "nom" => "text DEFAULT '' NOT NULL",
64 "bio" => "text DEFAULT '' NOT NULL",
65 "email" => "tinytext DEFAULT '' NOT NULL",
66 "nom_site" => "tinytext DEFAULT '' NOT NULL",
67 "url_site" => "text DEFAULT '' NOT NULL",
68 "login" => "VARCHAR(255) BINARY",
69 "pass" => "tinytext DEFAULT '' NOT NULL",
70 "low_sec" => "tinytext DEFAULT '' NOT NULL",
71 "statut" => "varchar(255) DEFAULT '0' NOT NULL",
72 "maj" => "TIMESTAMP",
73 "pgp" => "TEXT DEFAULT '' NOT NULL",
74 "htpass" => "tinytext DEFAULT '' NOT NULL",
75 "en_ligne" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
76 "imessage" => "VARCHAR(3)",
77 "messagerie" => "VARCHAR(3)",
78 "alea_actuel" => "tinytext",
79 "alea_futur" => "tinytext",
80 "prefs" => "tinytext",
81 "cookie_oubli" => "tinytext",
82 "source" => "VARCHAR(10) DEFAULT 'spip' NOT NULL",
83 "lang" => "VARCHAR(10) DEFAULT '' NOT NULL",
84 "url_propre" => "VARCHAR(255)",
85 "extra" => "longtext NULL");
86
87 $spip_auteurs_key = array(
88 "PRIMARY KEY" => "id_auteur",
89 "KEY login" => "login",
90 "KEY statut" => "statut",
91 "KEY lang" => "lang",
92 "KEY en_ligne" => "en_ligne",
93 "KEY url_propre" => "url_propre");
94 $spip_auteurs_join = array(
95 "id_auteur"=>"id_auteur",
96 "login"=>"login");
97
98
99 $spip_breves = array(
100 "id_breve" => "bigint(21) NOT NULL",
101 "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
102 "titre" => "text DEFAULT '' NOT NULL",
103 "texte" => "longtext DEFAULT '' NOT NULL",
104 "lien_titre" => "text DEFAULT '' NOT NULL",
105 "lien_url" => "text DEFAULT '' NOT NULL",
106 "statut" => "varchar(6) DEFAULT '0' NOT NULL",
107 "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL",
108 "lang" => "VARCHAR(10) DEFAULT '' NOT NULL",
109 "langue_choisie" => "VARCHAR(3) DEFAULT 'non'",
110 "maj" => "TIMESTAMP",
111 "extra" => "longtext NULL",
112 "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL");
113
114 $spip_breves_key = array(
115 "PRIMARY KEY" => "id_breve",
116 "KEY id_rubrique" => "id_rubrique",
117 "KEY url_propre" => "url_propre");
118 $spip_breves_join = array(
119 "id_breve"=>"id_breve",
120 "id_rubrique"=>"id_rubrique");
121
122 $spip_messages = array(
123 "id_message" => "bigint(21) NOT NULL",
124 "titre" => "text DEFAULT '' NOT NULL",
125 "texte" => "longtext DEFAULT '' NOT NULL",
126 "type" => "varchar(6) DEFAULT '' NOT NULL",
127 "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
128 "date_fin" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
129 "rv" => "varchar(3) DEFAULT '' NOT NULL",
130 "statut" => "varchar(6) DEFAULT '0' NOT NULL",
131 "id_auteur" => "bigint(21) NOT NULL",
132 "maj" => "TIMESTAMP");
133
134 $spip_messages_key = array(
135 "PRIMARY KEY" => "id_message",
136 "KEY id_auteur" => "id_auteur");
137
138 $spip_mots = array(
139 "id_mot" => "bigint(21) NOT NULL",
140 "titre" => "text DEFAULT '' NOT NULL",
141 "descriptif" => "text DEFAULT '' NOT NULL",
142 "texte" => "longtext DEFAULT '' NOT NULL",
143 "id_groupe" => "bigint(21) NOT NULL",
144 "type" => "text DEFAULT '' NOT NULL",
145 "extra" => "longtext NULL",
146 "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL",
147 "maj" => "TIMESTAMP");
148
149 $spip_mots_key = array(
150 "PRIMARY KEY" => "id_mot",
151 "KEY url_propre" => "url_propre");
152
153 $spip_groupes_mots = array(
154 "id_groupe" => "bigint(21) NOT NULL",
155 "titre" => "text DEFAULT '' NOT NULL",
156 "descriptif" => "text DEFAULT '' NOT NULL",
157 "texte" => "longtext DEFAULT '' NOT NULL",
158 "unseul" => "varchar(3) DEFAULT '' NOT NULL",
159 "obligatoire" => "varchar(3) DEFAULT '' NOT NULL",
160 "articles" => "varchar(3) DEFAULT '' NOT NULL",
161 "breves" => "varchar(3) DEFAULT '' NOT NULL",
162 "rubriques" => "varchar(3) DEFAULT '' NOT NULL",
163 "syndic" => "varchar(3) DEFAULT '' NOT NULL",
164 "minirezo" => "varchar(3) DEFAULT '' NOT NULL",
165 "comite" => "varchar(3) DEFAULT '' NOT NULL",
166 "forum" => "varchar(3) DEFAULT '' NOT NULL",
167 "maj" => "TIMESTAMP");
168
169 $spip_groupes_mots_key = array(
170 "PRIMARY KEY" => "id_groupe");
171
172 $spip_rubriques = array(
173 "id_rubrique" => "bigint(21) NOT NULL",
174 "id_parent" => "bigint(21) DEFAULT '0' NOT NULL",
175 "titre" => "text DEFAULT '' NOT NULL",
176 "descriptif" => "text DEFAULT '' NOT NULL",
177 "texte" => "longtext DEFAULT '' NOT NULL",
178 "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL",
179 "maj" => "TIMESTAMP",
180 "export" => "VARCHAR(10) DEFAULT 'oui'",
181 "id_import" => "bigint DEFAULT '0'",
182 "statut" => "varchar(10) DEFAULT '0' NOT NULL",
183 "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
184 "lang" => "VARCHAR(10) DEFAULT '' NOT NULL",
185 "langue_choisie" => "VARCHAR(3) DEFAULT 'non'",
186 "extra" => "longtext NULL",
187 "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL",
188 "statut_tmp" => "varchar(10) DEFAULT '0' NOT NULL",
189 "date_tmp" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL"
190 );
191
192 $spip_rubriques_key = array(
193 "PRIMARY KEY" => "id_rubrique",
194 "KEY lang" => "lang",
195 "KEY id_parent" => "id_parent",
196 "KEY url_propre" => "url_propre");
197
198 $spip_documents = array(
199 "id_document" => "bigint(21) NOT NULL",
200 "id_vignette" => "bigint(21) DEFAULT '0' NOT NULL",
201 /* "id_type" => "bigint(21) DEFAULT '0' NOT NULL", */
202 "extension" => "VARCHAR(10) DEFAULT '' NOT NULL",
203 "titre" => "text DEFAULT '' NOT NULL",
204 "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
205 "descriptif" => "text DEFAULT '' NOT NULL",
206 "fichier" => "varchar(255) DEFAULT '' NOT NULL",
207 "taille" => "integer",
208 "largeur" => "integer",
209 "hauteur" => "integer",
210 "mode" => "ENUM('vignette', 'document') NOT NULL",//+distant
211 "distant" => "VARCHAR(3) DEFAULT 'non'",
212 "maj" => "TIMESTAMP");
213
214 $spip_documents_key = array(
215 "PRIMARY KEY" => "id_document",
216 "KEY id_vignette" => "id_vignette",
217 "KEY mode" => "mode",
218 "KEY extension" => "extension");
219 $spip_documents_join = array(
220 "id_document"=>"id_document",
221 "extension"=>"extension");
222
223 $spip_types_documents = array(
224 /* "id_type" => "bigint(21) NOT NULL", */
225 "extension" => "varchar(10) DEFAULT '' NOT NULL",
226 "titre" => "text DEFAULT '' NOT NULL",
227 "descriptif" => "text DEFAULT '' NOT NULL",
228 "mime_type" => "varchar(100) DEFAULT '' NOT NULL",
229 "inclus" => "ENUM('non', 'image', 'embed') NOT NULL DEFAULT 'non'",
230 "upload" => "ENUM('oui', 'non') NOT NULL DEFAULT 'oui'",
231 "maj" => "TIMESTAMP");
232
233 $spip_types_documents_key = array(
234 /* "PRIMARY KEY" => "id_type",
235 "UNIQUE extension" => "extension",
236 */
237 "PRIMARY KEY" => "extension",
238 "KEY inclus" => "inclus");
239
240 $spip_syndic = array(
241 "id_syndic" => "bigint(21) NOT NULL",
242 "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL",
243 "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL",
244 "nom_site" => "text DEFAULT '' NOT NULL",
245 "url_site" => "text DEFAULT '' NOT NULL",
246 "url_syndic" => "text DEFAULT '' NOT NULL",
247 "descriptif" => "text DEFAULT '' NOT NULL",
248 "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL",
249 "maj" => "TIMESTAMP",
250 "syndication" => "VARCHAR(3) DEFAULT '' NOT NULL",
251 "statut" => "varchar(10) DEFAULT '0' NOT NULL",
252 "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
253 "date_syndic" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
254 "date_index" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
255 "extra" => "longtext NULL",
256 "moderation" => "VARCHAR(3) DEFAULT 'non'",
257 "miroir" => "VARCHAR(3) DEFAULT 'non'",
258 "oubli" => "VARCHAR(3) DEFAULT 'non'",
259 "resume" => "VARCHAR(3) DEFAULT 'oui'"
260 );
261
262 $spip_syndic_key = array(
263 "PRIMARY KEY" => "id_syndic",
264 "KEY id_rubrique" => "id_rubrique",
265 "KEY id_secteur" => "id_secteur",
266 "KEY statut" => "statut, date_syndic",
267 "KEY url_propre" => "url_propre");
268 $spip_syndic_join = array(
269 "id_syndic"=>"id_syndic",
270 "id_rubrique"=>"id_rubrique");
271
272 $spip_syndic_articles = array(
273 "id_syndic_article" => "bigint(21) NOT NULL",
274 "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL",
275 "titre" => "text DEFAULT '' NOT NULL",
276 "url" => "VARCHAR(255) DEFAULT '' NOT NULL",
277 "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
278 "lesauteurs" => "text DEFAULT '' NOT NULL",
279 "maj" => "TIMESTAMP",
280 "statut" => "varchar(10) DEFAULT '0' NOT NULL",
281 "descriptif" => "text DEFAULT '' NOT NULL",
282 "lang" => "VARCHAR(10) DEFAULT '' NOT NULL",
283 "url_source" => "TINYTEXT DEFAULT '' NOT NULL",
284 "source" => "TINYTEXT DEFAULT '' NOT NULL",
285 "tags" => "TEXT DEFAULT '' NOT NULL");
286
287 $spip_syndic_articles_key = array(
288 "PRIMARY KEY" => "id_syndic_article",
289 "KEY id_syndic" => "id_syndic",
290 "KEY statut" => "statut",
291 "KEY url" => "url");
292 $spip_syndic_articles_join = array(
293 "id_syndic_article"=>"id_syndic_article",
294 "id_syndic"=>"id_syndic");
295
296 $spip_forum = array(
297 "id_forum" => "bigint(21) NOT NULL",
298 "id_parent" => "bigint(21) DEFAULT '0' NOT NULL",
299 "id_thread" => "bigint(21) DEFAULT '0' NOT NULL",
300 "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL",
301 "id_article" => "bigint(21) DEFAULT '0' NOT NULL",
302 "id_breve" => "bigint(21) DEFAULT '0' NOT NULL",
303 "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
304 "date_thread" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
305 "titre" => "text DEFAULT '' NOT NULL",
306 "texte" => "mediumtext DEFAULT '' NOT NULL",
307 "auteur" => "text DEFAULT '' NOT NULL",
308 "email_auteur" => "text DEFAULT '' NOT NULL",
309 "nom_site" => "text DEFAULT '' NOT NULL",
310 "url_site" => "text DEFAULT '' NOT NULL",
311 "statut" => "varchar(8) DEFAULT '0' NOT NULL",
312 "ip" => "varchar(16) DEFAULT '' NOT NULL",
313 "maj" => "TIMESTAMP",
314 "id_auteur" => "bigint DEFAULT '0' NOT NULL",
315 "id_message" => "bigint(21) DEFAULT '0' NOT NULL",
316 "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL");
317
318 $spip_forum_key = array(
319 "PRIMARY KEY" => "id_forum",
320 "KEY id_parent" => "id_parent",
321 "KEY id_article" => "id_article",
322 "KEY id_breve" => "id_breve",
323 "KEY id_message" => "id_message",
324 "KEY id_syndic" => "id_syndic",
325 "KEY id_rubrique" => "id_rubrique",
326 "KEY statut" => "statut, date_heure",
327 "KEY date_thread" => "date_thread");
328 $spip_forum_join = array(
329 "id_forum"=>"id_forum",
330 "id_parent"=>"id_parent",
331 "id_article"=>"id_article",
332 "id_breve"=>"id_breve",
333 "id_message"=>"id_message",
334 "id_syndic"=>"id_syndic",
335 "id_rubrique"=>"id_rubrique");
336
337 $spip_signatures = array(
338 "id_signature" => "bigint(21) NOT NULL",
339 "id_article" => "bigint(21) DEFAULT '0' NOT NULL",
340 "date_time" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
341 "nom_email" => "text DEFAULT '' NOT NULL",
342 "ad_email" => "text DEFAULT '' NOT NULL",
343 "nom_site" => "text DEFAULT '' NOT NULL",
344 "url_site" => "text DEFAULT '' NOT NULL",
345 "message" => "mediumtext DEFAULT '' NOT NULL",
346 "statut" => "varchar(10) DEFAULT '0' NOT NULL",
347 "maj" => "TIMESTAMP");
348
349 $spip_signatures_key = array(
350 "PRIMARY KEY" => "id_signature",
351 "KEY id_article" => "id_article",
352 "KEY statut" => "statut");
353 $spip_signatures_join = array(
354 "id_signature"=>"id_signature",
355 "id_article"=>"id_article");
356
357
358 global $tables_principales;
359
360 /// Attention: mes_fonctions peut avoir deja defini cette variable
361 /// il faut donc rajouter, mais pas reinitialiser
362
363 $tables_principales['spip_articles'] =
364 array('field' => &$spip_articles, 'key' => &$spip_articles_key, 'join' => &$spip_articles_join);
365 $tables_principales['spip_auteurs'] =
366 array('field' => &$spip_auteurs, 'key' => &$spip_auteurs_key,'join' => &$spip_auteurs_join);
367 $tables_principales['spip_breves'] =
368 array('field' => &$spip_breves, 'key' => &$spip_breves_key,'join' => &$spip_breves_join);
369 $tables_principales['spip_messages'] =
370 array('field' => &$spip_messages, 'key' => &$spip_messages_key);
371 $tables_principales['spip_mots'] =
372 array('field' => &$spip_mots, 'key' => &$spip_mots_key);
373 $tables_principales['spip_groupes_mots'] =
374 array('field' => &$spip_groupes_mots, 'key' => &$spip_groupes_mots_key);
375 $tables_principales['spip_rubriques'] =
376 array('field' => &$spip_rubriques, 'key' => &$spip_rubriques_key);
377 $tables_principales['spip_documents'] =
378 array('field' => &$spip_documents, 'key' => &$spip_documents_key, 'join' => &$spip_documents_join);
379 $tables_principales['spip_types_documents'] =
380 array('field' => &$spip_types_documents, 'key' => &$spip_types_documents_key);
381 $tables_principales['spip_syndic'] =
382 array('field' => &$spip_syndic, 'key' => &$spip_syndic_key, 'join' => &$spip_syndic_join);
383 $tables_principales['spip_syndic_articles'] =
384 array('field' => &$spip_syndic_articles, 'key' => &$spip_syndic_articles_key, 'join' => &$spip_syndic_articles_join);
385 $tables_principales['spip_forum'] =
386 array('field' => &$spip_forum, 'key' => &$spip_forum_key, 'join' => &$spip_forum_join);
387 $tables_principales['spip_signatures'] =
388 array('field' => &$spip_signatures, 'key' => &$spip_signatures_key, 'join' => &$spip_signatures_join);
389
390 ?>