[SPIP] +2.1.12
[velocampus/web/www.git] / www / ecrire / maj / vieille_base / 10000 / auxiliaires.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 $spip_petitions = array(
17 "id_article" => "bigint(21) DEFAULT '0' NOT NULL",
18 "email_unique" => "CHAR (3) DEFAULT '' NOT NULL",
19 "site_obli" => "CHAR (3) DEFAULT '' NOT NULL",
20 "site_unique" => "CHAR (3) DEFAULT '' NOT NULL",
21 "message" => "CHAR (3) DEFAULT '' NOT NULL",
22 "texte" => "LONGTEXT DEFAULT '' NOT NULL",
23 "maj" => "TIMESTAMP");
24
25 $spip_petitions_key = array(
26 "PRIMARY KEY" => "id_article");
27
28 $spip_visites = array(
29 "date" => "DATE NOT NULL",
30 "visites" => "int UNSIGNED DEFAULT '0' NOT NULL",
31 "maj" => "TIMESTAMP");
32
33 $spip_visites_key = array(
34 "PRIMARY KEY" => "date");
35
36 $spip_visites_articles = array(
37 "date" => "DATE NOT NULL",
38 "id_article" => "int UNSIGNED NOT NULL",
39 "visites" => "int UNSIGNED DEFAULT '0' NOT NULL",
40 "maj" => "TIMESTAMP");
41
42 $spip_visites_articles_key = array(
43 "PRIMARY KEY" => "date, id_article");
44
45 $spip_referers = array(
46 "referer_md5" => "bigint UNSIGNED NOT NULL",
47 "date" => "DATE NOT NULL",
48 "referer" => "VARCHAR (255)",
49 "visites" => "int UNSIGNED NOT NULL",
50 "visites_jour" => "int UNSIGNED NOT NULL",
51 "visites_veille"=> "int UNSIGNED NOT NULL",
52 "maj" => "TIMESTAMP");
53
54 $spip_referers_key = array(
55 "PRIMARY KEY" => "referer_md5");
56
57 $spip_referers_articles = array(
58 "id_article" => "int UNSIGNED NOT NULL",
59 "referer_md5" => "bigint UNSIGNED NOT NULL",
60 "date" => "DATE NOT NULL",
61 "referer" => "VARCHAR (255) DEFAULT '' NOT NULL",
62 "visites" => "int UNSIGNED NOT NULL",
63 "maj" => "TIMESTAMP");
64
65 $spip_referers_articles_key = array(
66 "PRIMARY KEY" => "id_article, referer_md5",
67 "KEY referer_md5" => "referer_md5");
68
69 $spip_auteurs_articles = array(
70 "id_auteur" => "bigint(21) DEFAULT '0' NOT NULL",
71 "id_article" => "bigint(21) DEFAULT '0' NOT NULL");
72
73 $spip_auteurs_articles_key = array(
74 "PRIMARY KEY" => "id_auteur, id_article",
75 "KEY id_article" => "id_article");
76
77 $spip_auteurs_rubriques = array(
78 "id_auteur" => "bigint(21) DEFAULT '0' NOT NULL",
79 "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL");
80
81 $spip_auteurs_rubriques_key = array(
82 "PRIMARY KEY" => "id_auteur, id_rubrique",
83 "KEY id_rubrique" => "id_rubrique");
84
85 $spip_auteurs_messages = array(
86 "id_auteur" => "bigint(21) DEFAULT '0' NOT NULL",
87 "id_message" => "bigint(21) DEFAULT '0' NOT NULL",
88 "vu" => "CHAR (3)");
89
90 $spip_auteurs_messages_key = array(
91 "PRIMARY KEY" => "id_auteur, id_message",
92 "KEY id_message" => "id_message");
93
94
95 $spip_documents_articles = array(
96 "id_document" => "bigint(21) DEFAULT '0' NOT NULL",
97 "id_article" => "bigint(21) DEFAULT '0' NOT NULL",
98 "vu" => "ENUM('non', 'oui') DEFAULT 'non' NOT NULL");
99
100 $spip_documents_articles_key = array(
101 "PRIMARY KEY" => "id_article, id_document",
102 "KEY id_document" => "id_document");
103
104 $spip_documents_rubriques = array(
105 "id_document" => "bigint(21) DEFAULT '0' NOT NULL",
106 "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL",
107 "vu" => "ENUM('non', 'oui') DEFAULT 'non' NOT NULL");
108
109 $spip_documents_rubriques_key = array(
110 "PRIMARY KEY" => "id_rubrique, id_document",
111 "KEY id_document" => "id_document");
112
113 $spip_documents_breves = array(
114 "id_document" => "bigint(21) DEFAULT '0' NOT NULL",
115 "id_breve" => "bigint(21) DEFAULT '0' NOT NULL",
116 "vu" => "ENUM('non', 'oui') DEFAULT 'non' NOT NULL");
117
118 $spip_documents_breves_key = array(
119 "PRIMARY KEY" => "id_breve, id_document",
120 "KEY id_document" => "id_document");
121
122 $spip_mots_articles = array(
123 "id_mot" => "bigint(21) DEFAULT '0' NOT NULL",
124 "id_article" => "bigint(21) DEFAULT '0' NOT NULL");
125
126 $spip_mots_articles_key = array(
127 "PRIMARY KEY" => "id_article, id_mot",
128 "KEY id_mot" => "id_mot");
129
130 $spip_mots_breves = array(
131 "id_mot" => "bigint(21) DEFAULT '0' NOT NULL",
132 "id_breve" => "bigint(21) DEFAULT '0' NOT NULL");
133
134 $spip_mots_breves_key = array(
135 "PRIMARY KEY" => "id_breve, id_mot",
136 "KEY id_mot" => "id_mot");
137
138 $spip_mots_rubriques = array(
139 "id_mot" => "bigint(21) DEFAULT '0' NOT NULL",
140 "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL");
141
142 $spip_mots_rubriques_key = array(
143 "PRIMARY KEY" => "id_rubrique, id_mot",
144 "KEY id_mot" => "id_mot");
145
146 $spip_mots_syndic = array(
147 "id_mot" => "bigint(21) DEFAULT '0' NOT NULL",
148 "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL");
149
150 $spip_mots_syndic_key = array(
151 "PRIMARY KEY" => "id_syndic, id_mot",
152 "KEY id_mot" => "id_mot");
153
154 $spip_mots_forum = array(
155 "id_mot" => "bigint(21) DEFAULT '0' NOT NULL",
156 "id_forum" => "bigint(21) DEFAULT '0' NOT NULL");
157
158 $spip_mots_forum_key = array(
159 "PRIMARY KEY" => "id_forum, id_mot",
160 "KEY id_mot" => "id_mot");
161
162 $spip_mots_documents = array(
163 "id_mot" => "bigint(21) DEFAULT '0' NOT NULL",
164 "id_document" => "bigint(21) DEFAULT '0' NOT NULL");
165
166 $spip_mots_documents_key = array(
167 "PRIMARY KEY" => "id_document, id_mot",
168 "KEY id_mot" => "id_mot");
169
170 $spip_meta = array(
171 "nom" => "VARCHAR (255) NOT NULL",
172 "valeur" => "text DEFAULT ''",
173 "impt" => "ENUM('non', 'oui') DEFAULT 'oui' NOT NULL",
174 "maj" => "TIMESTAMP");
175
176 $spip_meta_key = array(
177 "PRIMARY KEY" => "nom");
178
179 $spip_versions = array (
180 "id_article" => "bigint(21) NOT NULL",
181 "id_version" => "int unsigned DEFAULT '0' NOT NULL",
182 "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
183 "id_auteur" => "VARCHAR(23) DEFAULT '' NOT NULL", # stocke aussi IP(v6)
184 "titre_version" => "text DEFAULT '' NOT NULL",
185 "permanent" => "char(3)",
186 "champs" => "text");
187
188 $spip_versions_key = array (
189 "PRIMARY KEY" => "id_article, id_version",
190 "KEY date" => "id_article, date",
191 "KEY id_auteur" => "id_auteur");
192
193 $spip_versions_fragments = array(
194 "id_fragment" => "int unsigned DEFAULT '0' NOT NULL",
195 "version_min" => "int unsigned DEFAULT '0' NOT NULL",
196 "version_max" => "int unsigned DEFAULT '0' NOT NULL",
197 "id_article" => "bigint(21) NOT NULL",
198 "compress" => "tinyint NOT NULL",
199 "fragment" => "longblob" # ici c'est VRAIMENT un blob (on y stocke du gzip)
200 );
201
202 $spip_versions_fragments_key = array(
203 "PRIMARY KEY" => "id_article, id_fragment, version_min");
204
205
206
207
208 global $tables_auxiliaires;
209
210 $tables_auxiliaires['spip_petitions'] = array(
211 'field' => &$spip_petitions,
212 'key' => &$spip_petitions_key
213 );
214 $tables_auxiliaires['spip_visites'] = array(
215 'field' => &$spip_visites,
216 'key' => &$spip_visites_key);
217 $tables_auxiliaires['spip_visites_articles'] = array(
218 'field' => &$spip_visites_articles,
219 'key' => &$spip_visites_articles_key);
220 $tables_auxiliaires['spip_referers'] = array(
221 'field' => &$spip_referers,
222 'key' => &$spip_referers_key);
223 $tables_auxiliaires['spip_referers_articles'] = array(
224 'field' => &$spip_referers_articles,
225 'key' => &$spip_referers_articles_key);
226 $tables_auxiliaires['spip_auteurs_articles'] = array(
227 'field' => &$spip_auteurs_articles,
228 'key' => &$spip_auteurs_articles_key);
229 $tables_auxiliaires['spip_auteurs_rubriques'] = array(
230 'field' => &$spip_auteurs_rubriques,
231 'key' => &$spip_auteurs_rubriques_key);
232 $tables_auxiliaires['spip_auteurs_messages'] = array(
233 'field' => &$spip_auteurs_messages,
234 'key' => &$spip_auteurs_messages_key);
235 $tables_auxiliaires['spip_documents_articles'] = array(
236 'field' => &$spip_documents_articles,
237 'key' => &$spip_documents_articles_key);
238 $tables_auxiliaires['spip_documents_rubriques'] = array(
239 'field' => &$spip_documents_rubriques,
240 'key' => &$spip_documents_rubriques_key);
241 $tables_auxiliaires['spip_documents_breves'] = array(
242 'field' => &$spip_documents_breves,
243 'key' => &$spip_documents_breves_key);
244 $tables_auxiliaires['spip_mots_articles'] = array(
245 'field' => &$spip_mots_articles,
246 'key' => &$spip_mots_articles_key);
247 $tables_auxiliaires['spip_mots_breves'] = array(
248 'field' => &$spip_mots_breves,
249 'key' => &$spip_mots_breves_key);
250 $tables_auxiliaires['spip_mots_rubriques'] = array(
251 'field' => &$spip_mots_rubriques,
252 'key' => &$spip_mots_rubriques_key);
253 $tables_auxiliaires['spip_mots_syndic'] = array(
254 'field' => &$spip_mots_syndic,
255 'key' => &$spip_mots_syndic_key);
256 $tables_auxiliaires['spip_mots_forum'] = array(
257 'field' => &$spip_mots_forum,
258 'key' => &$spip_mots_forum_key);
259 $tables_auxiliaires['spip_mots_documents'] = array(
260 'field' => &$spip_mots_documents,
261 'key' => &$spip_mots_documents_key);
262 $tables_auxiliaires['spip_meta'] = array(
263 'field' => &$spip_meta,
264 'key' => &$spip_meta_key);
265 $tables_auxiliaires['spip_versions'] = array(
266 'field' => &$spip_versions,
267 'key' => &$spip_versions_key);
268 $tables_auxiliaires['spip_versions_fragments'] = array(
269 'field' => &$spip_versions_fragments,
270 'key' => &$spip_versions_fragments_key);
271 ?>