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