Subversion Repositories Sites.tela-botanica.org

Rev

Rev 609 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 david 1
<?php
2
 
3
/***************************************************************************\
4
 *  SPIP, Systeme de publication pour l'internet                           *
5
 *                                                                         *
6
 *  Copyright (c) 2001-2005                                                *
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
// Ce fichier ne sera execute qu'une fois
15
if (defined("_ECRIRE_INC_AUXBASE")) return;
16
define("_ECRIRE_INC_AUXBASE", "1");
17
 
18
$spip_petitions = array(
19
		"id_article"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
20
		"email_unique"	=> "CHAR (3) NOT NULL",
21
		"site_obli"	=> "CHAR (3) NOT NULL",
22
		"site_unique"	=> "CHAR (3) NOT NULL",
23
		"message"	=> "CHAR (3) NOT NULL",
24
		"texte"	=> "LONGBLOB NOT NULL",
25
		"maj"	=> "TIMESTAMP");
26
 
27
$spip_petitions_key = array(
28
		"PRIMARY KEY"	=> "id_article");
29
 
30
$spip_visites_temp = array(
31
		"ip"	=> "INT UNSIGNED NOT NULL",
32
		"type"	=> "ENUM ('article', 'rubrique', 'breve', 'autre') NOT NULL",
33
		"id_objet"	=> "INT UNSIGNED NOT NULL",
34
		"maj"	=> "TIMESTAMP");
35
 
36
$spip_visites_temp_key = array(
37
		"PRIMARY KEY"	=> "type, id_objet, ip");
38
 
39
$spip_visites = array(
40
		"date"	=> "DATE NOT NULL",
41
		"visites"	=> "INT UNSIGNED NOT NULL",
42
		"maj"	=> "TIMESTAMP");
43
 
44
$spip_visites_key = array(
45
		"PRIMARY KEY"	=> "date");
46
 
47
$spip_visites_articles = array(
48
		"date"	=> "DATE NOT NULL",
49
		"id_article"	=> "INT UNSIGNED NOT NULL",
50
		"visites"	=> "INT UNSIGNED NOT NULL",
51
		"maj"	=> "TIMESTAMP");
52
 
53
$spip_visites_articles_key = array(
54
		"PRIMARY KEY"	=> "date, id_article");
55
 
56
$spip_referers_temp = array(
57
		"ip"	=> "INT UNSIGNED NOT NULL",
58
		"referer"	=> "VARCHAR (255) NOT NULL",
59
		"referer_md5"	=> "BIGINT UNSIGNED NOT NULL",
60
		"type"	=> "ENUM ('article', 'rubrique', 'breve', 'autre') NOT NULL",
61
		"id_objet"	=> "INT UNSIGNED NOT NULL",
62
		"maj"	=> "TIMESTAMP");
63
 
64
$spip_referers_temp_key = array(
65
		"PRIMARY KEY"	=> "type, id_objet, referer_md5, ip");
66
 
67
$spip_referers = array(
68
		"referer_md5"	=> "BIGINT UNSIGNED NOT NULL",
69
		"date"		=> "DATE NOT NULL",
70
		"referer"	=> "VARCHAR (255) NOT NULL",
71
		"visites"	=> "INT UNSIGNED NOT NULL",
72
		"visites_jour"	=> "INT UNSIGNED NOT NULL",
73
		"visites_veille"=> "INT UNSIGNED NOT NULL",
74
		"maj"		=> "TIMESTAMP");
75
 
76
$spip_referers_key = array(
77
		"PRIMARY KEY"	=> "referer_md5");
78
 
79
$spip_referers_articles = array(
80
		"id_article"	=> "INT UNSIGNED NOT NULL",
81
		"referer_md5"	=> "BIGINT UNSIGNED NOT NULL",
82
		"date"		=> "DATE NOT NULL",
83
		"referer"	=> "VARCHAR (255) NOT NULL",
84
		"visites"	=> "INT UNSIGNED NOT NULL",
85
		"maj"		=> "TIMESTAMP");
86
 
87
$spip_referers_articles_key = array(
88
		"PRIMARY KEY"	=> "id_article, referer_md5",
89
		"KEY referer_md5"	=> "referer_md5");
90
 
91
$spip_auteurs_articles = array(
92
		"id_auteur"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
93
		"id_article"	=> "BIGINT (21) DEFAULT '0' NOT NULL");
94
 
95
$spip_auteurs_articles_key = array(
96
		"KEY id_auteur"	=> "id_auteur",
97
		"KEY id_article"	=> "id_article");
98
 
99
$spip_auteurs_rubriques = array(
100
		"id_auteur"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
101
		"id_rubrique"	=> "BIGINT (21) DEFAULT '0' NOT NULL");
102
 
103
$spip_auteurs_rubriques_key = array(
104
		"KEY id_auteur"	=> "id_auteur",
105
		"KEY id_rubrique"	=> "id_rubrique");
106
 
107
$spip_auteurs_messages = array(
108
		"id_auteur"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
109
		"id_message"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
110
		"vu"		=> "CHAR (3) NOT NULL");
111
 
112
$spip_auteurs_messages_key = array(
113
		"KEY id_auteur"	=> "id_auteur",
114
		"KEY id_message"	=> "id_message");
115
 
116
 
117
$spip_documents_articles = array(
118
		"id_document"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
119
		"id_article"	=> "BIGINT (21) DEFAULT '0' NOT NULL");
120
 
121
$spip_documents_articles_key = array(
122
		"KEY id_document"	=> "id_document",
123
		"KEY id_article"	=> "id_article");
124
 
125
$spip_documents_rubriques = array(
126
		"id_document"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
127
		"id_rubrique"	=> "BIGINT (21) DEFAULT '0' NOT NULL");
128
 
129
$spip_documents_rubriques_key = array(
130
		"KEY id_document"	=> "id_document",
131
		"KEY id_rubrique"	=> "id_rubrique");
132
 
133
$spip_documents_breves = array(
134
		"id_document"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
135
		"id_breve"	=> "BIGINT (21) DEFAULT '0' NOT NULL");
136
 
137
$spip_documents_breves_key = array(
138
		"KEY id_document"	=> "id_document",
139
		"KEY id_breve"	=> "id_breve");
140
 
141
$spip_documents_syndic = array(
142
		"id_document"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
143
		"id_syndic"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
144
		"id_syndic_article"	=> "BIGINT (21) DEFAULT '0' NOT NULL"
145
		);
146
 
147
$spip_documents_syndic_key = array(
148
		"KEY id_document"	=> "id_document",
149
		"KEY id_syndic"	=> "id_syndic",
150
		"KEY id_syndic_article"	=> "id_syndic_article");
151
 
152
$spip_mots_articles = array(
153
		"id_mot"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
154
		"id_article"	=> "BIGINT (21) DEFAULT '0' NOT NULL");
155
 
156
$spip_mots_articles_key = array(
157
		"KEY id_mot"	=> "id_mot",
158
		"KEY id_article"	=> "id_article");
159
 
160
$spip_mots_breves = array(
161
		"id_mot"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
162
		"id_breve"	=> "BIGINT (21) DEFAULT '0' NOT NULL");
163
 
164
$spip_mots_breves_key = array(
165
		"KEY id_mot"	=> "id_mot",
166
		"KEY id_breve"	=> "id_breve");
167
 
168
$spip_mots_rubriques = array(
169
		"id_mot"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
170
		"id_rubrique"	=> "BIGINT (21) DEFAULT '0' NOT NULL");
171
 
172
$spip_mots_rubriques_key = array(
173
		"KEY id_mot"	=> "id_mot",
174
		"KEY id_rubrique"	=> "id_rubrique");
175
 
176
$spip_mots_syndic = array(
177
		"id_mot"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
178
		"id_syndic"	=> "BIGINT (21) DEFAULT '0' NOT NULL");
179
 
180
$spip_mots_syndic_key = array(
181
		"KEY id_mot"	=> "id_mot",
182
		"KEY id_syndic"	=> "id_syndic");
183
 
184
$spip_mots_forum = array(
185
		"id_mot"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
186
		"id_forum"	=> "BIGINT (21) DEFAULT '0' NOT NULL");
187
 
188
$spip_mots_forum_key = array(
189
		"KEY id_mot"	=> "id_mot",
190
		"KEY id_forum"	=> "id_forum");
191
 
192
$spip_mots_documents = array(
193
		"id_mot"	=> "BIGINT (21) DEFAULT '0' NOT NULL",
194
		"id_document"	=> "BIGINT (21) DEFAULT '0' NOT NULL");
195
 
196
$spip_mots_documents_key = array(
197
		"KEY id_mot"	=> "id_mot",
198
		"KEY id_document"	=> "id_document");
199
 
200
$spip_meta = array(
201
		"nom"	=> "VARCHAR (255) NOT NULL",
202
		"valeur"	=> "VARCHAR (255) DEFAULT ''",
203
		"maj"	=> "TIMESTAMP");
204
 
205
$spip_meta_key = array(
206
		"PRIMARY KEY"	=> "nom");
207
 
208
$spip_index_articles = array(
209
		"`hash`"	=> "BIGINT UNSIGNED NOT NULL",
210
		"points"	=> "INT UNSIGNED DEFAULT '0' NOT NULL",
211
		"id_article"	=> "INT UNSIGNED NOT NULL");
212
 
213
$spip_index_articles_key = array(
214
		"KEY `hash`"	=> "`hash`",
215
		"KEY id_article"	=> "id_article");
216
 
217
$spip_index_auteurs = array(
218
		"`hash`"	=> "BIGINT UNSIGNED NOT NULL",
219
		"points"	=> "INT UNSIGNED DEFAULT '0' NOT NULL",
220
		"id_auteur"	=> "INT UNSIGNED NOT NULL");
221
 
222
$spip_index_auteurs_key = array(
223
		"KEY `hash`"	=> "`hash`",
224
		"KEY id_auteur"	=> "id_auteur");
225
 
226
$spip_index_breves = array(
227
		"`hash`"	=> "BIGINT UNSIGNED NOT NULL",
228
		"points"	=> "INT UNSIGNED DEFAULT '0' NOT NULL",
229
		"id_breve"	=> "INT UNSIGNED NOT NULL");
230
 
231
$spip_index_breves_key = array(
232
		"KEY `hash`"	=> "`hash`",
233
		"KEY id_breve"	=> "id_breve");
234
 
235
$spip_index_mots = array(
236
		"`hash`"	=> "BIGINT UNSIGNED NOT NULL",
237
		"points"	=> "INT UNSIGNED DEFAULT '0' NOT NULL",
238
		"id_mot"	=> "INT UNSIGNED NOT NULL");
239
 
240
$spip_index_mots_key = array(
241
		"KEY `hash`"	=> "`hash`",
242
		"KEY id_mot"	=> "id_mot");
243
 
244
$spip_index_rubriques = array(
245
		"`hash`"	=> "BIGINT UNSIGNED NOT NULL",
246
		"points"	=> "INT UNSIGNED DEFAULT '0' NOT NULL",
247
		"id_rubrique"	=> "INT UNSIGNED NOT NULL");
248
 
249
$spip_index_rubriques_key = array(
250
		"KEY `hash`"	=> "`hash`",
251
		"KEY id_rubrique"	=> "id_rubrique");
252
 
253
$spip_index_syndic = array(
254
		"`hash`"	=> "BIGINT UNSIGNED NOT NULL",
255
		"points"	=> "INT UNSIGNED DEFAULT '0' NOT NULL",
256
		"id_syndic"	=> "INT UNSIGNED NOT NULL");
257
 
258
$spip_index_syndic_key = array(
259
		"KEY `hash`"	=> "`hash`",
260
		"KEY id_syndic"	=> "id_syndic");
261
 
262
$spip_index_signatures = array(
263
		"`hash`"	=> "BIGINT UNSIGNED NOT NULL",
264
		"points"	=> "INT UNSIGNED DEFAULT '0' NOT NULL",
265
		"id_signature"	=> "INT UNSIGNED NOT NULL");
266
 
267
$spip_index_signatures_key = array(
268
		"KEY `hash`"		=> "`hash`",
269
		"KEY id_signature"	=> "id_signature");
270
 
271
$spip_index_forum = array(
272
		"`hash`"	=> "BIGINT UNSIGNED NOT NULL",
273
		"points"	=> "INT UNSIGNED DEFAULT '0' NOT NULL",
274
		"id_forum"	=> "INT UNSIGNED NOT NULL");
275
 
276
$spip_index_forum_key = array(
277
		"KEY `hash`"	=> "`hash`",
278
		"KEY id_forum"	=> "id_forum");
279
 
280
$spip_index_documents = array(
281
		"`hash`"	=> "BIGINT UNSIGNED NOT NULL",
282
		"points"	=> "INT UNSIGNED DEFAULT '0' NOT NULL",
283
		"id_document"	=> "INT UNSIGNED NOT NULL");
284
 
285
$spip_index_documents_key = array(
286
		"KEY `hash`"	=> "`hash`",
287
		"KEY id_document"	=> "id_document");
288
 
289
$spip_index_dico = array(
290
		"`hash`"	=> "BIGINT UNSIGNED NOT NULL",
291
		"dico"		=> "VARCHAR (30) NOT NULL");
292
 
293
$spip_index_dico_key = array(
294
		"PRIMARY KEY"	=> "dico");
295
 
296
$spip_versions = array (
297
		"id_article"	=> "bigint(21) NOT NULL",
298
		"id_version"	=> "int unsigned DEFAULT '0' NOT NULL",
299
		"date"	=> "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
300
		"id_auteur"	=> "bigint(21) NOT NULL",
301
		"titre_version"	=> "text DEFAULT '' NOT NULL",
302
		"permanent"	=> "char(3) NOT NULL",
303
		"champs"	=> "text NOT NULL");
304
 
305
$spip_versions_key = array (
306
		"PRIMARY KEY"	=> "id_article, id_version",
307
		"KEY date"	=> "id_article, date",
308
		"KEY id_auteur"	=> "id_auteur");
309
 
310
$spip_versions_fragments = array(
311
		"id_fragment"	=> "int unsigned DEFAULT '0' NOT NULL",
312
		"version_min"	=> "int unsigned DEFAULT '0' NOT NULL",
313
		"version_max"	=> "int unsigned DEFAULT '0' NOT NULL",
314
		"id_article"	=> "bigint(21) NOT NULL",
315
		"compress"	=> "tinyint NOT NULL",
316
		"fragment"	=> "longblob NOT NULL");
317
 
318
$spip_versions_fragments_key = array(
319
	     "PRIMARY KEY"	=> "id_article, id_fragment, version_min");
320
 
321
$spip_caches = array(
322
		"fichier" => "char (64) NOT NULL",
323
		"id" => "char (64) NOT NULL",
324
		// i=par id, t=timer, x=suppression
325
		"type" => "CHAR (1) DEFAULT 'i' NOT NULL",
326
		"taille" => "integer DEFAULT '0' NOT NULL");
327
$spip_caches_key = array(
328
		"PRIMARY KEY"	=> "fichier, id",
329
		"KEY fichier" => "fichier",
330
		"KEY id" => "id");
331
 
332
$spip_ortho_cache = array(
333
	"lang" => "VARCHAR(10) NOT NULL",
334
	"mot" => "VARCHAR(255) BINARY NOT NULL",
335
	"ok" => "TINYINT NOT NULL",
336
	"suggest" => "BLOB NOT NULL",
337
	"maj" => "TIMESTAMP");
338
$spip_ortho_cache_key = array(
339
	"PRIMARY KEY" => "lang, mot",
340
	"KEY maj" => "maj");
341
 
342
$spip_ortho_dico = array(
343
	"lang" => "VARCHAR(10) NOT NULL",
344
	"mot" => "VARCHAR(255) BINARY NOT NULL",
345
	"id_auteur" => "BIGINT UNSIGNED NOT NULL",
346
	"maj" => "TIMESTAMP");
347
$spip_ortho_dico_key = array(
348
	"PRIMARY KEY" => "lang, mot",);
349
 
350
 
351
global $tables_auxiliaires;
352
 
353
$tables_auxiliaires  =
354
  array(
355
	'spip_petitions' => array('field' => &$spip_petitions,
356
			     'key' => &$spip_petitions_key),
357
	'spip_visites_temp' => array('field' => &$spip_visites_temp,
358
				'key' => &$spip_visites_temp_key),
359
	'spip_visites' =>	array('field' => &$spip_visites,
360
			      'key' => &$spip_visites_key),
361
	'spip_visites_articles' => array('field' => &$spip_visites_articles,
362
				    'key' => &$spip_visites_articles_key),
363
	'spip_referers_temp' => array('field' => &$spip_referers_temp,
364
				 'key' => &$spip_referers_temp_key),
365
	'spip_referers' => array('field' => &$spip_referers,
366
			    'key' => &$spip_referers_key),
367
	'spip_referers_articles' => array('field' => &$spip_referers_articles,
368
				     'key' => &$spip_referers_articles_key),
369
	'spip_auteurs_articles' => array('field' => &$spip_auteurs_articles,
370
				    'key' => &$spip_auteurs_articles_key),
371
	'spip_auteurs_rubriques' => array('field' => &$spip_auteurs_rubriques,
372
				     'key' => &$spip_auteurs_rubriques_key),
373
	'spip_auteurs_messages' => array('field' => &$spip_auteurs_messages,
374
				    'key' => &$spip_auteurs_messages_key),
375
	'spip_documents_articles' => array('field' => &$spip_documents_articles,
376
				      'key' => &$spip_documents_articles_key),
377
	'spip_documents_rubriques' => array('field' => &$spip_documents_rubriques,
378
				       'key' => &$spip_documents_rubriques_key),
379
	'spip_documents_breves' => array('field' => &$spip_documents_breves,
380
				    'key' => &$spip_documents_breves_key),
381
	'spip_documents_syndic' => array('field' => &$spip_documents_syndic,
382
				    'key' => &$spip_documents_syndic_key),
383
	'spip_mots_articles' => array('field' => &$spip_mots_articles,
384
				 'key' => &$spip_mots_articles_key),
385
	'spip_mots_breves' => array('field' => &$spip_mots_breves,
386
			       'key' => &$spip_mots_breves_key),
387
	'spip_mots_rubriques' => array('field' => &$spip_mots_rubriques,
388
				  'key' => &$spip_mots_rubriques_key),
389
	'spip_mots_syndic' => array('field' => &$spip_mots_syndic,
390
			       'key' => &$spip_mots_syndic_key),
391
	'spip_mots_forum' => array('field' => &$spip_mots_forum,
392
			      'key' => &$spip_mots_forum_key),
393
	'spip_mots_documents' => array('field' => &$spip_mots_documents,
394
			      'key' => &$spip_mots_documents_key),
395
	'spip_meta' => array('field' => &$spip_meta,
396
			'key' => &$spip_meta_key),
397
	'spip_index_articles' => array('field' => &$spip_index_articles,
398
				  'key' => &$spip_index_articles_key),
399
	'spip_index_auteurs' => array('field' => &$spip_index_auteurs,
400
				 'key' => &$spip_index_auteurs_key),
401
	'spip_index_breves' => array('field' => &$spip_index_breves,
402
				'key' => &$spip_index_breves_key),
403
	'spip_index_mots' => array('field' => &$spip_index_mots,
404
			      'key' => &$spip_index_mots_key),
405
	'spip_index_rubriques' => array('field' => &$spip_index_rubriques,
406
				   'key' => &$spip_index_rubriques_key),
407
	'spip_index_syndic' => array('field' => &$spip_index_syndic,
408
				'key' => &$spip_index_syndic_key),
409
	'spip_index_signatures' => array('field' => &$spip_index_signatures,
410
				    'key' => &$spip_index_signatures_key),
411
	'spip_index_forum' => array('field' => &$spip_index_forum,
412
			       'key' => &$spip_index_forum_key),
413
	'spip_index_documents' => array('field' => &$spip_index_documents,
414
			       'key' => &$spip_index_documents_key),
415
	'spip_index_dico' => array('field' => &$spip_index_dico,
416
			      'key' => &$spip_index_dico_key),
417
	'spip_versions'	=> array('field' => &$spip_versions,
418
					 'key' => &$spip_versions_key),
419
	'spip_versions_fragments'	=> array('field' => &$spip_versions_fragments,
420
					 'key' => &$spip_versions_fragments_key),
421
	'spip_caches'	=> array('field' => &$spip_caches,
422
					 'key' => &$spip_caches_key),
423
	'spip_ortho_cache'	=> array('field' => &$spip_ortho_cache,
424
					 'key' => &$spip_ortho_cache_key),
425
	'spip_ortho_dico'	=> array('field' => &$spip_ortho_dico,
426
					 'key' => &$spip_ortho_dico_key)
427
	);
428
 
429
?>