Changeset 590 for trunk/xpressme_integration_kit/include/onupdate.php
- Timestamp:
- Apr 28, 2010, 4:20:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/include/onupdate.php
r583 r590 223 223 } 224 224 225 $d3forum_link = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_d3forum_link' ; 225 226 if (! enhanced_table_check($mydirname,'d3forum_link')){ 226 $d3forum_link = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_d3forum_link' ;227 227 $queries ="CREATE TABLE $d3forum_link ( 228 228 comment_ID bigint(20) unsigned NOT NULL default '0', 229 229 post_id int(10) unsigned NOT NULL default '0' , 230 230 wp_post_ID bigint(20) unsigned NOT NULL default '0', 231 forum_id bigint(20) unsigned NOT NULL default '0', 232 blog_id bigint(20) unsigned NOT NULL default '0', 231 233 KEY post_id (post_id) 232 234 )TYPE=MyISAM"; 233 235 $db->queryF( $queries ) ; 234 236 $msgs[] = "$d3forum_link table of XPressME was made."; 237 } else { 238 if (!is_found_table_column($d3forum_link,'forum_id')){ 239 $queries ="ALTER TABLE $d3forum_link ADD forum_id bigint(20) unsigned NOT NULL default '0' AFTER wp_post_ID"; 240 $db->queryF( $queries ) ; 241 $msgs[] = "$d3forum_link ADD forum_id ."; 242 // The table is repaired. 243 // $update_sql = "UPDATE $d3forum_link SET forum_id = 1 WHERE(forum_id IS NULL OR forum_id < 1)"; 244 // $db->queryF( $update_sql ) ; 245 } 246 if (!is_found_table_column($d3forum_link,'blog_id')){ 247 $queries ="ALTER TABLE $d3forum_link ADD blog_id bigint(20) unsigned NOT NULL default '0' AFTER forum_id"; 248 $db->queryF( $queries ) ; 249 $msgs[] = "$d3forum_link ADD blog_id ."; 250 // The table is repaired. 251 $update_sql = "UPDATE $d3forum_link SET blog_id = 1 WHERE(blog_id IS NULL OR blog_id < 1)"; 252 $db->queryF( $update_sql ) ; 253 } 235 254 } 236 255
Note: See TracChangeset
for help on using the changeset viewer.