1 CREATE TABLE decir_forums( |
1 CREATE TABLE {{TABLE_PREFIX}}decir_forums( |
2 forum_id int(12) unsigned NOT NULL auto_increment, |
2 forum_id int(12) unsigned NOT NULL auto_increment, |
3 forum_type tinyint(2) unsigned NOT NULL DEFAULT 1, |
3 forum_type tinyint(2) unsigned NOT NULL DEFAULT 1, |
4 forum_name varchar(255) NOT NULL, |
4 forum_name varchar(255) NOT NULL, |
5 forum_desc text NOT NULL, |
5 forum_desc text NOT NULL, |
6 parent int(12) unsigned NOT NULL DEFAULT 0, |
6 parent int(12) unsigned NOT NULL DEFAULT 0, |
11 num_topics int(15) unsigned, |
11 num_topics int(15) unsigned, |
12 num_posts int(18) unsigned, |
12 num_posts int(18) unsigned, |
13 forum_extra text, |
13 forum_extra text, |
14 PRIMARY KEY ( forum_id ) |
14 PRIMARY KEY ( forum_id ) |
15 ); |
15 ); |
16 CREATE TABLE decir_topics( |
16 CREATE TABLE {{TABLE_PREFIX}}decir_topics( |
17 topic_id int(15) unsigned NOT NULL auto_increment, |
17 topic_id int(15) unsigned NOT NULL auto_increment, |
18 forum_id int(12) unsigned NOT NULL, |
18 forum_id int(12) unsigned NOT NULL, |
19 topic_title varchar(255) NOT NULL, |
19 topic_title varchar(255) NOT NULL, |
20 topic_icon tinyint(3) unsigned NOT NULL, |
20 topic_icon tinyint(3) unsigned NOT NULL, |
21 topic_starter int(12) unsigned NOT NULL, |
21 topic_starter int(12) unsigned NOT NULL, |
24 topic_moved tinyint(1) unsigned NOT NULL DEFAULT 0, |
24 topic_moved tinyint(1) unsigned NOT NULL DEFAULT 0, |
25 timestamp int(11) unsigned NOT NULL, |
25 timestamp int(11) unsigned NOT NULL, |
26 topic_deleted tinyint(1) NOT NULL DEFAULT 0, |
26 topic_deleted tinyint(1) NOT NULL DEFAULT 0, |
27 topic_deletor int(12) DEFAULT NULL, |
27 topic_deletor int(12) DEFAULT NULL, |
28 topic_delete_reason varchar(255) DEFAULT NULL, |
28 topic_delete_reason varchar(255) DEFAULT NULL, |
|
29 num_views bigint(21) UNSIGNED NOT NULL DEFAULT 0, |
|
30 last_post bigint(18) UNSIGNED NOT NULL, |
29 PRIMARY KEY ( topic_id ) |
31 PRIMARY KEY ( topic_id ) |
30 ); |
32 ); |
31 CREATE TABLE decir_posts( |
33 CREATE TABLE {{TABLE_PREFIX}}decir_posts( |
32 post_id bigint(18) unsigned NOT NULL auto_increment, |
34 post_id bigint(18) unsigned NOT NULL auto_increment, |
33 topic_id bigint(15) unsigned NOT NULL, |
35 topic_id bigint(15) unsigned NOT NULL, |
34 poster_id int(12) unsigned NOT NULL, |
36 poster_id int(12) unsigned NOT NULL, |
35 poster_name varchar(255) NOT NULL, |
37 poster_name varchar(255) NOT NULL, |
36 post_subject varchar(255) NOT NULL DEFAULT '', |
38 post_subject varchar(255) NOT NULL DEFAULT '', |
39 edit_count int(5) unsigned NOT NULL DEFAULT 0, |
41 edit_count int(5) unsigned NOT NULL DEFAULT 0, |
40 edit_reason varchar(255), |
42 edit_reason varchar(255), |
41 post_deleted tinyint(1) NOT NULL DEFAULT 0, |
43 post_deleted tinyint(1) NOT NULL DEFAULT 0, |
42 PRIMARY KEY ( post_id ) |
44 PRIMARY KEY ( post_id ) |
43 ); |
45 ); |
44 CREATE TABLE decir_posts_text( |
46 CREATE TABLE {{TABLE_PREFIX}}decir_posts_text( |
45 post_id bigint(18) unsigned NOT NULL, |
47 post_id bigint(18) unsigned NOT NULL, |
46 post_text longtext NOT NULL, |
48 post_text longtext NOT NULL, |
47 bbcode_uid varchar(10) NOT NULL, |
49 bbcode_uid varchar(10) NOT NULL, |
48 PRIMARY KEY ( post_id ) |
50 PRIMARY KEY ( post_id ) |
49 ); |
51 ); |
50 CREATE TABLE decir_hits( |
52 CREATE TABLE {{TABLE_PREFIX}}decir_hits( |
51 hit_id bigint(21) unsigned NOT NULL auto_increment, |
53 hit_id bigint(21) unsigned NOT NULL auto_increment, |
52 user_id int(12) unsigned NOT NULL DEFAULT 1, |
54 user_id int(12) unsigned NOT NULL DEFAULT 1, |
53 topic_id bigint(15) unsigned NOT NULL, |
55 topic_id bigint(15) unsigned NOT NULL, |
54 timestamp int(11) unsigned NOT NULL, |
56 timestamp int(11) unsigned NOT NULL, |
55 PRIMARY KEY ( hit_id ) |
57 PRIMARY KEY ( hit_id ) |