Skip to:
Content

BuddyPress.org

Changeset 2668 for trunk/bp-activity.php


Ignore:
Timestamp:
02/11/2010 01:13:14 PM (14 years ago)
Author:
apeatling
Message:

Fixes #1884

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity.php

    r2666 r2668  
    1818
    1919    /* Rename the old user activity cached table if needed. */
    20     if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$wpdb->base_prefix}bp_activity_user_activity_cached%'" ) ) {
     20    if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$wpdb->base_prefix}bp_activity_user_activity_cached%'" ) )
    2121        $wpdb->query( "RENAME TABLE {$wpdb->base_prefix}bp_activity_user_activity_cached TO {$bp->activity->table_name}" );
    22     }
    2322
    2423    /* Rename fields from pre BP 1.2 */
    2524    if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$bp->activity->table_name}%'" ) ) {
    26         $wpdb->query( "ALTER TABLE {$bp->activity->table_name} CHANGE component_action type varchar(75) NOT NULL" );
    27         $wpdb->query( "ALTER TABLE {$bp->activity->table_name} CHANGE component_name component varchar(75) NOT NULL" );
     25        if ( $wpdb->get_var( "SHOW COLUMNS FROM {$bp->activity->table_name} LIKE 'component_action'" ) )
     26            $wpdb->query( "ALTER TABLE {$bp->activity->table_name} CHANGE component_action type varchar(75) NOT NULL" );
     27
     28        if ( $wpdb->get_var( "SHOW COLUMNS FROM {$bp->activity->table_name} LIKE 'component_name'" ) )
     29            $wpdb->query( "ALTER TABLE {$bp->activity->table_name} CHANGE component_name component varchar(75) NOT NULL" );
    2830    }
    2931
Note: See TracChangeset for help on using the changeset viewer.