This repository has been archived by the owner on Jan 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema-templeet.sql
792 lines (697 loc) · 24.2 KB
/
schema-templeet.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
-- MySQL dump 10.11
--
-- Host: localhost Database: linuxfr
-- ------------------------------------------------------
-- Server version 5.0.32-Debian_7etch8-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `avis`
--
DROP TABLE IF EXISTS `avis`;
CREATE TABLE `avis` (
`avis` int(1) NOT NULL default '0',
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`ip` varchar(9) NOT NULL default '',
`user_id` int(6) NOT NULL default '1',
`res_type` int(2) NOT NULL default '1',
`obj_id` int(6) NOT NULL default '0',
KEY `obj_id` (`obj_id`,`res_type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `board`
--
DROP TABLE IF EXISTS `board`;
CREATE TABLE `board` (
`id` int(6) NOT NULL auto_increment,
`message` blob NOT NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`ip` varchar(9) NOT NULL default '',
`info` varchar(60) NOT NULL default '0',
`section` int(2) NOT NULL default '1',
`user_id` int(6) NOT NULL default '1',
KEY `id` (`id`,`timestamp`)
) ENGINE=MyISAM AUTO_INCREMENT=1785136 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `board_denied`
--
DROP TABLE IF EXISTS `board_denied`;
CREATE TABLE `board_denied` (
`user_id` int(6) NOT NULL default '1',
KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Table structure for table `comments`
--
DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments` (
`id` int(11) NOT NULL auto_increment,
`subject` varchar(150) default NULL,
`body` blob NOT NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`news_id` int(6) NOT NULL default '0',
`user_id` int(6) NOT NULL default '1',
`com_parent` int(11) NOT NULL default '0',
`ip` varchar(9) NOT NULL default '0',
`score` int(3) NOT NULL default '-1',
`sig_id` int(6) NOT NULL default '1',
`score_nb` int(3) NOT NULL default '0',
`res_type` int(5) NOT NULL default '1',
`thread_id` int(11) NOT NULL default '0',
`deleted` int(1) default '0',
PRIMARY KEY (`id`),
KEY `id` (`id`),
KEY `news_id` (`news_id`),
KEY `user_id` (`user_id`),
KEY `com_parent` (`com_parent`),
KEY `res_type` (`res_type`),
KEY `timestamp` (`timestamp`),
KEY `score` (`score`),
KEY `score_nb` (`score_nb`),
KEY `res_type_2` (`res_type`),
KEY `thread_id` (`thread_id`),
KEY `user_id_2` (`user_id`,`res_type`),
KEY `user_id_3` (`user_id`,`timestamp`),
KEY `user_id_4` (`user_id`,`res_type`,`id`)
) ENGINE=MyISAM AUTO_INCREMENT=859369 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `comments_scored_user`
--
DROP TABLE IF EXISTS `comments_scored_user`;
CREATE TABLE `comments_scored_user` (
`comments_id` int(11) NOT NULL default '0',
`user_id` int(6) NOT NULL default '0',
`news_id` int(6) NOT NULL default '1',
`res_type` int(5) NOT NULL default '1',
`score` int(1) default NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`comments_id`,`user_id`),
KEY `id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `commentsnew`
--
DROP TABLE IF EXISTS `commentsnew`;
CREATE TABLE `commentsnew` (
`id` int(11) NOT NULL auto_increment,
`subject` varchar(80) NOT NULL default '',
`body` blob NOT NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`news_id` int(6) NOT NULL default '0',
`user_id` int(6) NOT NULL default '1',
`com_parent` int(11) NOT NULL default '0',
`ip` varchar(9) NOT NULL default '0',
`score` int(3) NOT NULL default '-1',
`sig_id` int(6) NOT NULL default '1',
`score_nb` int(3) NOT NULL default '0',
`res_type` int(5) NOT NULL default '1',
`thread_id` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `id` (`id`),
KEY `news_id` (`news_id`),
KEY `user_id` (`user_id`),
KEY `com_parent` (`com_parent`),
KEY `res_type` (`res_type`),
KEY `timestamp` (`timestamp`),
KEY `thread_id` (`thread_id`),
KEY `user__id` (`user_id`,`id`)
) ENGINE=MyISAM AUTO_INCREMENT=463873 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `contents_scored`
--
DROP TABLE IF EXISTS `contents_scored`;
CREATE TABLE `contents_scored` (
`res_id` int(6) NOT NULL default '1',
`res_type` int(5) NOT NULL default '1',
`user_id` int(6) NOT NULL default '1',
`score` int(1) default NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`res_id`,`res_type`,`user_id`),
KEY `id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `forums_data`
--
DROP TABLE IF EXISTS `forums_data`;
CREATE TABLE `forums_data` (
`id` int(10) NOT NULL auto_increment,
`group_id` int(4) NOT NULL default '0',
`subject` varchar(255) NOT NULL default '',
`body` blob,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`user_id` int(6) NOT NULL default '0',
`ip` varchar(9) NOT NULL default '',
`lastpost` timestamp NOT NULL default '0000-00-00 00:00:00',
`nbcomment` int(4) NOT NULL default '0',
`sumscore` int(5) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `group_id` (`group_id`),
KEY `lastpost` (`lastpost`)
) ENGINE=MyISAM AUTO_INCREMENT=22875 DEFAULT CHARSET=utf8;
--
-- Table structure for table `forums_group`
--
DROP TABLE IF EXISTS `forums_group`;
CREATE TABLE `forums_group` (
`id` int(4) NOT NULL auto_increment,
`name` varchar(40) default NULL,
`description` varchar(255) default NULL,
`is_post` int(1) NOT NULL default '0',
`parent_id` int(4) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `group_id` (`parent_id`)
) ENGINE=MyISAM AUTO_INCREMENT=46 DEFAULT CHARSET=utf8;
--
-- Table structure for table `interest`
--
DROP TABLE IF EXISTS `interest`;
CREATE TABLE `interest` (
`res_type` int(5) NOT NULL default '1',
`res_id` int(6) NOT NULL default '0',
`interest` int(8) NOT NULL default '0',
`score` int(8) NOT NULL default '0',
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`res_id`,`res_type`),
KEY `interest` (`interest`),
KEY `score` (`score`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Table structure for table `interviews`
--
DROP TABLE IF EXISTS `interviews`;
CREATE TABLE `interviews` (
`id` int(6) NOT NULL auto_increment,
`target` text NOT NULL,
`description` text NOT NULL,
`state` int(1) NOT NULL default '0',
`user_id` int(6) NOT NULL default '1',
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
`history` text,
`assignee` int(6) NOT NULL default '0',
`news_id` int(6) NOT NULL default '0',
`nbcomment` int(4) NOT NULL default '0',
`lastpost` timestamp NOT NULL default '0000-00-00 00:00:00',
`sumscore` int(5) NOT NULL default '0',
KEY `id` (`id`,`timestamp`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `lang`
--
DROP TABLE IF EXISTS `lang`;
CREATE TABLE `lang` (
`id` int(2) NOT NULL auto_increment,
`lang` char(2) default NULL,
`description` varchar(30) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `locks`
--
DROP TABLE IF EXISTS `locks`;
CREATE TABLE `locks` (
`user_id` int(6) NOT NULL default '1',
`res_type` int(2) NOT NULL default '1',
`obj_id` int(6) NOT NULL default '0',
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
KEY `obj_id` (`obj_id`,`res_type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `messages`
--
DROP TABLE IF EXISTS `messages`;
CREATE TABLE `messages` (
`id` int(7) NOT NULL auto_increment,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`user_id_source` int(6) NOT NULL default '0',
`user_id_dest` int(6) NOT NULL default '0',
`read_ok` enum('0','1') NOT NULL default '0',
`subject` varchar(150) NOT NULL default '0',
`body` blob NOT NULL,
`user_id_real_source` int(6) NOT NULL default '0',
`user_id_real_dest` int(6) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `searchid` (`user_id_dest`,`user_id_source`)
) ENGINE=MyISAM AUTO_INCREMENT=14727 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `moderator_last`
--
DROP TABLE IF EXISTS `moderator_last`;
CREATE TABLE `moderator_last` (
`user_id` int(6) NOT NULL default '0',
`action` varchar(255) default NULL,
`lastseen` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`user_id`),
UNIQUE KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Table structure for table `news`
--
DROP TABLE IF EXISTS `news`;
CREATE TABLE `news` (
`id` int(6) NOT NULL auto_increment,
`topic_id` int(3) NOT NULL default '1',
`section_id` int(3) NOT NULL default '1',
`author_id` int(6) NOT NULL default '0',
`lang_id` int(2) NOT NULL default '0',
`state` int(1) NOT NULL default '0',
`main_page` int(1) NOT NULL default '0',
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`title` varchar(150) NOT NULL default '',
`departement` tinytext,
`ip` varchar(9) NOT NULL default '',
`user_id` int(6) NOT NULL default '1',
`phare` int(1) NOT NULL default '0',
`body` blob,
`content_type` varchar(16) NOT NULL default 'text/plain',
`nbcomment` int(4) NOT NULL default '0',
`lastpost` timestamp NOT NULL default '0000-00-00 00:00:00',
`sumscore` int(5) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `phare` (`phare`),
KEY `state` (`state`),
KEY `section` (`section_id`),
KEY `user_id` (`user_id`),
KEY `timestamp` (`timestamp`),
KEY `timestampbis` (`timestamp`,`state`),
KEY `topics` (`topic_id`),
KEY `main_page` (`main_page`),
KEY `pourvoir` (`section_id`,`state`,`timestamp`)
) ENGINE=MyISAM AUTO_INCREMENT=23038 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `news_attachements`
--
DROP TABLE IF EXISTS `news_attachements`;
CREATE TABLE `news_attachements` (
`id` int(6) NOT NULL auto_increment,
`news_id` int(6) NOT NULL default '0',
`content_type` varchar(128) default NULL,
`size` int(8) default NULL,
`name` varchar(128) NOT NULL default '',
`attachement` mediumblob NOT NULL,
PRIMARY KEY (`id`),
KEY `news_id` (`news_id`)
) ENGINE=MyISAM AUTO_INCREMENT=7334 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `news_author`
--
DROP TABLE IF EXISTS `news_author`;
CREATE TABLE `news_author` (
`id` int(6) NOT NULL auto_increment,
`name` varchar(50) default NULL,
`contact` varchar(100) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12041 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `news_history`
--
DROP TABLE IF EXISTS `news_history`;
CREATE TABLE `news_history` (
`news_id` int(6) NOT NULL default '0',
`title` varchar(150) NOT NULL default '',
`body` blob,
`article` blob,
`body_diff` mediumblob,
`article_diff` mediumblob,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`user_id` int(6) NOT NULL default '1',
`revision` int(2) NOT NULL default '0',
`log` mediumblob NOT NULL,
`other_diff` mediumblob,
KEY `news_id` (`news_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `news_moderated`
--
DROP TABLE IF EXISTS `news_moderated`;
CREATE TABLE `news_moderated` (
`news_id` int(6) NOT NULL default '0',
`user_id` int(6) NOT NULL default '0',
`state` int(1) NOT NULL default '0',
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
KEY `id` (`news_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `news_urls`
--
DROP TABLE IF EXISTS `news_urls`;
CREATE TABLE `news_urls` (
`id` int(6) NOT NULL auto_increment,
`news_id` int(6) NOT NULL default '0',
`lang_id` int(2) NOT NULL default '1',
`name` tinytext,
`hits` int(6) default '0',
`url` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `news_id` (`news_id`)
) ENGINE=MyISAM AUTO_INCREMENT=53318 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `poll_answers`
--
DROP TABLE IF EXISTS `poll_answers`;
CREATE TABLE `poll_answers` (
`question_id` int(4) NOT NULL default '0',
`answer` varchar(255) default NULL,
`answer_nb` int(1) NOT NULL default '1',
`number` int(1) NOT NULL default '1',
KEY `id` (`question_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Table structure for table `poll_ip`
--
DROP TABLE IF EXISTS `poll_ip`;
CREATE TABLE `poll_ip` (
`ip` varchar(9) NOT NULL default '',
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
KEY `ip` (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Table structure for table `poll_questions`
--
DROP TABLE IF EXISTS `poll_questions`;
CREATE TABLE `poll_questions` (
`id` int(4) NOT NULL auto_increment,
`question` varchar(255) default NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`state` int(1) NOT NULL default '0',
`user_id` int(6) NOT NULL default '1',
`lastpost` timestamp NOT NULL default '0000-00-00 00:00:00',
`nbcomment` int(4) NOT NULL default '0',
`sumscore` int(5) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=160 DEFAULT CHARSET=utf8;
--
-- Table structure for table `prizes`
--
DROP TABLE IF EXISTS `prizes`;
CREATE TABLE `prizes` (
`user_id` int(6) NOT NULL default '1',
`person` varchar(60) NOT NULL default '',
`prize` int(2) NOT NULL default '1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Table structure for table `sections`
--
DROP TABLE IF EXISTS `sections`;
CREATE TABLE `sections` (
`id` int(3) NOT NULL auto_increment,
`section` varchar(50) default NULL,
`state` int(1) NOT NULL default '1',
`description` blob NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `sessions`
--
DROP TABLE IF EXISTS `sessions`;
CREATE TABLE `sessions` (
`id` varchar(32) NOT NULL default '',
`user_id` int(6) NOT NULL default '0',
`ip` varchar(15) NOT NULL default '',
`lastseen` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`expire` timestamp NOT NULL default '0000-00-00 00:00:00',
`public` enum('0','1') NOT NULL default '1',
`user_agent` varchar(60) NOT NULL default '',
`css` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `id2` (`id`),
KEY `user_id2` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `sig`
--
DROP TABLE IF EXISTS `sig`;
CREATE TABLE `sig` (
`id` int(6) NOT NULL auto_increment,
`sig` varchar(250) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `tag`
--
DROP TABLE IF EXISTS `tag`;
CREATE TABLE `tag` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;
--
-- Table structure for table `tagmap`
--
DROP TABLE IF EXISTS `tagmap`;
CREATE TABLE `tagmap` (
`id` int(11) NOT NULL auto_increment,
`res_type` int(5) NOT NULL default '1',
`res_id` int(6) NOT NULL default '0',
`tag_id` int(11) NOT NULL default '0',
`score` int(3) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `res_type` (`res_type`),
KEY `res_id` (`res_id`),
KEY `tag` (`tag_id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
--
-- Table structure for table `tagvote`
--
DROP TABLE IF EXISTS `tagvote`;
CREATE TABLE `tagvote` (
`tagmap_id` int(6) NOT NULL default '0',
`user_id` int(6) NOT NULL default '0',
`score` int(1) NOT NULL default '1',
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`tagmap_id`,`user_id`),
KEY `id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `topics`
--
DROP TABLE IF EXISTS `topics`;
CREATE TABLE `topics` (
`id` int(3) NOT NULL auto_increment,
`topic` varchar(50) default NULL,
`longname` varchar(50) default NULL,
`state` int(1) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=71 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `tracker`
--
DROP TABLE IF EXISTS `tracker`;
CREATE TABLE `tracker` (
`id` int(6) NOT NULL auto_increment,
`title` varchar(150) NOT NULL default '',
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
`assignee` int(6) NOT NULL default '0',
`user_id` int(6) NOT NULL default '1',
`body` blob,
`state` int(1) NOT NULL default '0',
`category` int(1) NOT NULL default '0',
`closing` timestamp NOT NULL default '0000-00-00 00:00:00',
`nbcomment` int(4) NOT NULL default '0',
`lastpost` timestamp NOT NULL default '0000-00-00 00:00:00',
`sumscore` int(5) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=675 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `tracker_category`
--
DROP TABLE IF EXISTS `tracker_category`;
CREATE TABLE `tracker_category` (
`id` int(2) NOT NULL default '0',
`name` varchar(40) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Table structure for table `tribune`
--
DROP TABLE IF EXISTS `tribune`;
CREATE TABLE `tribune` (
`id` int(6) NOT NULL auto_increment,
`message` blob NOT NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`ip` varchar(9) NOT NULL default '',
`info` varchar(60) NOT NULL default '0',
`res_type` int(2) NOT NULL default '1',
`obj_id` int(6) NOT NULL default '0',
`user_id` int(6) NOT NULL default '1',
KEY `id` (`id`,`timestamp`),
KEY `obj_id` (`obj_id`,`res_type`)
) ENGINE=MyISAM AUTO_INCREMENT=23430 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `urls_avgtime`
--
DROP TABLE IF EXISTS `urls_avgtime`;
CREATE TABLE `urls_avgtime` (
`url` varchar(255) NOT NULL default '',
`avgtime` float NOT NULL default '0',
`number` int(10) NOT NULL default '0',
`avgsqltime` float NOT NULL default '0',
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
KEY `url` (`url`),
KEY `avgtime` (`avgtime`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(6) NOT NULL auto_increment,
`lname` varchar(40) default NULL,
`fname` varchar(40) default NULL,
`login` varchar(20) NOT NULL default '',
`passwd` varchar(20) NOT NULL default '',
`email` varchar(128) NOT NULL default '',
`homesite` varchar(255) default NULL,
`level` int(20) unsigned default '0',
`param` int(10) unsigned default '0',
`created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`theme` int(2) default '0',
`status` int(1) unsigned default '0',
`score` int(1) default '1',
`lastseen` timestamp NOT NULL default '0000-00-00 00:00:00',
`ip` varchar(15) default NULL,
`sig` varchar(250) NOT NULL default '',
`jabber_id` varchar(128) default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `login` (`login`),
KEY `id2` (`id`),
KEY `login2` (`login`),
KEY `lastseen2` (`lastseen`),
KEY `email` (`email`),
KEY `status` (`status`),
KEY `ip` (`ip`)
) ENGINE=MyISAM AUTO_INCREMENT=46611 DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `users_boxes`
--
DROP TABLE IF EXISTS `users_boxes`;
CREATE TABLE `users_boxes` (
`user_id` int(6) NOT NULL default '0',
`user_boxes` blob,
UNIQUE KEY `user_id` (`user_id`),
KEY `id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `users_journal`
--
DROP TABLE IF EXISTS `users_journal`;
CREATE TABLE `users_journal` (
`id` int(8) NOT NULL auto_increment,
`user_id` int(6) NOT NULL default '0',
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`ip` varchar(9) NOT NULL default '',
`subject` varchar(255) NOT NULL default '',
`body` blob,
`main_page` int(1) NOT NULL default '0',
`nbcomment` int(4) NOT NULL default '0',
`lastpost` timestamp NOT NULL default '0000-00-00 00:00:00',
`sumscore` int(5) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `user_id` (`user_id`),
KEY `main_page` (`main_page`),
KEY `timestamp` (`timestamp`),
KEY `timemain` (`timestamp`,`main_page`),
KEY `main_id` (`main_page`,`id`),
KEY `main_id_user` (`main_page`,`id`,`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=25144 DEFAULT CHARSET=utf8;
--
-- Table structure for table `users_journal_recent`
--
DROP TABLE IF EXISTS `users_journal_recent`;
CREATE TABLE `users_journal_recent` (
`id` int(6) NOT NULL default '0',
`subject` varchar(255) NOT NULL default '',
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`main_page` int(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Table structure for table `users_karma`
--
DROP TABLE IF EXISTS `users_karma`;
CREATE TABLE `users_karma` (
`vote_nb` int(3) NOT NULL default '0',
`vote_nb_orig` int(3) NOT NULL default '0',
`experience` int(5) NOT NULL default '0',
`user_id` int(6) NOT NULL default '0',
`denied` int(1) NOT NULL default '0',
`avgscore` float NOT NULL default '1',
`nbcomment` int(4) NOT NULL default '0',
`sumscore` int(5) NOT NULL default '0',
KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `users_karma_archive`
--
DROP TABLE IF EXISTS `users_karma_archive`;
CREATE TABLE `users_karma_archive` (
`experience` int(5) NOT NULL default '0',
`user_id` int(6) NOT NULL default '0',
`date` date NOT NULL default '0000-00-00',
KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `users_lastseen`
--
DROP TABLE IF EXISTS `users_lastseen`;
CREATE TABLE `users_lastseen` (
`user_id` int(6) NOT NULL default '0',
`obj_id` int(6) NOT NULL default '0',
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`res_type` int(5) NOT NULL default '1',
KEY `key_id` (`user_id`,`obj_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=1;
--
-- Table structure for table `users_personnalboxes`
--
DROP TABLE IF EXISTS `users_personnalboxes`;
CREATE TABLE `users_personnalboxes` (
`user_id` int(6) NOT NULL default '0',
`box` blob,
PRIMARY KEY (`user_id`),
UNIQUE KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Table structure for table `users_rdf`
--
DROP TABLE IF EXISTS `users_rdf`;
CREATE TABLE `users_rdf` (
`id` int(4) NOT NULL auto_increment,
`rdf` varchar(255) NOT NULL default '',
`public` int(1) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
--
-- Table structure for table `users_tempo`
--
DROP TABLE IF EXISTS `users_tempo`;
CREATE TABLE `users_tempo` (
`user_id` int(6) NOT NULL default '0',
`email` varchar(128) NOT NULL default '',
`tempo_id` varchar(128) NOT NULL default '',
`created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`session_id` varchar(32) NOT NULL default '',
KEY `id` (`session_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=1;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2008-11-11 18:22:59