1 | ----------------------------------------------------------------------------- |
---|
2 | -- piwigo_caddie |
---|
3 | ----------------------------------------------------------------------------- |
---|
4 | |
---|
5 | DROP TABLE IF EXISTS piwigo_caddie; |
---|
6 | CREATE TABLE "piwigo_caddie" |
---|
7 | ( |
---|
8 | "user_id" INTEGER default 0 NOT NULL, |
---|
9 | "element_id" INTEGER default 0 NOT NULL, |
---|
10 | PRIMARY KEY ("user_id","element_id") |
---|
11 | ); |
---|
12 | |
---|
13 | ----------------------------------------------------------------------------- |
---|
14 | -- piwigo_categories |
---|
15 | ----------------------------------------------------------------------------- |
---|
16 | |
---|
17 | DROP TABLE IF EXISTS piwigo_categories; |
---|
18 | CREATE TABLE "piwigo_categories" |
---|
19 | ( |
---|
20 | "id" INTEGER NOT NULL, |
---|
21 | "name" VARCHAR(255) default '' NOT NULL, |
---|
22 | "id_uppercat" INTEGER, |
---|
23 | "comment" TEXT, |
---|
24 | "dir" VARCHAR(255), |
---|
25 | "rank" INTEGER, |
---|
26 | "status" VARCHAR(50) default 'public', |
---|
27 | "site_id" INTEGER default 1, |
---|
28 | "visible" BOOLEAN default true, |
---|
29 | "uploadable" BOOLEAN default false, |
---|
30 | "representative_picture_id" INTEGER, |
---|
31 | "uppercats" TEXT, |
---|
32 | "commentable" BOOLEAN default true, |
---|
33 | "global_rank" VARCHAR(255), |
---|
34 | "image_order" VARCHAR(128), |
---|
35 | "permalink" VARCHAR(64), |
---|
36 | PRIMARY KEY ("id"), |
---|
37 | CONSTRAINT "categories_i3" UNIQUE ("permalink") |
---|
38 | ); |
---|
39 | |
---|
40 | CREATE INDEX "categories_i2" ON "piwigo_categories" ("id_uppercat"); |
---|
41 | |
---|
42 | ----------------------------------------------------------------------------- |
---|
43 | -- piwigo_config |
---|
44 | ----------------------------------------------------------------------------- |
---|
45 | |
---|
46 | DROP TABLE IF EXISTS piwigo_config; |
---|
47 | CREATE TABLE piwigo_config |
---|
48 | ( |
---|
49 | "param" VARCHAR(40) default '' NOT NULL, |
---|
50 | "value" TEXT, |
---|
51 | "comment" VARCHAR(255), |
---|
52 | PRIMARY KEY ("param") |
---|
53 | ); |
---|
54 | |
---|
55 | ----------------------------------------------------------------------------- |
---|
56 | -- piwigo_favorites |
---|
57 | ----------------------------------------------------------------------------- |
---|
58 | |
---|
59 | DROP TABLE IF EXISTS piwigo_favorites; |
---|
60 | CREATE TABLE piwigo_favorites |
---|
61 | ( |
---|
62 | "user_id" INTEGER default 0 NOT NULL, |
---|
63 | "image_id" INTEGER default 0 NOT NULL, |
---|
64 | PRIMARY KEY ("user_id","image_id") |
---|
65 | ); |
---|
66 | |
---|
67 | |
---|
68 | ----------------------------------------------------------------------------- |
---|
69 | -- piwigo_group_access |
---|
70 | ----------------------------------------------------------------------------- |
---|
71 | |
---|
72 | DROP TABLE IF EXISTS piwigo_group_access; |
---|
73 | CREATE TABLE piwigo_group_access |
---|
74 | ( |
---|
75 | "group_id" INTEGER default 0 NOT NULL, |
---|
76 | "cat_id" INTEGER default 0 NOT NULL, |
---|
77 | PRIMARY KEY ("group_id","cat_id") |
---|
78 | ); |
---|
79 | |
---|
80 | ----------------------------------------------------------------------------- |
---|
81 | -- piwigo_groups |
---|
82 | ----------------------------------------------------------------------------- |
---|
83 | |
---|
84 | DROP TABLE IF EXISTS piwigo_groups; |
---|
85 | CREATE TABLE piwigo_groups |
---|
86 | ( |
---|
87 | "id" INTEGER NOT NULL, |
---|
88 | "name" VARCHAR(255) default '' NOT NULL, |
---|
89 | "is_default" BOOLEAN default false, |
---|
90 | PRIMARY KEY ("id"), |
---|
91 | CONSTRAINT "groups_ui1" UNIQUE ("name") |
---|
92 | ); |
---|
93 | |
---|
94 | ----------------------------------------------------------------------------- |
---|
95 | -- piwigo_history |
---|
96 | ----------------------------------------------------------------------------- |
---|
97 | |
---|
98 | DROP TABLE IF EXISTS piwigo_history; |
---|
99 | CREATE TABLE piwigo_history |
---|
100 | ( |
---|
101 | "id" INTEGER NOT NULL, |
---|
102 | "date" DATE NOT NULL, |
---|
103 | "time" TIME NOT NULL, |
---|
104 | "user_id" INTEGER default 0 NOT NULL, |
---|
105 | "ip" VARCHAR(15) default '' NOT NULL, |
---|
106 | "section" VARCHAR(50) default NULL, |
---|
107 | "category_id" INTEGER, |
---|
108 | "tag_ids" VARCHAR(50), |
---|
109 | "image_id" INTEGER, |
---|
110 | "summarized" BOOLEAN default false, |
---|
111 | "image_type" VARCHAR(50) default NULL, |
---|
112 | PRIMARY KEY ("id") |
---|
113 | ); |
---|
114 | |
---|
115 | |
---|
116 | CREATE INDEX "history_i1" ON "piwigo_history" ("summarized"); |
---|
117 | |
---|
118 | ----------------------------------------------------------------------------- |
---|
119 | -- piwigo_history_summary |
---|
120 | ----------------------------------------------------------------------------- |
---|
121 | |
---|
122 | DROP TABLE IF EXISTS piwigo_history_summary; |
---|
123 | CREATE TABLE piwigo_history_summary |
---|
124 | ( |
---|
125 | "year" INTEGER default 0 NOT NULL, |
---|
126 | "month" INTEGER, |
---|
127 | "day" INTEGER, |
---|
128 | "hour" INTEGER, |
---|
129 | "nb_pages" INTEGER, |
---|
130 | "id" INTEGER NOT NULL, |
---|
131 | PRIMARY KEY ("id"), |
---|
132 | CONSTRAINT "history_summary_ymdh" UNIQUE ("year","month","day","hour") |
---|
133 | ); |
---|
134 | |
---|
135 | ----------------------------------------------------------------------------- |
---|
136 | -- piwigo_image_category |
---|
137 | ----------------------------------------------------------------------------- |
---|
138 | |
---|
139 | DROP TABLE IF EXISTS piwigo_image_category; |
---|
140 | CREATE TABLE piwigo_image_category |
---|
141 | ( |
---|
142 | "image_id" INTEGER default 0 NOT NULL, |
---|
143 | "category_id" INTEGER default 0 NOT NULL, |
---|
144 | "rank" INTEGER, |
---|
145 | PRIMARY KEY ("image_id","category_id") |
---|
146 | ); |
---|
147 | |
---|
148 | |
---|
149 | CREATE INDEX "image_category_i1" ON "piwigo_image_category" ("category_id"); |
---|
150 | |
---|
151 | ----------------------------------------------------------------------------- |
---|
152 | -- piwigo_image_tag |
---|
153 | ----------------------------------------------------------------------------- |
---|
154 | |
---|
155 | DROP TABLE IF EXISTS piwigo_image_tag; |
---|
156 | CREATE TABLE piwigo_image_tag |
---|
157 | ( |
---|
158 | "image_id" INTEGER default 0 NOT NULL, |
---|
159 | "tag_id" INTEGER default 0 NOT NULL, |
---|
160 | PRIMARY KEY ("image_id","tag_id") |
---|
161 | ); |
---|
162 | |
---|
163 | |
---|
164 | CREATE INDEX "image_tag_i1" ON "piwigo_image_tag" ("tag_id"); |
---|
165 | |
---|
166 | ----------------------------------------------------------------------------- |
---|
167 | -- piwigo_images |
---|
168 | ----------------------------------------------------------------------------- |
---|
169 | |
---|
170 | DROP TABLE IF EXISTS piwigo_images; |
---|
171 | CREATE TABLE piwigo_images |
---|
172 | ( |
---|
173 | "id" INTEGER NOT NULL, |
---|
174 | "file" VARCHAR(255) default '' NOT NULL, |
---|
175 | "date_available" TIMESTAMP NOT NULL, |
---|
176 | "date_creation" TIMESTAMP, |
---|
177 | "tn_ext" VARCHAR(4) default '', |
---|
178 | "name" VARCHAR(255), |
---|
179 | "comment" TEXT, |
---|
180 | "author" VARCHAR(255), |
---|
181 | "hit" INTEGER default 0 NOT NULL, |
---|
182 | "filesize" INTEGER, |
---|
183 | "width" INTEGER, |
---|
184 | "height" INTEGER, |
---|
185 | "representative_ext" VARCHAR(4), |
---|
186 | "date_metadata_update" DATE, |
---|
187 | "average_rate" FLOAT, |
---|
188 | "has_high" BOOLEAN default false, |
---|
189 | "path" VARCHAR(255) default '' NOT NULL, |
---|
190 | "storage_category_id" INTEGER, |
---|
191 | "high_filesize" INTEGER, |
---|
192 | "level" INTEGER default 0 NOT NULL, |
---|
193 | "md5sum" CHAR(32), |
---|
194 | PRIMARY KEY ("id") |
---|
195 | ); |
---|
196 | |
---|
197 | |
---|
198 | CREATE INDEX "images_i2" ON "piwigo_images" ("date_available"); |
---|
199 | |
---|
200 | CREATE INDEX "images_i3" ON "piwigo_images" ("average_rate"); |
---|
201 | |
---|
202 | CREATE INDEX "images_i4" ON "piwigo_images" ("hit"); |
---|
203 | |
---|
204 | CREATE INDEX "images_i5" ON "piwigo_images" ("date_creation"); |
---|
205 | |
---|
206 | CREATE INDEX "images_i1" ON "piwigo_images" ("storage_category_id"); |
---|
207 | |
---|
208 | ----------------------------------------------------------------------------- |
---|
209 | -- piwigo_old_permalinks |
---|
210 | ----------------------------------------------------------------------------- |
---|
211 | |
---|
212 | DROP TABLE IF EXISTS piwigo_old_permalinks; |
---|
213 | CREATE TABLE piwigo_old_permalinks |
---|
214 | ( |
---|
215 | "cat_id" INTEGER default 0 NOT NULL, |
---|
216 | "permalink" VARCHAR(64) default '' NOT NULL, |
---|
217 | "date_deleted" TIMESTAMP NOT NULL, |
---|
218 | "last_hit" TIMESTAMP, |
---|
219 | "hit" INTEGER default 0 NOT NULL, |
---|
220 | PRIMARY KEY ("permalink") |
---|
221 | ); |
---|
222 | |
---|
223 | |
---|
224 | ----------------------------------------------------------------------------- |
---|
225 | -- piwigo_plugins |
---|
226 | ----------------------------------------------------------------------------- |
---|
227 | |
---|
228 | DROP TABLE IF EXISTS piwigo_plugins; |
---|
229 | CREATE TABLE piwigo_plugins |
---|
230 | ( |
---|
231 | "id" VARCHAR(64) default '' NOT NULL, |
---|
232 | "state" VARCHAR(50) default 'inactive', |
---|
233 | "version" VARCHAR(64) default '0' NOT NULL, |
---|
234 | PRIMARY KEY ("id") |
---|
235 | ); |
---|
236 | |
---|
237 | |
---|
238 | ----------------------------------------------------------------------------- |
---|
239 | -- piwigo_rate |
---|
240 | ----------------------------------------------------------------------------- |
---|
241 | |
---|
242 | DROP TABLE IF EXISTS piwigo_rate; |
---|
243 | CREATE TABLE piwigo_rate |
---|
244 | ( |
---|
245 | "user_id" INTEGER default 0 NOT NULL, |
---|
246 | "element_id" INTEGER default 0 NOT NULL, |
---|
247 | "anonymous_id" VARCHAR(45) default '' NOT NULL, |
---|
248 | "rate" INTEGER default 0 NOT NULL, |
---|
249 | "date" DATE NOT NULL, |
---|
250 | PRIMARY KEY ("user_id","element_id","anonymous_id") |
---|
251 | ); |
---|
252 | |
---|
253 | |
---|
254 | ----------------------------------------------------------------------------- |
---|
255 | -- piwigo_search |
---|
256 | ----------------------------------------------------------------------------- |
---|
257 | |
---|
258 | DROP TABLE IF EXISTS piwigo_search; |
---|
259 | CREATE TABLE piwigo_search |
---|
260 | ( |
---|
261 | "id" INTEGER NOT NULL, |
---|
262 | "last_seen" DATE, |
---|
263 | "rules" TEXT, |
---|
264 | PRIMARY KEY ("id") |
---|
265 | ); |
---|
266 | |
---|
267 | |
---|
268 | ----------------------------------------------------------------------------- |
---|
269 | -- piwigo_sessions |
---|
270 | ----------------------------------------------------------------------------- |
---|
271 | |
---|
272 | DROP TABLE IF EXISTS piwigo_sessions; |
---|
273 | CREATE TABLE piwigo_sessions |
---|
274 | ( |
---|
275 | "id" VARCHAR(255) default '' NOT NULL, |
---|
276 | "data" TEXT NOT NULL, |
---|
277 | "expiration" TIMESTAMP NOT NULL, |
---|
278 | PRIMARY KEY ("id") |
---|
279 | ); |
---|
280 | |
---|
281 | |
---|
282 | ----------------------------------------------------------------------------- |
---|
283 | -- piwigo_sites |
---|
284 | ----------------------------------------------------------------------------- |
---|
285 | |
---|
286 | DROP TABLE IF EXISTS piwigo_sites; |
---|
287 | CREATE TABLE piwigo_sites |
---|
288 | ( |
---|
289 | "id" INTEGER NOT NULL, |
---|
290 | "galleries_url" VARCHAR(255) default '' NOT NULL, |
---|
291 | PRIMARY KEY ("id"), |
---|
292 | CONSTRAINT "sites_ui1" UNIQUE ("galleries_url") |
---|
293 | ); |
---|
294 | |
---|
295 | |
---|
296 | ----------------------------------------------------------------------------- |
---|
297 | -- piwigo_stuffs |
---|
298 | ----------------------------------------------------------------------------- |
---|
299 | |
---|
300 | DROP TABLE IF EXISTS piwigo_stuffs; |
---|
301 | CREATE TABLE piwigo_stuffs |
---|
302 | ( |
---|
303 | "id" INTEGER NOT NULL, |
---|
304 | "pos" INTEGER NOT NULL, |
---|
305 | "name" TEXT NOT NULL, |
---|
306 | "descr" VARCHAR(255), |
---|
307 | "type" VARCHAR(255) NOT NULL, |
---|
308 | "datas" TEXT, |
---|
309 | "users" VARCHAR(255), |
---|
310 | "groups" VARCHAR(255), |
---|
311 | "show_title" CHAR NOT NULL, |
---|
312 | "on_home" CHAR NOT NULL, |
---|
313 | "on_cats" CHAR NOT NULL, |
---|
314 | "on_picture" CHAR NOT NULL, |
---|
315 | "id_line" VARCHAR(1), |
---|
316 | "width" INTEGER, |
---|
317 | PRIMARY KEY ("id") |
---|
318 | ); |
---|
319 | |
---|
320 | |
---|
321 | CREATE INDEX "on_home" ON "piwigo_stuffs" ("on_home"); |
---|
322 | |
---|
323 | CREATE INDEX "on_cats" ON "piwigo_stuffs" ("on_cats"); |
---|
324 | |
---|
325 | CREATE INDEX "on_picture" ON "piwigo_stuffs" ("on_picture"); |
---|
326 | |
---|
327 | ----------------------------------------------------------------------------- |
---|
328 | -- piwigo_tags |
---|
329 | ----------------------------------------------------------------------------- |
---|
330 | |
---|
331 | DROP TABLE IF EXISTS piwigo_tags; |
---|
332 | CREATE TABLE piwigo_tags |
---|
333 | ( |
---|
334 | "id" INTEGER NOT NULL, |
---|
335 | "name" VARCHAR(255) default '' NOT NULL, |
---|
336 | "url_name" VARCHAR(255) default '' NOT NULL, |
---|
337 | PRIMARY KEY ("id") |
---|
338 | ); |
---|
339 | |
---|
340 | |
---|
341 | CREATE INDEX "tags_i1" ON "piwigo_tags" ("url_name"); |
---|
342 | |
---|
343 | ----------------------------------------------------------------------------- |
---|
344 | -- piwigo_upgrade |
---|
345 | ----------------------------------------------------------------------------- |
---|
346 | |
---|
347 | DROP TABLE IF EXISTS piwigo_upgrade; |
---|
348 | CREATE TABLE piwigo_upgrade |
---|
349 | ( |
---|
350 | "id" VARCHAR(20) default '' NOT NULL, |
---|
351 | "applied" TIMESTAMP NOT NULL, |
---|
352 | "description" VARCHAR(255), |
---|
353 | PRIMARY KEY ("id") |
---|
354 | ); |
---|
355 | |
---|
356 | |
---|
357 | ----------------------------------------------------------------------------- |
---|
358 | -- piwigo_user_access |
---|
359 | ----------------------------------------------------------------------------- |
---|
360 | |
---|
361 | DROP TABLE IF EXISTS piwigo_user_access; |
---|
362 | CREATE TABLE piwigo_user_access |
---|
363 | ( |
---|
364 | "user_id" INTEGER default 0 NOT NULL, |
---|
365 | "cat_id" INTEGER default 0 NOT NULL, |
---|
366 | PRIMARY KEY ("user_id","cat_id") |
---|
367 | ); |
---|
368 | |
---|
369 | |
---|
370 | ----------------------------------------------------------------------------- |
---|
371 | -- piwigo_user_cache |
---|
372 | ----------------------------------------------------------------------------- |
---|
373 | |
---|
374 | DROP TABLE IF EXISTS piwigo_user_cache; |
---|
375 | CREATE TABLE piwigo_user_cache |
---|
376 | ( |
---|
377 | "user_id" INTEGER default 0 NOT NULL, |
---|
378 | "need_update" BOOLEAN default true, |
---|
379 | "cache_update_time" INTEGER default 0 NOT NULL, |
---|
380 | "forbidden_categories" TEXT, |
---|
381 | "nb_total_images" INTEGER, |
---|
382 | "image_access_type" VARCHAR(50) default 'NOT IN', |
---|
383 | "image_access_list" TEXT, |
---|
384 | PRIMARY KEY ("user_id") |
---|
385 | ); |
---|
386 | |
---|
387 | |
---|
388 | ----------------------------------------------------------------------------- |
---|
389 | -- piwigo_user_cache_categories |
---|
390 | ----------------------------------------------------------------------------- |
---|
391 | |
---|
392 | DROP TABLE IF EXISTS piwigo_user_cache_categories; |
---|
393 | CREATE TABLE piwigo_user_cache_categories |
---|
394 | ( |
---|
395 | "user_id" INTEGER default 0 NOT NULL, |
---|
396 | "cat_id" INTEGER default 0 NOT NULL, |
---|
397 | "date_last" TIMESTAMP, |
---|
398 | "max_date_last" TIMESTAMP, |
---|
399 | "nb_images" INTEGER default 0 NOT NULL, |
---|
400 | "count_images" INTEGER default 0, |
---|
401 | "count_categories" INTEGER default 0, |
---|
402 | PRIMARY KEY ("user_id","cat_id") |
---|
403 | ); |
---|
404 | |
---|
405 | |
---|
406 | ----------------------------------------------------------------------------- |
---|
407 | -- piwigo_user_feed |
---|
408 | ----------------------------------------------------------------------------- |
---|
409 | |
---|
410 | DROP TABLE IF EXISTS piwigo_user_feed; |
---|
411 | CREATE TABLE piwigo_user_feed |
---|
412 | ( |
---|
413 | "id" VARCHAR(50) default '' NOT NULL, |
---|
414 | "user_id" INTEGER default 0 NOT NULL, |
---|
415 | "last_check" TIMESTAMP, |
---|
416 | PRIMARY KEY ("id") |
---|
417 | ); |
---|
418 | |
---|
419 | |
---|
420 | ----------------------------------------------------------------------------- |
---|
421 | -- piwigo_user_group |
---|
422 | ----------------------------------------------------------------------------- |
---|
423 | |
---|
424 | DROP TABLE IF EXISTS piwigo_user_group; |
---|
425 | CREATE TABLE piwigo_user_group |
---|
426 | ( |
---|
427 | "user_id" INTEGER default 0 NOT NULL, |
---|
428 | "group_id" INTEGER default 0 NOT NULL, |
---|
429 | PRIMARY KEY ("user_id","group_id") |
---|
430 | ); |
---|
431 | |
---|
432 | |
---|
433 | ----------------------------------------------------------------------------- |
---|
434 | -- piwigo_user_infos |
---|
435 | ----------------------------------------------------------------------------- |
---|
436 | |
---|
437 | DROP TABLE IF EXISTS piwigo_user_infos; |
---|
438 | CREATE TABLE piwigo_user_infos |
---|
439 | ( |
---|
440 | "user_id" INTEGER default 0 NOT NULL, |
---|
441 | "nb_image_line" INTEGER default 5 NOT NULL, |
---|
442 | "nb_line_page" INTEGER default 3 NOT NULL, |
---|
443 | "status" VARCHAR(50) default 'guest', |
---|
444 | "adviser" BOOLEAN default false, |
---|
445 | "language" VARCHAR(50) default 'en_UK' NOT NULL, |
---|
446 | "maxwidth" INTEGER, |
---|
447 | "maxheight" INTEGER, |
---|
448 | "expand" BOOLEAN default false, |
---|
449 | "show_nb_comments" BOOLEAN default false, |
---|
450 | "show_nb_hits" BOOLEAN default false, |
---|
451 | "recent_period" INTEGER default 7 NOT NULL, |
---|
452 | "template" VARCHAR(255) default 'yoga/Sylvia' NOT NULL, |
---|
453 | "registration_date" TIMESTAMP NOT NULL, |
---|
454 | "enabled_high" BOOLEAN default true, |
---|
455 | "level" INTEGER default 0 NOT NULL, |
---|
456 | PRIMARY KEY ("user_id"), |
---|
457 | CONSTRAINT "user_infos_ui1" UNIQUE ("user_id") |
---|
458 | ); |
---|
459 | |
---|
460 | |
---|
461 | ----------------------------------------------------------------------------- |
---|
462 | -- piwigo_user_mail_notification |
---|
463 | ----------------------------------------------------------------------------- |
---|
464 | |
---|
465 | DROP TABLE IF EXISTS piwigo_user_mail_notification; |
---|
466 | CREATE TABLE piwigo_user_mail_notification |
---|
467 | ( |
---|
468 | "user_id" INTEGER default 0 NOT NULL, |
---|
469 | "check_key" VARCHAR(16) default '' NOT NULL, |
---|
470 | "enabled" BOOLEAN default false, |
---|
471 | "last_send" TIMESTAMP, |
---|
472 | PRIMARY KEY ("user_id"), |
---|
473 | CONSTRAINT "user_mail_notification_ui1" UNIQUE ("check_key") |
---|
474 | ); |
---|
475 | |
---|
476 | |
---|
477 | ----------------------------------------------------------------------------- |
---|
478 | -- piwigo_users |
---|
479 | ----------------------------------------------------------------------------- |
---|
480 | |
---|
481 | DROP TABLE IF EXISTS piwigo_users; |
---|
482 | CREATE TABLE piwigo_users |
---|
483 | ( |
---|
484 | "id" INTEGER NOT NULL, |
---|
485 | "username" VARCHAR(100) default '' NOT NULL, |
---|
486 | "password" VARCHAR(32), |
---|
487 | "mail_address" VARCHAR(255), |
---|
488 | PRIMARY KEY ("id"), |
---|
489 | CONSTRAINT "users_ui1" UNIQUE ("username") |
---|
490 | ); |
---|
491 | |
---|
492 | |
---|
493 | ----------------------------------------------------------------------------- |
---|
494 | -- piwigo_comments |
---|
495 | ----------------------------------------------------------------------------- |
---|
496 | |
---|
497 | DROP TABLE IF EXISTS piwigo_comments; |
---|
498 | CREATE TABLE piwigo_comments |
---|
499 | ( |
---|
500 | "id" INTEGER NOT NULL, |
---|
501 | "image_id" INTEGER default 0 NOT NULL, |
---|
502 | "date" TIMESTAMP NOT NULL, |
---|
503 | "author" VARCHAR(255), |
---|
504 | "content" TEXT, |
---|
505 | "validated" BOOLEAN default false, |
---|
506 | "validation_date" TIMESTAMP, |
---|
507 | "author_id" INTEGER REFERENCES "piwigo_users" (id), |
---|
508 | PRIMARY KEY ("id") |
---|
509 | ); |
---|
510 | |
---|
511 | CREATE INDEX "comments_i2" ON "piwigo_comments" ("validation_date"); |
---|
512 | CREATE INDEX "comments_i1" ON "piwigo_comments" ("image_id"); |
---|
513 | |
---|
514 | ----------------------------------------------------------------------------- |
---|
515 | -- piwigo_waiting |
---|
516 | ----------------------------------------------------------------------------- |
---|
517 | |
---|
518 | DROP TABLE IF EXISTS piwigo_waiting; |
---|
519 | CREATE TABLE piwigo_waiting |
---|
520 | ( |
---|
521 | "id" INTEGER NOT NULL, |
---|
522 | "storage_category_id" INTEGER default 0 NOT NULL, |
---|
523 | "file" VARCHAR(255) default '' NOT NULL, |
---|
524 | "username" VARCHAR(255) default '' NOT NULL, |
---|
525 | "mail_address" VARCHAR(255) default '' NOT NULL, |
---|
526 | "date" INTEGER default 0 NOT NULL, |
---|
527 | "tn_ext" CHAR(3), |
---|
528 | "validated" BOOLEAN default false, |
---|
529 | "infos" TEXT, |
---|
530 | PRIMARY KEY ("id") |
---|
531 | ); |
---|
532 | |
---|