[SPIP] +2.1.12
[velocampus/web/www.git] / www / ecrire / maj / vieille_base / 1813 / inc_serialbase.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 // Ce fichier ne sera execute qu'une fois
17 if (defined('_ECRIRE_INC_SERIALBASE')) return;
18 define('_ECRIRE_INC_SERIALBASE', "1");
19
20
21 $spip_articles = array(
22 "id_article" => "bigint(21) NOT NULL",
23 "surtitre" => "text NOT NULL",
24 "titre" => "text NOT NULL",
25 "soustitre" => "text NOT NULL",
26 "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL",
27 "descriptif" => "text NOT NULL",
28 "chapo" => "mediumtext NOT NULL",
29 "texte" => "longblob NOT NULL",
30 "ps" => "mediumtext NOT NULL",
31 "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
32 "statut" => "varchar(10) DEFAULT '0' NOT NULL",
33 "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL",
34 "maj" => "TIMESTAMP",
35 "export" => "VARCHAR(10) DEFAULT 'oui'",
36 "date_redac" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
37 "visites" => "INTEGER DEFAULT '0' NOT NULL",
38 "referers" => "INTEGER DEFAULT '0' NOT NULL",
39 "popularite" => "DOUBLE DEFAULT '0' NOT NULL",
40 "accepter_forum" => "CHAR(3) NOT NULL",
41 "auteur_modif" => "bigint(21) DEFAULT '0' NOT NULL",
42 "date_modif" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
43 "lang" => "VARCHAR(10) DEFAULT '' NOT NULL",
44 "langue_choisie" => "VARCHAR(3) DEFAULT 'non'",
45 "id_trad" => "bigint(21) DEFAULT '0' NOT NULL",
46 "extra" => "longblob NULL",
47 "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL",
48 "id_version" => "int unsigned DEFAULT '0' NOT NULL",
49 "nom_site" => "tinytext NOT NULL",
50 "url_site" => "VARCHAR(255) NOT NULL",
51 "url_propre" => "VARCHAR(255) NOT NULL");
52
53 $spip_articles_key = array(
54 "PRIMARY KEY" => "id_article",
55 "KEY id_rubrique" => "id_rubrique",
56 "KEY id_secteur" => "id_secteur",
57 "KEY id_trad" => "id_trad",
58 "KEY lang" => "lang",
59 "KEY statut" => "statut, date",
60 "KEY url_site" => "url_site",
61 "KEY date_modif" => "date_modif",
62 "KEY idx" => "idx",
63 "KEY url_propre" => "url_propre");
64
65 $spip_auteurs = array(
66 "id_auteur" => "bigint(21) NOT NULL",
67 "nom" => "text NOT NULL",
68 "bio" => "text NOT NULL",
69 "email" => "tinytext NOT NULL",
70 "nom_site" => "tinytext NOT NULL",
71 "url_site" => "text NOT NULL",
72 "login" => "VARCHAR(255) BINARY NOT NULL",
73 "pass" => "tinytext NOT NULL",
74 "low_sec" => "tinytext NOT NULL",
75 "statut" => "VARCHAR(255) NOT NULL",
76 "maj" => "TIMESTAMP",
77 "pgp" => "BLOB NOT NULL",
78 "htpass" => "tinyblob NOT NULL",
79 "en_ligne" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
80 "imessage" => "VARCHAR(3) NOT NULL",
81 "messagerie" => "VARCHAR(3) NOT NULL",
82 "alea_actuel" => "tinytext NOT NULL",
83 "alea_futur" => "tinytext NOT NULL",
84 "prefs" => "tinytext NOT NULL",
85 "cookie_oubli" => "tinytext NOT NULL",
86 "source" => "VARCHAR(10) DEFAULT 'spip' NOT NULL",
87 "lang" => "VARCHAR(10) DEFAULT '' NOT NULL",
88 "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL",
89 "extra" => "longblob NULL");
90
91 $spip_auteurs_key = array(
92 "PRIMARY KEY" => "id_auteur",
93 "KEY login" => "login",
94 "KEY statut" => "statut",
95 "KEY lang" => "lang",
96 "KEY idx" => "idx",
97 "KEY en_ligne" => "en_ligne");
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 NOT NULL",
103 "texte" => "longblob NOT NULL",
104 "lien_titre" => "text NOT NULL",
105 "lien_url" => "text NOT NULL",
106 "statut" => "varchar(6) 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 "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL",
112 "extra" => "longblob NULL",
113 "url_propre" => "VARCHAR(255) NOT NULL");
114
115 $spip_breves_key = array(
116 "PRIMARY KEY" => "id_breve",
117 "KEY idx" => "idx",
118 "KEY id_rubrique" => "id_rubrique",
119 "KEY url_propre" => "url_propre");
120
121 $spip_messages = array(
122 "id_message" => "bigint(21) NOT NULL",
123 "titre" => "text NOT NULL",
124 "texte" => "longblob NOT NULL",
125 "type" => "varchar(6) NOT NULL",
126 "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
127 "date_fin" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
128 "rv" => "varchar(3) NOT NULL",
129 "statut" => "varchar(6) NOT NULL",
130 "id_auteur" => "bigint(21) NOT NULL",
131 "maj" => "TIMESTAMP");
132
133 $spip_messages_key = array(
134 "PRIMARY KEY" => "id_message",
135 "KEY id_auteur" => "id_auteur");
136
137 $spip_mots = array(
138 "id_mot" => "bigint(21) NOT NULL",
139 "type" => "VARCHAR(100) NOT NULL",
140 "titre" => "text NOT NULL",
141 "descriptif" => "text NOT NULL",
142 "texte" => "longblob NOT NULL",
143 "id_groupe" => "bigint(21) NOT NULL",
144 "extra" => "longblob NULL",
145 "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL",
146 "url_propre" => "VARCHAR(255) NOT NULL",
147 "maj" => "TIMESTAMP");
148
149 $spip_mots_key = array(
150 "PRIMARY KEY" => "id_mot",
151 "KEY idx" => "idx",
152 "KEY type" => "type",
153 "KEY url_propre" => "url_propre");
154
155 $spip_groupes_mots = array(
156 "id_groupe" => "bigint(21) NOT NULL",
157 "titre" => "text NOT NULL",
158 "unseul" => "varchar(3) NOT NULL",
159 "obligatoire" => "varchar(3) NOT NULL",
160 "articles" => "varchar(3) NOT NULL",
161 "breves" => "varchar(3) NOT NULL",
162 "rubriques" => "varchar(3) NOT NULL",
163 "syndic" => "varchar(3) NOT NULL",
164 "0minirezo" => "varchar(3) NOT NULL",
165 "1comite" => "varchar(3) NOT NULL",
166 "6forum" => "varchar(3) 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 NOT NULL",
176 "descriptif" => "text NOT NULL",
177 "texte" => "longblob 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) 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 "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL",
187 "extra" => "longblob NULL",
188 "url_propre" => "VARCHAR(255) NOT NULL",
189 "statut_tmp" => "VARCHAR(10) NOT NULL",
190 "date_tmp" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL"
191 );
192
193 $spip_rubriques_key = array(
194 "PRIMARY KEY" => "id_rubrique",
195 "KEY lang" => "lang",
196 "KEY idx" => "idx",
197 "KEY id_parent" => "id_parent",
198 "KEY url_propre" => "url_propre");
199
200 $spip_documents = array(
201 "id_document" => "bigint(21) NOT NULL",
202 "id_vignette" => "bigint(21) DEFAULT '0' NOT NULL",
203 "id_type" => "bigint(21) DEFAULT '0' NOT NULL",
204 "titre" => "text NOT NULL",
205 "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
206 "descriptif" => "text NOT NULL",
207 "fichier" => "varchar(255) NOT NULL",
208 "taille" => "integer NOT NULL",
209 "largeur" => "integer NOT NULL",
210 "hauteur" => "integer NOT NULL",
211 "mode" => "ENUM('vignette', 'document') NOT NULL",
212 "inclus" => "VARCHAR(3) DEFAULT 'non'",
213 "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL",
214 "maj" => "TIMESTAMP");
215
216 $spip_documents_key = array(
217 "PRIMARY KEY" => "id_document",
218 "KEY id_vignette" => "id_vignette",
219 "KEY mode" => "mode",
220 "KEY id_type" => "id_type");
221
222 $spip_types_documents = array(
223 "id_type" => "bigint(21) NOT NULL",
224 "titre" => "text NOT NULL",
225 "descriptif" => "text NOT NULL",
226 "extension" => "varchar(10) NOT NULL",
227 "mime_type" => "varchar(100) NOT NULL",
228 "inclus" => "ENUM('non', 'image', 'embed') NOT NULL DEFAULT 'non'",
229 "upload" => "ENUM('oui', 'non') NOT NULL DEFAULT 'oui'",
230 "maj" => "TIMESTAMP");
231
232 $spip_types_documents_key = array(
233 "PRIMARY KEY" => "id_type",
234 "UNIQUE extension" => "extension",
235 "KEY inclus" => "inclus");
236
237 $spip_syndic = array(
238 "id_syndic" => "bigint(21) NOT NULL",
239 "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL",
240 "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL",
241 "nom_site" => "blob NOT NULL",
242 "url_site" => "blob NOT NULL",
243 "url_syndic" => "blob NOT NULL",
244 "descriptif" => "blob 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) NOT NULL");
254
255 $spip_syndic_key = array(
256 "PRIMARY KEY" => "id_syndic",
257 "KEY id_rubrique" => "id_rubrique",
258 "KEY id_secteur" => "id_secteur",
259 "KEY idx" => "idx",
260 "KEY statut" => "statut, date_syndic");
261
262 $spip_syndic_articles = array(
263 "id_syndic_article" => "bigint(21) NOT NULL",
264 "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL",
265 "titre" => "text NOT NULL",
266 "url" => "VARCHAR(255) NOT NULL",
267 "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
268 "lesauteurs" => "text NOT NULL",
269 "maj" => "TIMESTAMP",
270 "statut" => "VARCHAR(10) NOT NULL",
271 "descriptif" => "blob NOT NULL");
272
273 $spip_syndic_articles_key = array(
274 "PRIMARY KEY" => "id_syndic_article",
275 "KEY id_syndic" => "id_syndic",
276 "KEY statut" => "statut",
277 "KEY url" => "url");
278
279 $spip_forum = array(
280 "id_forum" => "bigint(21) NOT NULL",
281 "id_parent" => "bigint(21) DEFAULT '0' NOT NULL",
282 "id_thread" => "bigint(21) DEFAULT '0' NOT NULL",
283 "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL",
284 "id_article" => "bigint(21) DEFAULT '0' NOT NULL",
285 "id_breve" => "bigint(21) DEFAULT '0' NOT NULL",
286 "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
287 "titre" => "text NOT NULL",
288 "texte" => "mediumtext NOT NULL",
289 "auteur" => "text NOT NULL",
290 "email_auteur" => "text NOT NULL",
291 "nom_site" => "text NOT NULL",
292 "url_site" => "text NOT NULL",
293 "statut" => "varchar(8) NOT NULL",
294 "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL",
295 "ip" => "varchar(16)",
296 "maj" => "TIMESTAMP",
297 "id_auteur" => "BIGINT DEFAULT '0' NOT NULL",
298 "id_message" => "bigint(21) DEFAULT '0' NOT NULL",
299 "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL");
300
301 $spip_forum_key = array(
302 "PRIMARY KEY" => "id_forum",
303 "KEY id_parent" => "id_parent",
304 "KEY id_rubrique" => "id_rubrique",
305 "KEY id_article" => "id_article",
306 "KEY id_breve" => "id_breve",
307 "KEY id_message" => "id_message",
308 "KEY id_syndic" => "id_syndic",
309 "KEY idx" => "idx",
310 "KEY statut" => "statut, date_heure");
311
312 $spip_signatures = array(
313 "id_signature" => "bigint(21) NOT NULL",
314 "id_article" => "bigint(21) DEFAULT '0' NOT NULL",
315 "date_time" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
316 "nom_email" => "text NOT NULL",
317 "ad_email" => "text NOT NULL",
318 "nom_site" => "text NOT NULL",
319 "url_site" => "text NOT NULL",
320 "message" => "mediumtext NOT NULL",
321 "statut" => "varchar(10) NOT NULL",
322 "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL",
323 "maj" => "TIMESTAMP");
324
325 $spip_signatures_key = array(
326 "PRIMARY KEY" => "id_signature",
327 "KEY id_article" => "id_article",
328 "KEY idx" => "idx",
329 "KEY statut" => "statut");
330
331 global $tables_principales;
332
333 /// Attention: mes_fonctions peut avoir deja defini cette variable
334 /// il faut donc rajouter, mais pas reinitialiser
335
336 $tables_principales['spip_articles'] =
337 array('field' => &$spip_articles, 'key' => &$spip_articles_key);
338 $tables_principales['spip_auteurs'] =
339 array('field' => &$spip_auteurs, 'key' => &$spip_auteurs_key);
340 $tables_principales['spip_breves'] =
341 array('field' => &$spip_breves, 'key' => &$spip_breves_key);
342 $tables_principales['spip_messages'] =
343 array('field' => &$spip_messages, 'key' => &$spip_messages_key);
344 $tables_principales['spip_mots'] =
345 array('field' => &$spip_mots, 'key' => &$spip_mots_key);
346 $tables_principales['spip_groupes_mots'] =
347 array('field' => &$spip_groupes_mots, 'key' => &$spip_groupes_mots_key);
348 $tables_principales['spip_rubriques'] =
349 array('field' => &$spip_rubriques, 'key' => &$spip_rubriques_key);
350 $tables_principales['spip_documents'] =
351 array('field' => &$spip_documents, 'key' => &$spip_documents_key);
352 $tables_principales['spip_types_documents'] =
353 array('field' => &$spip_types_documents, 'key' => &$spip_types_documents_key);
354 $tables_principales['spip_syndic'] =
355 array('field' => &$spip_syndic, 'key' => &$spip_syndic_key);
356 $tables_principales['spip_syndic_articles'] =
357 array('field' => &$spip_syndic_articles, 'key' => &$spip_syndic_articles_key);
358 $tables_principales['spip_forum'] =
359 array('field' => &$spip_forum, 'key' => &$spip_forum_key);
360 $tables_principales['spip_signatures'] =
361 array('field' => &$spip_signatures, 'key' => &$spip_signatures_key);
362
363 ?>