|
From: Jon O. <jon...@us...> - 2006-07-03 09:17:06
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21756/modules/mx_kb Modified Files: db_install.php db_upgrade.php Log Message: Working... Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_install.php,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** db_install.php 27 Jun 2006 21:37:26 -0000 1.40 --- db_install.php 3 Jul 2006 09:17:01 -0000 1.41 *************** *** 55,83 **** "DROP TABLE IF EXISTS " . $mx_table_prefix . "kb_votes ", - "CREATE TABLE " . $mx_table_prefix . "kb_articles ( - article_id mediumint(8) unsigned NOT NULL auto_increment, - article_category_id mediumint(8) unsigned NOT NULL default '0', - article_title varchar(255) binary NOT NULL default '', - article_description varchar(255) binary NOT NULL default '', - article_date varchar(255) binary NOT NULL default '', - article_author_id mediumint(8) NOT NULL, - username VARCHAR(255), - bbcode_uid varchar(10) binary NOT NULL default '', - article_body text NOT NULL, - article_type mediumint(8) unsigned NOT NULL default '0', - approved tinyint(1) unsigned NOT NULL default '0', - topic_id mediumint(8) unsigned NOT NULL default '0', - views BIGINT(8) NOT NULL DEFAULT '0', - article_rating double(6,4) NOT NULL default '0.0000', - article_totalvotes int(255) NOT NULL default '0', - KEY article_id (article_id) - )", - "CREATE TABLE " . $mx_table_prefix . "kb_categories ( ! category_id mediumint(8) unsigned NOT NULL auto_increment, ! category_name VARCHAR(255) binary NOT NULL, category_details text, ! parent mediumint(8) unsigned, ! cat_order mediumint(8) unsigned NOT NULL, cat_allow_comments tinyint(2) NOT NULL default '-1', --- 55,64 ---- "DROP TABLE IF EXISTS " . $mx_table_prefix . "kb_votes ", "CREATE TABLE " . $mx_table_prefix . "kb_categories ( ! category_id int(10) NOT NULL auto_increment, ! category_name text, category_details text, ! parent int(50) default NULL, ! cat_order int(50) default NULL, cat_allow_comments tinyint(2) NOT NULL default '-1', *************** *** 118,126 **** auth_moderator_groups smallint(5) NOT NULL default '0', ! KEY category_id (category_id) )", "INSERT INTO " . $mx_table_prefix . "kb_categories VALUES (1, 'Test Category', 'Just a test category', '0', '10', '-1', '-1','-1','-1','-1','-1','-1','-1', '-1', '0', '', '0', '0', '0', '0', '0', '0', '2', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0' )", "CREATE TABLE " . $mx_table_prefix . "kb_config ( config_name VARCHAR(255) NOT NULL default '', --- 99,130 ---- auth_moderator_groups smallint(5) NOT NULL default '0', ! PRIMARY KEY (category_id), ! KEY cat_order (cat_order) )", "INSERT INTO " . $mx_table_prefix . "kb_categories VALUES (1, 'Test Category', 'Just a test category', '0', '10', '-1', '-1','-1','-1','-1','-1','-1','-1', '-1', '0', '', '0', '0', '0', '0', '0', '0', '2', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0' )", + "CREATE TABLE " . $mx_table_prefix . "kb_articles ( + article_id mediumint(8) unsigned NOT NULL auto_increment, + article_title varchar(255) binary NOT NULL default '', + article_description varchar(255) binary NOT NULL default '', + article_category_id mediumint(8) unsigned NOT NULL default '0', + approved tinyint(1) unsigned NOT NULL default '0', + + article_body text NOT NULL, + bbcode_uid varchar(10) binary NOT NULL default '', + article_type mediumint(8) unsigned NOT NULL default '0', + + article_date varchar(255) binary NOT NULL default '', + article_author_id mediumint(8) NOT NULL, + username VARCHAR(255), + topic_id mediumint(8) unsigned NOT NULL default '0', + views BIGINT(8) NOT NULL DEFAULT '0', + article_rating double(6,4) NOT NULL default '0.0000', + article_totalvotes int(255) NOT NULL default '0', + + PRIMARY KEY (article_id) + )", + "CREATE TABLE " . $mx_table_prefix . "kb_config ( config_name VARCHAR(255) NOT NULL default '', *************** *** 129,132 **** --- 133,185 ---- )", + // -------------------------------------------------------- + // Table structure for table `phpbb_pa_comments` + "CREATE TABLE " . $mx_table_prefix . "kb_comments ( + comments_id int(10) NOT NULL auto_increment, + article_id int(10) NOT NULL default '0', + comments_text text NOT NULL, + comments_title text NOT NULL, + comments_time int(50) NOT NULL default '0', + comment_bbcode_uid varchar(10) default NULL, + poster_id mediumint(8) NOT NULL default '0', + PRIMARY KEY (comments_id), + KEY comments_id (comments_id), + FULLTEXT KEY comment_bbcode_uid (comment_bbcode_uid) + )", + + "CREATE TABLE " . $mx_table_prefix . "kb_types ( + id mediumint(8) unsigned NOT NULL auto_increment, + type varchar(255) binary DEFAULT '' NOT NULL, + KEY id (id) + )", + + "INSERT INTO " . $mx_table_prefix . "kb_types VALUES (1, 'Test Type 1')", + + "CREATE TABLE " . $mx_table_prefix . "kb_votes ( + votes_ip varchar(50) NOT NULL default '0', + votes_userid varchar(50) NOT NULL default '0', + votes_file int(50) NOT NULL default '0' + )", + + // -------------------------------------------------------- + // Table structure for table `phpbb_pa_custom` + "CREATE TABLE " . $mx_table_prefix . "kb_custom ( + custom_id int(50) NOT NULL auto_increment, + custom_name text NOT NULL, + custom_description text NOT NULL, + data text NOT NULL, + field_order int(20) NOT NULL default '0', + field_type tinyint(2) NOT NULL default '0', + regex varchar(255) NOT NULL default '', + PRIMARY KEY (custom_id) + )", + // -------------------------------------------------------- + // Table structure for table `phpbb_pa_customdata` + "CREATE TABLE " . $mx_table_prefix . "kb_customdata ( + customdata_file int(50) NOT NULL default '0', + customdata_custom int(50) NOT NULL default '0', + data text NOT NULL + )", + // // Insert Configs *************** *** 198,250 **** "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('notify_group', '0')", // admin_id - // -------------------------------------------------------- - // Table structure for table `phpbb_pa_comments` - "CREATE TABLE " . $mx_table_prefix . "kb_comments ( - comments_id int(10) NOT NULL auto_increment, - article_id int(10) NOT NULL default '0', - comments_text text NOT NULL, - comments_title text NOT NULL, - comments_time int(50) NOT NULL default '0', - comment_bbcode_uid varchar(10) default NULL, - poster_id mediumint(8) NOT NULL default '0', - PRIMARY KEY (comments_id), - KEY comments_id (comments_id), - FULLTEXT KEY comment_bbcode_uid (comment_bbcode_uid) - )", - - "CREATE TABLE " . $mx_table_prefix . "kb_types ( - id mediumint(8) unsigned NOT NULL auto_increment, - type varchar(255) binary DEFAULT '' NOT NULL, - KEY id (id) - )", - - "INSERT INTO " . $mx_table_prefix . "kb_types VALUES (1, 'Test Type 1')", - - "CREATE TABLE " . $mx_table_prefix . "kb_votes ( - votes_ip varchar(50) NOT NULL default '0', - votes_userid varchar(50) NOT NULL default '0', - votes_file int(50) NOT NULL default '0' - )", - - // -------------------------------------------------------- - // Table structure for table `phpbb_pa_custom` - "CREATE TABLE " . $mx_table_prefix . "kb_custom ( - custom_id int(50) NOT NULL auto_increment, - custom_name text NOT NULL, - custom_description text NOT NULL, - data text NOT NULL, - field_order int(20) NOT NULL default '0', - field_type tinyint(2) NOT NULL default '0', - regex varchar(255) NOT NULL default '', - PRIMARY KEY (custom_id) - )", - // -------------------------------------------------------- - // Table structure for table `phpbb_pa_customdata` - "CREATE TABLE " . $mx_table_prefix . "kb_customdata ( - customdata_file int(50) NOT NULL default '0', - customdata_custom int(50) NOT NULL default '0', - data text NOT NULL - )" - ); --- 251,254 ---- Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_upgrade.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** db_upgrade.php 28 Jun 2006 13:58:07 -0000 1.33 --- db_upgrade.php 3 Jul 2006 09:17:01 -0000 1.34 *************** *** 408,412 **** --- 408,418 ---- $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY notify_group mediumint(8) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY number_articles mediumint(8) NOT NULL default '-1' "; + + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY category_id int(10) NOT NULL auto_increment "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY category_name text "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY category_details text "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY parent int(50) default NULL "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY cat_order int(50) default NULL "; + } else |