Kyberia v1.0
[mirrors/Kyberia-bloodline.git] / db_struct.sql
CommitLineData
bc13d5d6
H
1# MySQL dump 7.1
2#
3# Host: localhost Database: kyberia
4#--------------------------------------------------------
5# Server version 3.23.47
6
7#
8# Table structure for table 'admin'
9#
10CREATE TABLE admin (
11 action_id int(11) NOT NULL auto_increment,
12 action_name varchar(23) DEFAULT '' NOT NULL,
13 action_parameter int(11) DEFAULT '0' NOT NULL,
14 action_timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
15 action_status enum('opened','resolved','stopped','veto','referendum') DEFAULT 'opened',
16 action_result varchar(23),
17 action_data_1 text,
18 admin_id int(11) DEFAULT '0' NOT NULL,
19 action_data_2 text,
20 PRIMARY KEY (action_id)
21);
22
23#
24# Table structure for table 'admin_logs'
25#
26CREATE TABLE admin_logs (
27 action_id int(11) NOT NULL auto_increment,
28 action_name varchar(23) DEFAULT '' NOT NULL,
29 action_parameter int(11) DEFAULT '0' NOT NULL,
30 action_timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
31 action_status enum('opened','resolved','stopped','veto','referendum') DEFAULT 'opened',
32 action_result varchar(23),
33 action_data_1 text,
34 admin_id int(11) DEFAULT '0' NOT NULL,
35 action_data_2 text,
36 PRIMARY KEY (action_id)
37);
38
39#
40# Table structure for table 'albums'
41#
42CREATE TABLE albums (
43 id_album int(11) NOT NULL auto_increment,
44 title varchar(255),
45 name varchar(255),
46 description text,
47 hits int(11),
48 fotos int(11),
49 datum timestamp(14),
50 PRIMARY KEY (id_album)
51);
52
53#
54# Table structure for table 'articles'
55#
56CREATE TABLE articles (
57 id_article int(11) NOT NULL auto_increment,
58 id_rubrika int(11) DEFAULT '0' NOT NULL,
59 datum datetime,
60 nazov varchar(120),
61 short_desc text,
62 autor varchar(255),
63 id_rubrika_secondary int(11),
64 title_image varchar(100),
65 on_main enum('yes','no') DEFAULT 'no',
66 hits int(11),
67 text1 text,
68 text2 text,
69 text3 text,
70 image1 varchar(40),
71 image2 varchar(40),
72 image3 varchar(40),
73 id_diskuse int(11),
74 prispevky int(11),
75 gallery varchar(200),
76 photos text,
77 keywords text,
78 PRIMARY KEY (id_article)
79);
80
81#
82# Table structure for table 'category'
83#
84CREATE TABLE category (
85 category_id int(11) NOT NULL auto_increment,
86 category_name char(255),
87 category_owner int(11) DEFAULT '1',
88 category_forums int(11) DEFAULT '0',
89 category_parent int(11),
90 category_subcats int(11) DEFAULT '0',
91 category_tree char(23) DEFAULT '' NOT NULL,
92 PRIMARY KEY (category_id)
93);
94
95#
96# Table structure for table 'dennik'
97#
98CREATE TABLE dennik (
99 id int(4) NOT NULL auto_increment,
100 autor int(3),
101 nadpis varchar(100),
102 datum datetime,
103 zapis text,
104 id_diskuse int(11) DEFAULT '0',
105 hits int(11) DEFAULT '0',
106 prispevky int(11) DEFAULT '0',
107 dennik_type enum('journaux','report','story','dream','poetry','portugal') DEFAULT 'journaux',
108 type enum('private','public','kyberia') DEFAULT 'public',
109 PRIMARY KEY (id),
110 KEY id (id),
111 KEY id_diskuse (id_diskuse)
112);
113
114#
115# Table structure for table 'diskuse'
116#
117CREATE TABLE diskuse (
118 id_diskuse int(11) NOT NULL auto_increment,
119 kat varchar(64) DEFAULT '' NOT NULL,
120 pocet_prispevku int(11) DEFAULT '0' NOT NULL,
121 zalozeno datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
122 titulek varchar(255),
123 PRIMARY KEY (id_diskuse),
124 KEY idx_pocet_prispevku (pocet_prispevku)
125);
126
127#
128# Table structure for table 'forum'
129#
130CREATE TABLE forum (
131 forum_id int(11) NOT NULL auto_increment,
132 forum_name varchar(255),
133 forum_type enum('flat','threaded') DEFAULT 'flat',
134 forum_owner int(11) DEFAULT '38',
135 forum_submissions int(11) DEFAULT '0',
136 forum_public enum('private','public') DEFAULT 'public',
137 forum_co enum('yes','no') DEFAULT 'no',
138 forum_category int(11),
139 forum_guild int(11),
140 PRIMARY KEY (forum_id)
141);
142
143#
144# Table structure for table 'forum_info'
145#
146CREATE TABLE forum_info (
147 forum_id int(11) DEFAULT '0' NOT NULL,
148 forum_info text,
149 PRIMARY KEY (forum_id)
150);
151
152#
153# Table structure for table 'friends'
154#
155CREATE TABLE friends (
156 user_id int(11) DEFAULT '0' NOT NULL,
157 friend_id int(11) DEFAULT '0' NOT NULL,
158 friend_text text
159);
160
161#
162# Table structure for table 'guild'
163#
164CREATE TABLE guild (
165 guild_id int(11) NOT NULL auto_increment,
166 guild_name char(200) DEFAULT '' NOT NULL,
167 PRIMARY KEY (guild_id)
168);
169
170#
171# Table structure for table 'intros'
172#
173CREATE TABLE intros (
174 id_intro int(11) NOT NULL auto_increment,
175 id_forum int(11),
176 id_user text,
177 text text,
178 PRIMARY KEY (id_intro)
179);
180
181#
182# Table structure for table 'k_logs'
183#
184CREATE TABLE k_logs (
185 donor_id int(11) DEFAULT '0' NOT NULL,
186 acceptor_id int(11) DEFAULT '0' NOT NULL,
187 k_amount int(11),
188 node_id int(11),
189 node_type enum('dennik','submission'),
190 timestamp timestamp(14)
191);
192
193#
194# Table structure for table 'kbs_category'
195#
196CREATE TABLE kbs_category (
197 category_id int(11) NOT NULL auto_increment,
198 category_name char(255),
199 category_parent int(11),
200 category_tree char(23),
201 PRIMARY KEY (category_id)
202);
203
204#
205# Table structure for table 'kbs_items_get'
206#
207CREATE TABLE kbs_items_get (
208 item_id int(11) NOT NULL auto_increment,
209 user_id int(11),
210 name varchar(123),
211 description text,
212 type set('get','buy','exchange'),
213 price int(11),
214 location varchar(123),
215 PRIMARY KEY (item_id)
216);
217
218#
219# Table structure for table 'kbs_items_give'
220#
221CREATE TABLE kbs_items_give (
222 item_id int(11) NOT NULL auto_increment,
223 user_id int(11),
224 name varchar(123),
225 description text,
226 type set('give','sell','exchange','auction'),
227 price int(11),
228 auction_id int(11),
229 category_id int(11),
230 location varchar(123),
231 PRIMARY KEY (item_id)
232);
233
234#
235# Table structure for table 'last_submissions'
236#
237CREATE TABLE last_submissions (
238 forum_id int(11),
239 submission_owner int(11) DEFAULT '0' NOT NULL,
240 submission_text text DEFAULT '' NOT NULL,
241 submission_timestamp timestamp(14),
242 submission_thread varchar(60) DEFAULT '' NOT NULL,
243 submission_id int(11) DEFAULT '0' NOT NULL,
244 PRIMARY KEY (submission_id),
245 UNIQUE submission_index (submission_id,forum_id,submission_owner),
246 KEY submission_owner (submission_owner)
247);
248
249#
250# Table structure for table 'links'
251#
252CREATE TABLE links (
253 link_id int(11) NOT NULL auto_increment,
254 link_text char(255),
255 link_submission int(11) DEFAULT '0' NOT NULL,
256 link_owner int(11) DEFAULT '0' NOT NULL,
257 link_forum int(11) DEFAULT '0' NOT NULL,
258 PRIMARY KEY (link_id)
259);
260
261#
262# Table structure for table 'mail'
263#
264CREATE TABLE mail (
265 mail_id int(11) NOT NULL auto_increment,
266 mail_from int(11) DEFAULT '0' NOT NULL,
267 mail_to int(11) DEFAULT '0' NOT NULL,
268 mail_text text,
269 mail_timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
270 mail_no int(11) DEFAULT '0',
271 mail_to_name varchar(20),
272 PRIMARY KEY (mail_id),
273 UNIQUE mail_order (mail_id,mail_no,mail_to,mail_from),
274 KEY mail_from (mail_from),
275 KEY mail_to (mail_to),
276 KEY mail (mail_from,mail_to)
277);
278
279#
280# Table structure for table 'mail2'
281#
282CREATE TABLE mail2 (
283 mail_id int(11) NOT NULL auto_increment,
284 mail_user int(11) DEFAULT '0' NOT NULL,
285 mail_from int(11) DEFAULT '0' NOT NULL,
286 mail_to int(11) DEFAULT '0' NOT NULL,
287 mail_text text,
288 mail_timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
289 PRIMARY KEY (mail_id),
290 KEY mail_user (mail_user,mail_id),
291 KEY mail1 (mail_user,mail_to),
292 KEY mail_to (mail_to),
293 KEY mail_from (mail_from)
294);
295
296#
297# Table structure for table 'mail_from'
298#
299CREATE TABLE mail_from (
300 mail_id int(11) NOT NULL auto_increment,
301 mail_from int(11) DEFAULT '0' NOT NULL,
302 mail_to int(11) DEFAULT '0' NOT NULL,
303 mail_text text,
304 mail_timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
305 PRIMARY KEY (mail_id),
306 UNIQUE mail_order (mail_id,mail_to,mail_from),
307 KEY mail_from (mail_from),
308 KEY mail_to (mail_to),
309 KEY mail (mail_from,mail_to)
310);
311
312#
313# Table structure for table 'mail_to'
314#
315CREATE TABLE mail_to (
316 mail_id int(11) NOT NULL auto_increment,
317 mail_from int(11) DEFAULT '0' NOT NULL,
318 mail_to int(11) DEFAULT '0' NOT NULL,
319 mail_text text,
320 mail_timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
321 PRIMARY KEY (mail_id),
322 UNIQUE mail_order (mail_id,mail_to,mail_from),
323 KEY mail_from (mail_from),
324 KEY mail_to (mail_to),
325 KEY mail (mail_from,mail_to)
326);
327
328#
329# Table structure for table 'mailinfo'
330#
331CREATE TABLE mailinfo (
332 email varchar(50),
333 datum datetime,
334 active enum('yes','no')
335);
336
337#
338# Table structure for table 'mmm_articles'
339#
340CREATE TABLE mmm_articles (
341 id_article int(11) NOT NULL auto_increment,
342 id_rubrika int(11) DEFAULT '0' NOT NULL,
343 datum datetime,
344 nazov varchar(120),
345 short_desc text,
346 autor varchar(255),
347 id_rubrika_secondary int(11),
348 title_image varchar(100),
349 on_main enum('yes','no') DEFAULT 'no',
350 hits int(11),
351 text1 text,
352 text2 text,
353 text3 text,
354 image1 varchar(40),
355 image2 varchar(40),
356 image3 varchar(40),
357 id_diskuse int(11),
358 prispevky int(11),
359 PRIMARY KEY (id_article)
360);
361
362#
363# Table structure for table 'node_access'
364#
365CREATE TABLE node_access (
366 node_type enum('forum','journaux') DEFAULT 'forum' NOT NULL,
367 node_id int(11) DEFAULT '0' NOT NULL,
368 user_id int(11) DEFAULT '0' NOT NULL,
369 access_type enum('master','op','access','ban') DEFAULT 'access' NOT NULL,
370 UNIQUE access (node_type,user_id,node_id)
371);
372
373#
374# Table structure for table 'outro'
375#
376CREATE TABLE outro (
377 id_outro int(11) NOT NULL auto_increment,
378 outro text,
379 autor varchar(100),
380 PRIMARY KEY (id_outro)
381);
382
383#
384# Table structure for table 'personalize'
385#
386CREATE TABLE personalize (
387 mail varchar(100) DEFAULT '' NOT NULL,
388 java enum('yes','no') DEFAULT 'no',
389 flash enum('yes','no') DEFAULT 'no',
390 wired enum('yes','no') DEFAULT 'no',
391 shadowbox enum('yes','no') DEFAULT 'no',
392 zion enum('yes','no') DEFAULT 'no',
393 sound enum('yes','no') DEFAULT 'no',
394 article_count int(4) DEFAULT '15',
395 nick varchar(30),
396 skin int(5),
397 partylist enum('yes','no') DEFAULT 'no',
398 underground enum('yes','no') DEFAULT 'no',
399 mailinfo varchar(50) DEFAULT 'no',
400 PRIMARY KEY (mail)
401);
402
403#
404# Table structure for table 'poll_options'
405#
406CREATE TABLE poll_options (
407 id_option int(11) NOT NULL auto_increment,
408 id_poll int(11),
409 text varchar(255),
410 number int(11),
411 PRIMARY KEY (id_option),
412 KEY id_poll (id_poll)
413);
414
415#
416# Table structure for table 'polls'
417#
418CREATE TABLE polls (
419 id_poll int(11) NOT NULL auto_increment,
420 time timestamp(14),
421 question varchar(255),
422 responses int(11) DEFAULT '0' NOT NULL,
423 forum_id int(11),
424 PRIMARY KEY (id_poll),
425 KEY id_poll (id_poll),
426 KEY forum_id (forum_id)
427);
428
429#
430# Table structure for table 'prispevky'
431#
432CREATE TABLE prispevky (
433 id_prispevku int(11) NOT NULL auto_increment,
434 id_diskuse int(11) DEFAULT '0' NOT NULL,
435 vlozeno datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
436 jmeno varchar(255) DEFAULT '' NOT NULL,
437 email varchar(255) DEFAULT '' NOT NULL,
438 email_upozorneni enum('ne','ano') DEFAULT 'ne' NOT NULL,
439 www varchar(255) DEFAULT '' NOT NULL,
440 titulek varchar(255) DEFAULT '' NOT NULL,
441 telo text DEFAULT '' NOT NULL,
442 thread varchar(255) DEFAULT '' NOT NULL,
443 znamka tinyint(4) DEFAULT '0' NOT NULL,
444 duplicita varchar(32) DEFAULT '' NOT NULL,
445 PRIMARY KEY (id_prispevku)
446);
447
448#
449# Table structure for table 'referers'
450#
451CREATE TABLE referers (
452 referer varchar(255),
453 adresa varchar(100),
454 cas timestamp(14),
455 id int(11)
456);
457
458#
459# Table structure for table 'rss_items'
460#
461CREATE TABLE rss_items (
462 id int(11) NOT NULL auto_increment,
463 id_module int(11),
464 title varchar(255),
465 link varchar(255),
466 description text,
467 active enum('yes','no') DEFAULT 'yes',
468 datetime timestamp(14),
469 poradi int(11),
470 imagelink varchar(255),
471 imagetitle varchar(255),
472 imageurl varchar(255),
473 PRIMARY KEY (id)
474);
475
476#
477# Table structure for table 'rss_news'
478#
479CREATE TABLE rss_news (
480 news_id int(8) NOT NULL auto_increment,
481 news_desc varchar(255),
482 news_title varchar(200),
483 news_url varchar(200),
484 news_image varchar(200),
485 news_md5 varchar(25) DEFAULT '' NOT NULL,
486 news_image_link varchar(25) DEFAULT '' NOT NULL,
487 news_image_title varchar(25) DEFAULT '' NOT NULL,
488 news_source int(11) DEFAULT '0' NOT NULL,
489 PRIMARY KEY (news_id)
490);
491
492#
493# Table structure for table 'rss_sources'
494#
495CREATE TABLE rss_sources (
496 rss_id int(8) NOT NULL auto_increment,
497 rss_source varchar(200),
498 rss_title varchar(200),
499 rss_url varchar(200),
500 rss_image varchar(200),
501 rss_hash varchar(32) DEFAULT '' NOT NULL,
502 PRIMARY KEY (rss_id)
503);
504
505#
506# Table structure for table 'rubriky'
507#
508CREATE TABLE rubriky (
509 id_rubriky int(11) NOT NULL auto_increment,
510 id_parent int(11),
511 nazov varchar(60),
512 obrazok varchar(100),
513 description text,
514 hits int(11),
515 PRIMARY KEY (id_rubriky)
516);
517
518#
519# Table structure for table 'session'
520#
521CREATE TABLE session (
522 session varchar(50),
523 user_name varchar(30),
524 user_action varchar(20),
525 user_action_id int(11),
526 user_action_name varchar(30),
527 user_id int(11) DEFAULT '0' NOT NULL,
528 user_idle timestamp(14),
529 user_mode enum('normal','depresia','stastie','LASKA','vykaleny','nasrany','invisible') DEFAULT 'normal',
530 user_amount int(9) DEFAULT '23' NOT NULL,
531 user_mode_message varchar(200) DEFAULT '' NOT NULL,
532 admin enum('yes','no') DEFAULT 'no',
533 UNIQUE user_id (user_id)
534);
535
536#
537# Table structure for table 'submissions'
538#
539CREATE TABLE submissions (
540 forum_id int(11),
541 submission_owner int(11) DEFAULT '0' NOT NULL,
542 submission_text text DEFAULT '' NOT NULL,
543 submission_timestamp datetime,
544 submission_thread varchar(60) DEFAULT '' NOT NULL,
545 submission_id int(11) NOT NULL auto_increment,
546 submission_k int(8) DEFAULT '0' NOT NULL,
547 PRIMARY KEY (submission_id),
548 UNIQUE submission_index (submission_id,forum_id,submission_owner),
549 KEY submission_owner (submission_owner),
550 KEY lala (forum_id,submission_owner),
551 KEY lalala (forum_id,submission_owner,submission_id),
552 KEY submission_timestamp (submission_timestamp),
553 KEY k (submission_k)
554);
555
556#
557# Table structure for table 'user'
558#
559CREATE TABLE user (
560 id int(3) NOT NULL auto_increment,
561 email varchar(50),
562 login varchar(20),
563 password varchar(128),
564 last_login timestamp(14),
565 user_action varchar(20),
566 user_mode enum('off','normal','happy','depka','nasracky','neviditelny') DEFAULT 'off',
567 user_action_param_name varchar(50),
568 user_action_param_value varchar(50),
569 user_action_param_id int(11),
570 user_ad enum('yes','no') DEFAULT 'yes',
571 user_info text,
572 user_registered timestamp(14),
573 user_mail int(3) DEFAULT '0',
574 user_icq varchar(20) DEFAULT '' NOT NULL,
575 user_www varchar(100),
576 user_active enum('yes','no','waiting'),
577 mail_name varchar(23),
578 charisma int(11) DEFAULT '0' NOT NULL,
579 user_amount int(11) DEFAULT '23',
580 user_happy varchar(200) DEFAULT '' NOT NULL,
581 user_sad varchar(200) DEFAULT '' NOT NULL,
582 user_love varchar(200) DEFAULT '' NOT NULL,
583 user_agressive varchar(200) DEFAULT '' NOT NULL,
584 user_drugged varchar(200) DEFAULT '' NOT NULL,
585 user_k int(11) DEFAULT '0' NOT NULL,
586 user_karma int(11) DEFAULT '0' NOT NULL,
587 admin enum('yes','no') DEFAULT 'no',
588 PRIMARY KEY (id),
589 UNIQUE id (id)
590);
591
592#
593# Table structure for table 'user_discussion'
594#
595CREATE TABLE user_discussion (
596 user_id int(11),
597 discussion_id int(11),
598 submission_count int(11),
599 last_visit datetime,
600 KEY user_id (user_id),
601 KEY discussion_id (discussion_id)
602);
603
604#
605# Table structure for table 'user_forum'
606#
607CREATE TABLE user_forum (
608 user_id int(11) DEFAULT '0' NOT NULL,
609 forum_id int(11) DEFAULT '0' NOT NULL,
610 submission_count int(11) DEFAULT '0',
611 last_visit datetime DEFAULT '0000-00-00 00:00:00',
612 user_bookmark enum('yes','no') DEFAULT 'no',
613 UNIQUE user_forum (user_id,forum_id),
614 KEY booked_users (forum_id,user_bookmark)
615);
616
617#
618# Table structure for table 'user_ip'
619#
620CREATE TABLE user_ip (
621 user_id int(11),
622 ip char(23),
623 datetime timestamp(14)
624);
625
626#
627# Table structure for table 'user_poll'
628#
629CREATE TABLE user_poll (
630 user_id int(11) DEFAULT '0' NOT NULL,
631 poll_id int(11) DEFAULT '0' NOT NULL
632);
633
This page took 0.4853 seconds and 4 git commands to generate.