· 9 years ago · Nov 29, 2016, 10:56 AM
1SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
2SET time_zone = "+00:00";
3
4/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
5/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
6/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
7/*!40101 SET NAMES utf8 */;
8
9
10DROP TABLE IF EXISTS `codo_categories`;
11CREATE TABLE IF NOT EXISTS `codo_categories` (
12 `cat_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id of category',
13 `cat_pid` int(11) NOT NULL DEFAULT '0' COMMENT 'category parent id',
14 `cat_name` varchar(255) NOT NULL COMMENT 'name of the category',
15 `cat_alias` varchar(300) NOT NULL COMMENT 'Name that will appear in the url',
16 `cat_description` varchar(400) DEFAULT NULL COMMENT 'Description of this category',
17 `cat_img` varchar(200) NOT NULL COMMENT 'name of image',
18 `no_topics` int(11) NOT NULL COMMENT 'No of topics in this ategory',
19 `no_posts` int(11) NOT NULL COMMENT 'No of posts in this category',
20 `cat_order` int(11) NOT NULL DEFAULT '0' COMMENT 'order in which category is displayed',
21 PRIMARY KEY (`cat_id`)
22) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Contains forum categories' AUTO_INCREMENT=10 ;
23
24INSERT INTO `codo_categories` (`cat_id`, `cat_pid`, `cat_name`, `cat_alias`, `cat_description`, `cat_img`, `no_topics`, `no_posts`, `cat_order`) VALUES
25(3, 0, 'General Discussions', 'general-discussions', 'For anything and everything that doesn''t fit in other categories.', 'bubbles.png', 1, 1, 0),
26(10, 0, 'News and Announcements', 'news-and-announcements', 'this is where all the latest news will be posted', 'bullhorn.png', 0, 0, 0),
27(11, 0, 'Support Forums', 'support-forums', 'Have any problem? Report it here and we will be glad to help.', 'support.png', 0, 0, 2),
28(12, 0, 'Let us know', 'let-us-know', 'We encourage new members to post a short description about themselves', 'envelope.png', 0, 0, 2),
29(13, 0, 'Bug Reports', 'bug-reports', 'Found a bug? why not report it here?', 'bug.png', 0, 0, 2),
30(14, 0, 'Feature Requests', 'feature-requests', 'You have a cool idea? post them here!', 'wand.png', 0, 0, 2);
31
32DROP TABLE IF EXISTS `codo_config`;
33CREATE TABLE IF NOT EXISTS `codo_config` (
34 `id` int(11) NOT NULL AUTO_INCREMENT,
35 `option_name` varchar(50) NOT NULL,
36 `option_value` text NOT NULL,
37 PRIMARY KEY (`id`)
38) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='contains site information' AUTO_INCREMENT=32 ;
39
40INSERT INTO `codo_config` (`id`, `option_name`, `option_value`) VALUES
41(1, 'site_url', ''),
42(2, 'site_title', 'CODOLOGIC'),
43(3, 'site_description', 'codoforum - Enhancing your forum experience with next generation technology!'),
44(4, 'admin_email', 'admin@codologic.com'),
45(5, 'theme', 'blue'),
46(6, 'captcha_public_key', '6LcMnOkSAAAAALO3jLKIIAwuhdcq34PZ1rXi0-pZ'),
47(7, 'captcha_private_key', '6LcMnOkSAAAAAGzpSKY79uIjFybQ4C0_PnmNe2US'),
48(8, 'register_pass_min', '8'),
49(9, 'num_posts_all_topics', '30'),
50(10, 'num_posts_cat_topics', '20'),
51(11, 'num_posts_per_topic', '20'),
52(12, 'forum_attachments_path', 'assets/img/attachments'),
53(13, 'forum_attachments_exts', 'jpg,jpeg,png,gif,pjpeg,bmp,txt'),
54(14, 'forum_attachments_size', '3'),
55(15, 'forum_attachments_mimetypes', 'image/*,text/plain'),
56(16, 'forum_attachments_multiple', 'true'),
57(17, 'forum_attachments_parallel', '4'),
58(18, 'forum_attachments_max', '10'),
59(19, 'reply_min_chars', '10'),
60(20, 'subcategory_dropdown', 'hidden'),
61(21, 'captcha', 'disabled'),
62(22, 'await_approval_message', 'Dear [user:username],\n\nThank you for registering at [option:site_title]. Before we can activate your account one last step must be taken to complete your registration.\n\nTo complete your registration, please visit this URL: [this:confirm_url]\n\nYour Username is: [user:username] \n\nIf you are still having problems signing up please contact a member of our support staff at [option:admin_email]\n\nRegards,\n[option:site_title]'),
63(23, 'await_approval_subject', 'Confirm your email for [user:username] at [option:site_title]'),
64(24, 'mail_type', 'mail'),
65(25, 'smtp_protocol', 'ssl'),
66(26, 'smtp_server', 'smtp.gmail.com'),
67(27, 'smtp_port', '465'),
68(28, 'smtp_username', 'admin@codologic.com'),
69(29, 'smtp_password', 'your_smtp_pass'),
70(30, 'register_username_min', '3'),
71(31, 'signature_char_lim', '255'),
72(32, 'sso_client_id', 'codoforum'),
73(33, 'sso_secret', 'Xe24!rf'),
74(34, 'sso_get_user_path', 'http://localhost/page/codoforum_sso/user'),
75(35, 'sso_login_user_path', 'http://localhost/page/user?codoforum=sso'),
76(36, 'sso_logout_user_path', 'http://localhost/page/user/logout'),
77(37, 'sso_register_user_path', 'http://localhost/page/user/lot'),
78(38, 'sso_name', 'Codologic'),
79(39, 'post_notify_message', 'Hi,\n\n[user:username] has replied to the topic: [post:title]\n\n----\n[post:imessage]\n----\n\nYou can view the reply at the following url\n[post:url]\n\nRegards,\n[option:site_title] team\n'),
80(40, 'post_notify_subject', '[post:title] - new reply'),
81(41, 'password_reset_message', 'Hi,\r\n\r\nYour password has been reset . \r\n\r\nNew password: [user:password]\r\n\r\nNote: Please change your password immediately after you login.\r\n\r\nRegards,\r\n[option:site_title] team\r\n'),
82(42, 'password_reset_subject', 'Your password has been reset -[option:site_title]'),
83(43, 'topic_notify_message', 'Hi,[post:username]\r\n\r\n[user:username] has created a new topic: [post:title]\r\nin category [post:category]\r\n\r\nYou can view the topic by clicking [post:url]\r\n\r\nRegards,\r\n[option:site_title] team'),
84(44, 'topic_notify_subject', '[post:category] - new topic\r\n'),
85(45, 'brand_img', 'http://codoforum.com/img/favicon-32x32.png');
86
87DROP TABLE IF EXISTS `codo_logs`;
88CREATE TABLE IF NOT EXISTS `codo_logs` (
89 `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary id of each log',
90 `uid` int(11) NOT NULL DEFAULT '0' COMMENT 'userid of the user',
91 `log_type` varchar(64) NOT NULL COMMENT 'type of log',
92 `message` text NOT NULL COMMENT 'log message',
93 `severity` int(11) NOT NULL COMMENT 'severity level from emergency(0) to n',
94 `location` varchar(200) NOT NULL COMMENT 'method name or page location',
95 `log_time` int(11) NOT NULL COMMENT 'time of log',
96 PRIMARY KEY (`id`)
97) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Contains logs of events/errors/warnings etc' AUTO_INCREMENT=20 ;
98
99DROP TABLE IF EXISTS `codo_plugins`;
100CREATE TABLE IF NOT EXISTS `codo_plugins` (
101 `plg_name` varchar(255) NOT NULL COMMENT 'path of filename relative to codoforum root',
102 `plg_type` varchar(10) NOT NULL DEFAULT '',
103 `plg_status` int(11) NOT NULL DEFAULT '0' COMMENT 'boolean indicating plugin is enabled or not',
104 `plg_weight` int(11) NOT NULL DEFAULT '0' COMMENT 'order in which plugin is invoked for a hook',
105 `plg_schema_ver` int(11) NOT NULL DEFAULT '0',
106 UNIQUE KEY `filename` (`plg_name`)
107) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Contains list of all plugins';
108
109
110INSERT INTO `codo_plugins` (`plg_name`, `plg_type`, `plg_status`, `plg_weight`, `plg_schema_ver`) VALUES
111('post_notify','plugin', 1, 0, 1),
112('sso','plugin', 0, 0, 1),
113('uni_login','plugin', 0, 0, 1);
114
115DROP TABLE IF EXISTS `codo_posts`;
116CREATE TABLE IF NOT EXISTS `codo_posts` (
117 `post_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id of post',
118 `topic_id` int(11) NOT NULL COMMENT 'corresponding id of topic',
119 `cat_id` int(11) NOT NULL COMMENT 'corresponding id of category',
120 `uid` int(11) NOT NULL COMMENT 'userid creating this post',
121 `imessage` text NOT NULL COMMENT 'message in bbcode/markdown format',
122 `omessage` text NOT NULL COMMENT 'message in html format',
123 `post_created` int(11) NOT NULL COMMENT 'time at which this post was created',
124 `post_modified` int(11) DEFAULT NULL COMMENT 'time at which this post was modified',
125 `post_status` int(11) NOT NULL DEFAULT '1' COMMENT '1=active, 0=deleted',
126 PRIMARY KEY (`post_id`)
127) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Contains forum posts' AUTO_INCREMENT=1 ;
128
129INSERT INTO `codo_posts` (`post_id`, `topic_id`, `cat_id`, `uid`, `imessage`, `omessage`, `post_created`, `post_modified`, `post_status`) VALUES
130(1, 1, 3, 1, 'Hi, \n \nThis is an example post in your codoforum installation. \nYou can create/modify/delete all forum categories from the forum backend. \n \nPlease edit the forum title and description from the backend. \n \nThe only user available to login in the front-end is admin with the password that you set during the installation.\n \nYou may delete this post . \n \nRegards, \nCodologic Team', '<p>Hi, </p>\n<p>This is an example post in your codoforum installation.<br>You can create/modify/delete all forum categories from the forum backend. </p>\n<p>Please edit the forum title and description from the backend. </p>\n<p>The only user available to login in the front-end is admin with the password that you set during the installation.</p>\n<p>You may delete this post . </p>\n<p>Regards,<br>Codologic Team</p>', 1401549322, NULL, 1);
131
132
133DROP TABLE IF EXISTS `codo_roles`;
134CREATE TABLE IF NOT EXISTS `codo_roles` (
135 `rid` int(11) NOT NULL,
136 `rname` varchar(40) NOT NULL COMMENT 'role name of user',
137 PRIMARY KEY (`rid`)
138) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Contains different roles and permissions of users';
139
140INSERT INTO `codo_roles` (`rid`, `rname`) VALUES
141(1, 'guest'),
142(5, 'unverified user'),
143(2, 'user'),
144(3, 'moderator'),
145(4, 'administrator');
146
147DROP TABLE IF EXISTS `codo_role_permissions`;
148CREATE TABLE IF NOT EXISTS `codo_role_permissions` (
149 `rid` int(11) NOT NULL COMMENT 'role id',
150 `permission` varchar(128) NOT NULL COMMENT 'permission name',
151 `module` varchar(100) NOT NULL DEFAULT 'core' COMMENT 'module name , default is core',
152 PRIMARY KEY (`rid`,`permission`)
153) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Contains permissions for user roles';
154
155INSERT INTO `codo_role_permissions` (`rid`, `permission`, `module`) VALUES
156(1, 'view profile', 'core'),
157(5, 'view profile', 'core'),
158(2, 'create new topic', 'core'),
159(2, 'create topic', 'core'),
160(2, 'edit my post', 'core'),
161(2, 'edit my profile', 'core'),
162(2, 'edit my topic', 'core'),
163(2, 'reply to topic', 'core'),
164(2, 'view profile', 'core'),
165(3, 'create new topic', 'core'),
166(3, 'create topic', 'core'),
167(3, 'delete all posts', 'core'),
168(3, 'delete all topics', 'core'),
169(3, 'edit all posts', 'core'),
170(3, 'edit all topics', 'core'),
171(3, 'edit my profile', 'core'),
172(3, 'reply to topic', 'core'),
173(3, 'view profile', 'core'),
174(4, 'create category', 'core'),
175(4, 'create new topic', 'core'),
176(4, 'create topic', 'core'),
177(4, 'delete all posts', 'core'),
178(4, 'delete all topics', 'core'),
179(4, 'edit all posts', 'core'),
180(4, 'edit all profiles', 'core'),
181(4, 'edit all topics', 'core'),
182(4, 'edit my profile', 'core'),
183(4, 'reply to topic', 'core'),
184(4, 'view profile', 'core');
185
186DROP TABLE IF EXISTS `codo_sessions`;
187CREATE TABLE IF NOT EXISTS `codo_sessions` (
188 `sid` varchar(255) NOT NULL COMMENT 'php session id',
189 `last_active` int(11) NOT NULL COMMENT 'last active time',
190 `session_data` text NOT NULL COMMENT 'session data',
191 PRIMARY KEY (`sid`)
192) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Contains user sessions';
193
194
195DROP TABLE IF EXISTS `codo_signups`;
196CREATE TABLE IF NOT EXISTS `codo_signups` (
197 `id` int(11) NOT NULL AUTO_INCREMENT,
198 `username` varchar(128) NOT NULL,
199 `token` varchar(128) NOT NULL,
200 PRIMARY KEY (`id`)
201) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='stores temporary sign up attempts for account activation' AUTO_INCREMENT=13 ;
202
203
204DROP TABLE IF EXISTS `codo_smileys`;
205CREATE TABLE IF NOT EXISTS `codo_smileys` (
206 `id` int(11) NOT NULL AUTO_INCREMENT,
207 `symbol` varchar(50) NOT NULL,
208 `image_name` varchar(50) NOT NULL,
209 `weight` int(11) DEFAULT '0',
210 PRIMARY KEY (`id`)
211) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='stores paths to smileys available while posting' AUTO_INCREMENT=20 ;
212
213INSERT INTO `codo_smileys` (`id`, `symbol`, `image_name`) VALUES
214(1, ':S', 'worried.gif'),
215(2, '(wasntme)', 'itwasntme.gif'),
216(3, 'x(', 'angry.gif'),
217(4, '(doh)', 'doh.gif'),
218(5, '|-()', 'yawn.gif'),
219(6, ']:)', 'evilgrin.gif'),
220(7, '|(', 'dull.gif'),
221(8, '|-)', 'sleepy.gif'),
222(9, '(blush)', 'blush.gif'),
223(10, ':P', 'tongueout.gif'),
224(11, '(:|', 'sweat.gif'),
225(12, ';(', 'crying.gif'),
226(13, ':)', 'smile.gif'),
227(14, ':(', 'sad.gif'),
228(15, ':D', 'bigsmile.gif'),
229(16, '8)', 'cool.gif'),
230(17, ';)', 'wink.gif'),
231(18, '(mm)', 'mmm.gif'),
232(19, ':x', 'lipssealed.gif');
233
234DROP TABLE IF EXISTS `codo_topics`;
235CREATE TABLE IF NOT EXISTS `codo_topics` (
236 `topic_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'topic id',
237 `title` varchar(255) NOT NULL COMMENT 'title of the topic',
238 `cat_id` smallint(6) NOT NULL COMMENT 'category id to which the topic belongs',
239 `post_id` int(11) DEFAULT NULL COMMENT 'Contains postid of parent post',
240 `uid` int(11) NOT NULL COMMENT 'userid creating this topic',
241 `last_post_id` int(11) NOT NULL COMMENT 'Contains id of the last post',
242 `last_post_uid` varchar(200) DEFAULT NULL COMMENT 'userid making last reply',
243 `last_post_name` varchar(200) DEFAULT NULL COMMENT 'username making last reply',
244 `topic_created` int(11) NOT NULL COMMENT 'time at which topic was created',
245 `topic_updated` int(11) NOT NULL COMMENT 'time at which topic was last edited',
246 `last_post_time` int(11) NOT NULL COMMENT 'time at which last reply was made',
247 `no_posts` int(11) NOT NULL DEFAULT '0' COMMENT 'No. of replies for the topic',
248 `no_views` int(10) NOT NULL DEFAULT '0' COMMENT 'No. of views for the topic',
249 `topic_status` int(11) NOT NULL DEFAULT '1' COMMENT '0=deleted;1=active;2=sticky;3=locked',
250 PRIMARY KEY (`topic_id`)
251) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Caontains forum topics' AUTO_INCREMENT=1 ;
252
253ALTER TABLE `codo_topics` ADD INDEX ( `last_post_time` ) ;
254ALTER TABLE `codo_topics` ADD INDEX ( `cat_id` , `uid` , `topic_created` ) ;
255
256INSERT INTO `codo_topics` (`topic_id`, `title`, `cat_id`, `post_id`, `uid`, `last_post_id`, `last_post_uid`, `last_post_name`, `topic_created`, `topic_updated`, `last_post_time`, `no_posts`, `no_views`, `topic_status`) VALUES
257(1, 'Welcome to Codoforum', 3, 1, 1, 0, NULL, NULL, 1401549322, 0, 1401549322, 1, 0, 1);
258
259
260DROP TABLE IF EXISTS `codo_users`;
261CREATE TABLE IF NOT EXISTS `codo_users` (
262 `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'user id of user',
263 `username` varchar(60) NOT NULL COMMENT 'unique username of user',
264 `name` varchar(100) DEFAULT NULL COMMENT 'display name of user',
265 `pass` varchar(128) NOT NULL COMMENT 'salted password',
266 `token` varchar(64) NOT NULL COMMENT 'Contains the cookie token',
267 `mail` varchar(200) DEFAULT NULL COMMENT 'email id of user',
268 `created` int(11) NOT NULL COMMENT 'php time when user was created',
269 `last_access` int(11) NOT NULL DEFAULT '0' COMMENT 'php time when user last logged in',
270 `read_time` int(11) NOT NULL DEFAULT '0' COMMENT 'last user read mark time',
271 `user_status` int(11) NOT NULL DEFAULT '1' COMMENT '1 = active , 0 = pending',
272 `avatar` varchar(200) DEFAULT NULL COMMENT 'full path to avatar',
273 `signature` text COMMENT 'users signature displayed after each post',
274 `no_posts` int(11) NOT NULL DEFAULT '0' COMMENT 'No of posts created by the user',
275 `profile_views` int(11) NOT NULL COMMENT 'no of times users other than me viewed my profile',
276 `rid` int(11) NOT NULL COMMENT 'role id of the user as described in codo_roles table',
277 `oauth_id` varchar(128) NOT NULL,
278 PRIMARY KEY (`id`),
279 UNIQUE KEY `username` (`username`)
280) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Contains user information' AUTO_INCREMENT=1 ;
281
282ALTER TABLE `codo_users` ADD UNIQUE (`mail`);
283
284--
285-- Table structure for table `codo_notify`
286--
287
288DROP TABLE IF EXISTS `codo_notify`;
289CREATE TABLE IF NOT EXISTS `codo_notify` (
290 `id` int(11) NOT NULL AUTO_INCREMENT,
291 `type` varchar(100) NOT NULL,
292 `uid` int(11) NOT NULL,
293 `nid` int(11) NOT NULL,
294 `created` int(11) NOT NULL,
295 `is_read` int(11) NOT NULL,
296 PRIMARY KEY (`id`),
297 KEY `is_read` (`is_read`),
298 KEY `nid` (`nid`)
299) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=36 ;
300
301DROP TABLE IF EXISTS `codo_notify_queue`;
302CREATE TABLE IF NOT EXISTS `codo_notify_queue` (
303 `id` int(11) NOT NULL AUTO_INCREMENT,
304 `type` varchar(200) NOT NULL,
305 `nid` int(11) NOT NULL,
306 PRIMARY KEY (`id`)
307) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
308
309DROP TABLE IF EXISTS `codo_notify_subscribers`;
310CREATE TABLE IF NOT EXISTS `codo_notify_subscribers` (
311 `id` int(11) NOT NULL AUTO_INCREMENT,
312 `cid` int(11) DEFAULT NULL,
313 `tid` int(11) DEFAULT NULL,
314 `uid` int(11) NOT NULL COMMENT 'subscriber''s user id ',
315 `type` varchar(60) NOT NULL,
316 PRIMARY KEY (`id`),
317 KEY `cid` (`cid`),
318 KEY `tid` (`tid`),
319 KEY `uid` (`uid`),
320 KEY `channel` (`type`)
321) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=34 ;
322
323DROP TABLE IF EXISTS `codo_notify_text`;
324CREATE TABLE IF NOT EXISTS `codo_notify_text` (
325 `id` int(11) NOT NULL AUTO_INCREMENT,
326 `data` varchar(1024) NOT NULL,
327 PRIMARY KEY (`id`)
328) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=138 ;
329
330DROP TABLE IF EXISTS `codo_user_preferences`;
331CREATE TABLE IF NOT EXISTS `codo_user_preferences` (
332 `id` int(11) NOT NULL AUTO_INCREMENT,
333 `uid` int(11) NOT NULL DEFAULT '0',
334 `preference` varchar(100) NOT NULL,
335 `value` varchar(400) NOT NULL,
336 PRIMARY KEY (`id`),
337 KEY `uid` (`uid`),
338 KEY `preference` (`preference`)
339) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
340
341INSERT INTO `codo_user_preferences` (`uid`, `preference`, `value`) VALUES
342( 0, 'notification_frequency', 'immediate'),
343( 0, 'real_time_notifications', 'yes'),
344( 0, 'desktop_notifications', 'yes'),
345( 0, 'send_emails_when_online', 'no'),
346( 0, 'notification_type_on_create_topic', '4'),
347( 0, 'notification_type_on_reply_topic', '3');
348
349
350DROP TABLE IF EXISTS `codo_views`;
351CREATE TABLE IF NOT EXISTS `codo_views` (
352 `date` date NOT NULL,
353 `views` int(11) NOT NULL,
354 PRIMARY KEY (`date`)
355) ENGINE=InnoDB DEFAULT CHARSET=utf8;
356
357DROP TABLE IF EXISTS `codo_mail_queue`;
358CREATE TABLE IF NOT EXISTS `codo_mail_queue` (
359 `id` int(11) NOT NULL AUTO_INCREMENT,
360 `mail_type` int(11) DEFAULT '1' COMMENT '1: notification',
361 `mail_status` int(11) NOT NULL DEFAULT '0' COMMENT '0: not sent , 1: sending, 2: sent, 3: error',
362 `from_address` varchar(200) DEFAULT NULL,
363 `to_address` varchar(200) NOT NULL,
364 `mail_subject` varchar(400) NOT NULL,
365 `body` text NOT NULL,
366 PRIMARY KEY (`id`)
367) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='queues emails to be sent later' AUTO_INCREMENT=1;
368
369
370DROP TABLE IF EXISTS `codo_crons`;
371CREATE TABLE IF NOT EXISTS `codo_crons` (
372 `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'cron id',
373 `cron_name` varchar(100) NOT NULL COMMENT 'cron name',
374 `cron_type` enum('once','recurrence') NOT NULL COMMENT 'can be once or recurrence',
375 `cron_interval` int(11) NOT NULL COMMENT 'interval time ',
376 `cron_started` int(11) NOT NULL COMMENT 'time at which cron started',
377 `cron_last_run` int(11) NOT NULL COMMENT 'time when cron last run',
378 `cron_status` tinyint(1) NOT NULL COMMENT '1 = running , 0 = not running',
379 PRIMARY KEY (`id`),
380 UNIQUE KEY `cron_name` (`cron_name`)
381) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='cron schedules' AUTO_INCREMENT=1 ;
382
383INSERT INTO `codo_crons` (`id`, `cron_name`, `cron_type`, `cron_interval`, `cron_started`, `cron_last_run`, `cron_status`) VALUES
384(1, 'core', 'recurrence', 86400, 0, 0, 0);
385
386CREATE TABLE IF NOT EXISTS `codo_bans` (
387 `id` int(11) NOT NULL AUTO_INCREMENT,
388 `uid` varchar(100) NOT NULL COMMENT 'name/email/ip of item',
389 `ban_type` enum('name','mail','ip') NOT NULL,
390 `ban_by` varchar(100) NOT NULL COMMENT 'who created this ban',
391 `ban_on` int(11) NOT NULL COMMENT 'when was this created',
392 `ban_reason` varchar(300) NOT NULL COMMENT 'why was this created',
393 `ban_expires` int(11) NOT NULL COMMENT 'when will this expire ',
394 PRIMARY KEY (`id`)
395) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='stores ban list' AUTO_INCREMENT=2 ;
396
397DROP TABLE IF EXISTS `codo_blocks`;
398CREATE TABLE IF NOT EXISTS `codo_blocks` (
399 `id` int(11) NOT NULL AUTO_INCREMENT,
400 `module` varchar(64) NOT NULL DEFAULT '',
401 `theme` varchar(64) NOT NULL DEFAULT '',
402 `status` int(11) NOT NULL DEFAULT '0',
403 `weight` int(11) NOT NULL DEFAULT '0',
404 `region` varchar(64) NOT NULL DEFAULT '',
405 `content` text NOT NULL,
406 `visibility` int(11) NOT NULL DEFAULT '0',
407 `pages` text NOT NULL,
408 `title` varchar(64) NOT NULL DEFAULT '',
409 `cache` int(11) NOT NULL DEFAULT '1',
410 PRIMARY KEY (`id`)
411) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
412
413INSERT INTO `codo_blocks` (`id`, `module`, `theme`, `status`, `weight`, `region`, `content`, `visibility`, `pages`, `title`, `cache`) VALUES
414(1, 'html', 'blue', 0, 0, 'block_main_menu', '<li><a href="#">Link</a></li>\r\n <li class="dropdown">\r\n <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>\r\n <ul class="dropdown-menu" role="menu">\r\n <li><a href="#">Action</a></li>\r\n <li><a href="#">Another action</a></li>\r\n <li><a href="#">Something else here</a></li>\r\n <li class="divider"></li>\r\n <li><a href="#">Separated link</a></li>\r\n <li class="divider"></li>\r\n <li><a href="#">One more separated link</a></li>\r\n </ul>\r\n</li>', 0, '', 'Main Menu', 1);
415
416DROP TABLE IF EXISTS `codo_block_roles`;
417CREATE TABLE IF NOT EXISTS `codo_block_roles` (
418 `bid` int(11) NOT NULL COMMENT 'block id',
419 `rid` int(11) NOT NULL,
420 UNIQUE KEY `bid` (`bid`,`rid`)
421) ENGINE=InnoDB DEFAULT CHARSET=latin1;
422
423DROP TABLE IF EXISTS `codo_unread_categories`;
424CREATE TABLE IF NOT EXISTS `codo_unread_categories` (
425 `cat_id` int(11) NOT NULL,
426 `uid` int(11) NOT NULL,
427 `read_time` int(11) NOT NULL COMMENT 'last mark as read',
428 PRIMARY KEY (`cat_id`,`uid`)
429) ENGINE=InnoDB DEFAULT CHARSET=latin1;
430
431DROP TABLE IF EXISTS `codo_unread_topics`;
432CREATE TABLE IF NOT EXISTS `codo_unread_topics` (
433 `cat_id` int(11) NOT NULL COMMENT 'category id',
434 `topic_id` int(11) NOT NULL,
435 `uid` int(11) NOT NULL,
436 `read_time` int(11) NOT NULL,
437 PRIMARY KEY (`topic_id`,`uid`)
438) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='stores last visited category/topic time';
439
440DROP TABLE IF EXISTS `codo_tags`;
441CREATE TABLE IF NOT EXISTS `codo_tags` (
442 `tag_id` int(11) NOT NULL AUTO_INCREMENT,
443 `tag_name` varchar(50) NOT NULL,
444 `topic_id` int(11) NOT NULL,
445 `cat_id` int(11) NOT NULL,
446 PRIMARY KEY (`tag_id`)
447) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
448
449DROP TABLE IF EXISTS `codo_tags_allowed`;
450CREATE TABLE IF NOT EXISTS `codo_tags_allowed` (
451 `tag_id` int(11) NOT NULL AUTO_INCREMENT,
452 `tag_text` text NOT NULL,
453 `cat_id` int(11) NOT NULL,
454 PRIMARY KEY (`tag_id`),
455 UNIQUE KEY `cat_id` (`cat_id`)
456) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;