mysql_db_struct.sql
Upload User: gdxydsw
Upload Date: 2019-01-29
Package Size: 16721k
Code Size: 16k
Category:

Java Develop

Development Platform:

Java

  1. --
  2. -- Table structure for table 'jforum_banlist'
  3. --
  4. DROP TABLE IF EXISTS jforum_banlist;
  5. CREATE TABLE jforum_banlist (
  6.   banlist_id INT NOT NULL auto_increment,
  7.   user_id INT,
  8.   banlist_ip varchar(15),
  9.   banlist_email varchar(255),
  10.   PRIMARY KEY  (banlist_id),
  11.   INDEX idx_user (user_id),
  12.   INDEX (banlist_ip),
  13.   INDEX (banlist_email)
  14. ) TYPE=InnoDB;
  15. --
  16. -- Table structure for table 'jforum_categories'
  17. --
  18. DROP TABLE IF EXISTS jforum_categories;
  19. CREATE TABLE jforum_categories (
  20.   categories_id INT NOT NULL auto_increment,
  21.   title varchar(100) NOT NULL default '',
  22.   display_order INT NOT NULL default '0',
  23.   moderated TINYINT(1) DEFAULT '0',
  24.   PRIMARY KEY  (categories_id)
  25. ) TYPE=InnoDB;
  26. --
  27. -- Table structure for table 'jforum_config'
  28. --
  29. DROP TABLE IF EXISTS jforum_config;
  30. CREATE TABLE jforum_config (
  31.   config_name varchar(255) NOT NULL default '',
  32.   config_value varchar(255) NOT NULL default '',
  33.   config_id int not null auto_increment,
  34.   PRIMARY KEY(config_id)
  35. ) TYPE=InnoDB;
  36. --
  37. -- Table structure for table 'jforum_forums'
  38. --
  39. DROP TABLE IF EXISTS jforum_forums;
  40. CREATE TABLE jforum_forums (
  41.   forum_id INT NOT NULL auto_increment,
  42.   categories_id INT NOT NULL default '1',
  43.   forum_name varchar(150) NOT NULL default '',
  44.   forum_desc varchar(255) default NULL,
  45.   forum_order INT default '1',
  46.   forum_topics INT NOT NULL default '0',
  47.   forum_last_post_id INT NOT NULL default '0',
  48.   moderated TINYINT(1) DEFAULT '0',
  49.   PRIMARY KEY  (forum_id),
  50.   KEY (categories_id),
  51.   INDEX idx_forums_cats (categories_id)
  52. ) TYPE=InnoDB;
  53. --
  54. -- Table structure for table 'jforum_forums_watch'
  55. --
  56. DROP TABLE IF EXISTS jforum_forums_watch;
  57. CREATE TABLE jforum_forums_watch (
  58.   forum_id INT NOT NULL,
  59.   user_id INT NOT NULL,
  60.   INDEX idx_fw_forum (forum_id),
  61.   INDEX idx_fw_user (user_id)
  62. ) TYPE=InnoDB;
  63. --
  64. -- Table structure for table 'jforum_groups'
  65. --
  66. DROP TABLE IF EXISTS jforum_groups;
  67. CREATE TABLE jforum_groups (
  68.   group_id INT NOT NULL auto_increment,
  69.   group_name varchar(40) NOT NULL default '',
  70.   group_description varchar(255) default NULL,
  71.   parent_id INT default '0',
  72.   PRIMARY KEY  (group_id)
  73. ) TYPE=InnoDB;
  74. DROP TABLE IF EXISTS jforum_user_groups;
  75. CREATE TABLE jforum_user_groups (
  76. group_id INT NOT NULL,
  77. user_id INT NOT NULL,
  78. INDEX idx_group (group_id),
  79. INDEX idx_user (user_id)
  80. ) TYPE=InnoDB;
  81. --
  82. -- Table structure for table 'jforum_roles'
  83. --
  84. DROP TABLE IF EXISTS jforum_roles;
  85. CREATE TABLE jforum_roles (
  86.   role_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  87.   group_id INT default '0',
  88.   name varchar(255) NOT NULL,
  89.   INDEX idx_group (group_id),
  90.   INDEX idx_name (name)
  91. ) TYPE=InnoDB;
  92. --
  93. -- Table structure for table 'jforum_role_values'
  94. --
  95. DROP TABLE IF EXISTS jforum_role_values;
  96. CREATE TABLE jforum_role_values (
  97.   role_id INT NOT NULL,
  98.   role_value VARCHAR(255),
  99.   INDEX idx_role(role_id)
  100. ) TYPE=InnoDB;
  101. --
  102. -- Table structure for table 'jforum_posts'
  103. --
  104. DROP TABLE IF EXISTS jforum_posts;
  105. CREATE TABLE jforum_posts (
  106.   post_id INT NOT NULL auto_increment,
  107.   topic_id INT NOT NULL default '0',
  108.   forum_id INT NOT NULL default '0',
  109.   user_id INT NOT NULL default '0',
  110.   post_time datetime default NULL,
  111.   poster_ip varchar(15) default NULL,
  112.   enable_bbcode tinyint(1) NOT NULL default '1',
  113.   enable_html tinyint(1) NOT NULL default '1',
  114.   enable_smilies tinyint(1) NOT NULL default '1',
  115.   enable_sig tinyint(1) NOT NULL default '1',
  116.   post_edit_time datetime default NULL,
  117.   post_edit_count INT NOT NULL default '0',
  118.   status tinyint(1) default '1',
  119.   attach TINYINT(1) DEFAULT '0',
  120.   need_moderate TINYINT(1) DEFAULT '0',
  121.   PRIMARY KEY  (post_id),
  122.   KEY (user_id),
  123.   KEY (topic_id),
  124.   KEY (forum_id),
  125.   KEY(post_time),
  126.   INDEX (need_moderate)
  127. ) TYPE=InnoDB;
  128. --
  129. -- Table structure for table 'jforum_posts_text'
  130. --
  131. DROP TABLE IF EXISTS jforum_posts_text;
  132. CREATE TABLE jforum_posts_text (
  133. post_id INT NOT NULL PRIMARY KEY,
  134. post_text TEXT,
  135. post_subject VARCHAR(100)
  136. ) TYPE=InnoDB;
  137. --
  138. -- Table structure for table 'jforum_privmsgs'
  139. --
  140. DROP TABLE IF EXISTS jforum_privmsgs;
  141. CREATE TABLE jforum_privmsgs (
  142.   privmsgs_id INT NOT NULL auto_increment,
  143.   privmsgs_type tinyint(4) NOT NULL default '0',
  144.   privmsgs_subject varchar(255) NOT NULL default '',
  145.   privmsgs_from_userid INT NOT NULL default '0',
  146.   privmsgs_to_userid INT NOT NULL default '0',
  147.   privmsgs_date datetime default null,
  148.   privmsgs_ip varchar(15) NOT NULL default '',
  149.   privmsgs_enable_bbcode tinyint(1) NOT NULL default '1',
  150.   privmsgs_enable_html tinyint(1) NOT NULL default '0',
  151.   privmsgs_enable_smilies tinyint(1) NOT NULL default '1',
  152.   privmsgs_attach_sig tinyint(1) NOT NULL default '1',
  153.   PRIMARY KEY  (privmsgs_id)
  154. ) TYPE=InnoDB;
  155. DROP TABLE IF EXISTS jforum_privmsgs_text;
  156. CREATE TABLE jforum_privmsgs_text (
  157. privmsgs_id INT NOT NULL,
  158. privmsgs_text TEXT,
  159. PRIMARY KEY ( privmsgs_id )
  160. ) Type=InnoDB;
  161. --
  162. -- Table structure for table 'jforum_ranks'
  163. --
  164. DROP TABLE IF EXISTS jforum_ranks;
  165. CREATE TABLE jforum_ranks (
  166.   rank_id INT NOT NULL auto_increment,
  167.   rank_title varchar(50) NOT NULL default '',
  168.   rank_min INT NOT NULL default '0',
  169.   rank_special tinyint(1) default NULL,
  170.   rank_image varchar(255) default NULL,
  171.   PRIMARY KEY  (rank_id)
  172. ) TYPE=InnoDB;
  173. --
  174. -- Table structure for table 'jforum_sessions'
  175. --
  176. DROP TABLE IF EXISTS jforum_sessions;
  177. CREATE TABLE jforum_sessions (
  178.   session_id varchar(150) NOT NULL default '',
  179.   session_user_id INT NOT NULL default '0',
  180.   session_start datetime default null,
  181.   session_time bigint default '0',
  182.   session_ip varchar(15) NOT NULL default '',
  183.   session_page int(11) NOT NULL default '0',
  184.   session_logged_int tinyint(1) default NULL,
  185.   INDEX idx_sessions_users (session_user_id)
  186. ) TYPE=InnoDB;
  187. --
  188. -- Table structure for table 'jforum_smilies'
  189. --
  190. DROP TABLE IF EXISTS jforum_smilies;
  191. CREATE TABLE jforum_smilies (
  192.   smilie_id INT NOT NULL auto_increment,
  193.   code varchar(50) NOT NULL default '',
  194.   url varchar(100) default NULL,
  195.   disk_name varchar(255),
  196.   PRIMARY KEY  (smilie_id)
  197. ) TYPE=InnoDB;
  198. --
  199. -- Table structure for table 'jforum_themes'
  200. --
  201. DROP TABLE IF EXISTS jforum_themes;
  202. CREATE TABLE jforum_themes (
  203.   themes_id INT NOT NULL auto_increment,
  204.   template_name varchar(30) NOT NULL default '',
  205.   style_name varchar(30) NOT NULL default '',
  206.   PRIMARY KEY  (themes_id)
  207. ) TYPE=InnoDB;
  208. --
  209. -- Table structure for table 'jforum_topics'
  210. --
  211. DROP TABLE IF EXISTS jforum_topics;
  212. CREATE TABLE jforum_topics (
  213.   topic_id INT NOT NULL auto_increment,
  214.   forum_id INT NOT NULL default '0',
  215.   topic_title varchar(100) NOT NULL default '',
  216.   user_id INT NOT NULL default '0',
  217.   topic_time datetime default null,
  218.   topic_views INT default '1',
  219.   topic_replies INT default '0',
  220.   topic_status tinyint(3) default '0',
  221.   topic_vote_id INT NOT NULL default '0',
  222.   topic_type tinyint(3) default '0',
  223.   topic_first_post_id INT default '0',
  224.   topic_last_post_id INT NOT NULL default '0',
  225.   topic_moved_id INT DEFAULT 0,
  226.   moderated TINYINT(1) DEFAULT '0',
  227.   PRIMARY KEY  (topic_id),
  228.   KEY (forum_id),
  229.   KEY(user_id),
  230.   KEY(topic_first_post_id),
  231.   KEY(topic_last_post_id),
  232.   KEY(topic_moved_id)
  233. ) TYPE=InnoDB;
  234. --
  235. -- Table structure for table 'jforum_topics_watch'
  236. --
  237. DROP TABLE IF EXISTS jforum_topics_watch;
  238. CREATE TABLE jforum_topics_watch (
  239.   topic_id INT NOT NULL,
  240.   user_id INT NOT NULL,
  241.   is_read tinyint(1) DEFAULT 1,
  242.   INDEX idx_topic (topic_id),
  243.   INDEX idx_user (user_id)
  244. ) TYPE=InnoDB;
  245. --
  246. -- Table structure for table 'jforum_users'
  247. --
  248. DROP TABLE IF EXISTS jforum_users;
  249. CREATE TABLE jforum_users (
  250.   user_id INT NOT NULL auto_increment,
  251.   user_active tinyint(1) default NULL,
  252.   username varchar(50) NOT NULL default '',
  253.   user_password varchar(32) NOT NULL default '',
  254.   user_session_time bigint default 0,
  255.   user_session_page INT NOT NULL default '0',
  256.   user_lastvisit datetime default null,
  257.   user_regdate datetime default null,
  258.   user_level tinyint(4) default NULL,
  259.   user_posts INT NOT NULL default '0',
  260.   user_timezone varchar(5) NOT NULL default '',
  261.   user_style tinyint(4) default NULL,
  262.   user_lang varchar(255) NOT NULL default '',
  263.   user_dateformat varchar(20) NOT NULL default '%d/%M/%Y %H:%i',
  264.   user_new_privmsg INT NOT NULL default '0',
  265.   user_unread_privmsg INT NOT NULL default '0',
  266.   user_last_privmsg datetime NULL,
  267.   user_emailtime datetime default NULL,
  268.   user_viewemail tinyint(1) default '0',
  269.   user_attachsig tinyint(1) default '1',
  270.   user_allowhtml tinyint(1) default '0',
  271.   user_allowbbcode tinyint(1) default '1',
  272.   user_allowsmilies tinyint(1) default '1',
  273.   user_allowavatar tinyint(1) default '1',
  274.   user_allow_pm tinyint(1) default '1',
  275.   user_allow_viewonline tinyint(1) default '1',
  276.   user_notify tinyint(1) default '1',
  277.   user_notify_always tinyint(1) default '0',
  278.   user_notify_text tinyint(1) default '0',
  279.   user_notify_pm tinyint(1) default '1',
  280.   user_popup_pm tinyint(1) default '1',
  281.   rank_id INT default 0,
  282.   user_avatar varchar(100) default NULL,
  283.   user_avatar_type tinyint(4) NOT NULL default '0',
  284.   user_email varchar(255) NOT NULL default '',
  285.   user_icq varchar(15) default NULL,
  286.   user_website varchar(255) default NULL,
  287.   user_from varchar(100) default NULL,
  288.   user_sig text,
  289.   user_sig_bbcode_uid varchar(10) default NULL,
  290.   user_aim varchar(255) default NULL,
  291.   user_yim varchar(255) default NULL,
  292.   user_msnm varchar(255) default NULL,
  293.   user_occ varchar(100) default NULL,
  294.   user_interests varchar(255) default NULL,
  295.   user_biography text DEFAULT NULL,
  296.   user_actkey varchar(32) default NULL,
  297.   gender char(1) default NULL,
  298.   themes_id INT default NULL,
  299.   deleted tinyint(1) default NULL,
  300.   user_viewonline tinyint(1) default '1',
  301.   security_hash varchar(32),
  302.   user_karma DOUBLE,
  303.   user_authhash VARCHAR(32),
  304.   PRIMARY KEY  (user_id)
  305. ) TYPE=InnoDB;
  306. --
  307. -- Table structure for table 'jforum_vote_desc'
  308. --
  309. DROP TABLE IF EXISTS jforum_vote_desc;
  310. CREATE TABLE jforum_vote_desc (
  311.   vote_id INT NOT NULL auto_increment,
  312.   topic_id INT NOT NULL default '0',
  313.   vote_text varchar(255) NOT NULL default '',
  314.   vote_start datetime NOT NULL,
  315.   vote_length int(11) NOT NULL default '0',
  316.   PRIMARY KEY  (vote_id),
  317.   INDEX(topic_id)
  318. ) TYPE=InnoDB;
  319. --
  320. -- Table structure for table 'jforum_vote_results'
  321. --
  322. DROP TABLE IF EXISTS jforum_vote_results;
  323. CREATE TABLE jforum_vote_results (
  324.   vote_id INT NOT NULL default '0',
  325.   vote_option_id tinyint(4) NOT NULL default '0',
  326.   vote_option_text varchar(255) NOT NULL default '',
  327.   vote_result int(11) NOT NULL default '0',
  328.   INDEX(vote_id)
  329. ) TYPE=InnoDB;
  330. --
  331. -- Table structure for table 'jforum_vote_voters'
  332. --
  333. DROP TABLE IF EXISTS jforum_vote_voters;
  334. CREATE TABLE jforum_vote_voters (
  335.   vote_id INT NOT NULL default '0',
  336.   vote_user_id INT NOT NULL default '0',
  337.   vote_user_ip varchar(15) NOT NULL default '',
  338.   INDEX(vote_id),
  339.   INDEX(vote_user_id)
  340. ) TYPE=InnoDB;
  341. --
  342. -- Table structure for table 'jforum_words'
  343. --
  344. DROP TABLE IF EXISTS jforum_words;
  345. CREATE TABLE jforum_words (
  346.   word_id INT NOT NULL auto_increment,
  347.   word varchar(100) NOT NULL default '',
  348.   replacement varchar(100) NOT NULL default '',
  349.   PRIMARY KEY  (word_id)
  350. ) TYPE=InnoDB;
  351. --
  352. -- Table structure for table 'jforum_karma'
  353. --
  354. DROP TABLE IF EXISTS jforum_karma;
  355. CREATE TABLE jforum_karma (
  356. karma_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  357. post_id INT NOT NULL,
  358. topic_id INT NOT NULL,
  359. post_user_id INT NOT NULL,
  360. from_user_id INT NOT NULL,
  361. points INT NOT NULL,
  362. rate_date datetime NULL,
  363. KEY(post_id),
  364. KEY(topic_id),
  365. KEY(post_user_id),
  366. KEY(from_user_id)
  367. ) TYPE=InnoDB;
  368. --
  369. -- Table structure for table 'jforum_bookmark'
  370. --
  371. DROP TABLE IF EXISTS jforum_bookmarks;
  372. CREATE TABLE jforum_bookmarks (
  373. bookmark_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  374. user_id INT NOT NULL,
  375. relation_id INT NOT NULL,
  376. relation_type INT NOT NULL,
  377. public_visible INT DEFAULT '1',
  378. title varchar(255),
  379. description varchar(255),
  380. INDEX book_idx_relation (relation_id),
  381. KEY(user_id)
  382. ) TYPE=InnoDB;
  383. -- 
  384. -- Table structure for table 'jforum_quota_limit'
  385. --
  386. DROP TABLE IF EXISTS jforum_quota_limit;
  387. CREATE TABLE jforum_quota_limit (
  388. quota_limit_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  389. quota_desc VARCHAR(50) NOT NULL,
  390. quota_limit INT NOT NULL,
  391. quota_type TINYINT(1) DEFAULT '1'
  392. ) TYPE=InnoDB;
  393. --
  394. -- Table structure for table 'jforum_extension_groups'
  395. --
  396. DROP TABLE IF EXISTS jforum_extension_groups;
  397. CREATE TABLE jforum_extension_groups (
  398. extension_group_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  399. name VARCHAR(100) NOT NULL,
  400. allow TINYINT(1) DEFAULT '1', 
  401. upload_icon VARCHAR(100),
  402. download_mode TINYINT(1) DEFAULT '1'
  403. ) TYPE=InnoDB;
  404. -- 
  405. -- Table structure for table 'jforum_extensions'
  406. --
  407. DROP TABLE IF EXISTS jforum_extensions;
  408. CREATE TABLE jforum_extensions (
  409. extension_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  410. extension_group_id INT NOT NULL,
  411. description VARCHAR(100),
  412. upload_icon VARCHAR(100),
  413. extension VARCHAR(10),
  414. allow TINYINT(1) DEFAULT '1',
  415. KEY(extension_group_id),
  416. INDEX(extension)
  417. ) TYPE=InnoDB;
  418. --
  419. -- Table structure for table 'jforum_attach'
  420. --
  421. DROP TABLE IF EXISTS jforum_attach;
  422. CREATE TABLE jforum_attach (
  423. attach_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  424. post_id INT,
  425. privmsgs_id INT,
  426. user_id INT NOT NULL,
  427. INDEX idx_att_post(post_id),
  428. INDEX idx_att_priv(privmsgs_id),
  429. INDEX idx_att_user(user_id)
  430. ) TYPE=InnoDB;
  431. -- 
  432. -- Table structure for table 'jforum_attach_desc'
  433. --
  434. DROP TABLE IF EXISTS jforum_attach_desc;
  435. CREATE TABLE jforum_attach_desc (
  436. attach_desc_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  437. attach_id INT NOT NULL,
  438. physical_filename VARCHAR(255) NOT NULL,
  439. real_filename VARCHAR(255) NOT NULL,
  440. download_count INT,
  441. description VARCHAR(255),
  442. mimetype VARCHAR(50),
  443. filesize INT,
  444. upload_time DATETIME,
  445. thumb TINYINT(1) DEFAULT '0',
  446. extension_id INT,
  447. INDEX idx_att_d_att(attach_id),
  448. INDEX idx_att_d_ext(extension_id)
  449. ) TYPE=InnoDB;
  450. --
  451. -- Table structure for table 'jforum_attach_quota'
  452. --
  453. DROP TABLE IF EXISTS jforum_attach_quota;
  454. CREATE TABLE jforum_attach_quota (
  455. attach_quota_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  456. group_id INT NOT NULL,
  457. quota_limit_id INT NOT NULL,
  458. KEY(group_id)
  459. ) TYPE=InnoDB;
  460. --
  461. -- Table structure for table 'jforum_banner'
  462. --
  463. DROP TABLE IF EXISTS jforum_banner;
  464. CREATE TABLE jforum_banner (
  465. banner_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  466. banner_name VARCHAR(90),
  467. banner_placement INT NOT NULL DEFAULT '0',
  468. banner_description VARCHAR(250),
  469. banner_clicks INT NOT NULL DEFAULT '0',
  470. banner_views INT NOT NULL DEFAULT '0',
  471. banner_url VARCHAR(250),
  472. banner_weight TINYINT(1) NOT NULL DEFAULT '50',
  473. banner_active TINYINT(1) NOT NULL DEFAULT '0',
  474. banner_comment VARCHAR(250),
  475. banner_type INT NOT NULL DEFAULT '0',
  476. banner_width INT NOT NULL DEFAULT '0',
  477. banner_height INT NOT NULL DEFAULT '0',
  478. KEY(banner_id)
  479. ) TYPE=InnoDB;
  480. --
  481. -- Table structure for table 'jforum_mail_integration'
  482. --
  483. DROP TABLE IF EXISTS jforum_mail_integration;
  484. CREATE TABLE jforum_mail_integration (
  485. forum_id INT NOT NULL,
  486. forum_email VARCHAR(100) NOT NULL,
  487. pop_username VARCHAR(100) NOT NULL,
  488. pop_password VARCHAR(100) NOT NULL,
  489. pop_host VARCHAR(100) NOT NULL,
  490. pop_port INT DEFAULT 110,
  491. pop_ssl TINYINT DEFAULT '0',
  492. KEY(forum_id)
  493. ) TYPE=InnoDB;
  494. --
  495. -- Table structure for table 'jforum_api'
  496. --
  497. DROP TABLE IF EXISTS jforum_api;
  498. CREATE TABLE jforum_api (
  499. api_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  500. api_key VARCHAR(32) NOT NULL,
  501. api_validity DATETIME NOT NULL
  502. ) TYPE=InnoDB;
  503. --
  504. -- Table structure for table 'jforum_moderation_log'
  505. -- 
  506. DROP TABLE IF EXISTS jforum_moderation_log;
  507. CREATE TABLE jforum_moderation_log (
  508. log_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  509. user_id INT NOT NULL,
  510. log_description TEXT NOT NULL,
  511. log_original_message TEXT,
  512. log_date DATETIME NOT NULL,
  513. log_type TINYINT DEFAULT 0,
  514. post_id INT DEFAULT 0,
  515. topic_id INT DEFAULT 0,
  516. post_user_id INT DEFAULT 0,
  517. KEY(user_id),
  518. KEY(post_user_id)
  519. ) TYPE=InnoDB;