Subversion Repositories Sites.tela-botanica.org

Rev

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

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