Skip to:
Content

BuddyPress.org

Changeset 948


Ignore:
Timestamp:
01/28/2009 07:56:28 PM (18 years ago)
Author:
apeatling
Message:

Fixes #406

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-messages.php

    r938 r948  
    44define ( 'BP_MESSAGES_IS_INSTALLED', 1 );
    55define ( 'BP_MESSAGES_VERSION', '1.0b1' );
    6 define ( 'BP_MESSAGES_DB_VERSION', '937' );
     6define ( 'BP_MESSAGES_DB_VERSION', '948' );
    77
    88include_once( 'bp-messages/bp-messages-classes.php' );
     
    2525        if ( !empty($wpdb->charset) )
    2626                $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
     27               
     28        // Remove indexes so we can alter the field types for these fields.
     29        $wpdb->query( "ALTER TABLE ". $bp['messages']['table_name_threads'] . " DROP INDEX message_ids " );
     30        $wpdb->query( "ALTER TABLE ". $bp['messages']['table_name_threads'] . " DROP INDEX sender_ids " );
    2731       
    2832        $sql[] = "CREATE TABLE ". $bp['messages']['table_name_threads'] ." (
  • trunk/bp-xprofile.php

    r943 r948  
    44/* Set the version number */
    55define ( 'BP_XPROFILE_VERSION', '1.0b1' );
    6 define ( 'BP_XPROFILE_DB_VERSION', '937' );
     6define ( 'BP_XPROFILE_DB_VERSION', '948' );
    77
    88/* Database access classes and functions */
     
    9292        ) {$charset_collate};";
    9393       
    94         $sql[] = "INSERT INTO ". $bp['profile']['table_name_groups'] . " VALUES ( 1, '" . get_site_option( 'bp-xprofile-base-group-name' ) . "', '', 0 );";
    95        
    96         $sql[] = "INSERT INTO ". $bp['profile']['table_name_fields'] . " (
    97                                 id, group_id, parent_id, type, name, description, is_required, field_order, option_order, order_by, is_public, can_delete
    98                           ) VALUES (
    99                                 1, 1, 0, 'textbox', '" . get_site_option( 'bp-xprofile-fullname-field-name' ) . "', '', 1, 1, 0, '', 1, 0
    100                           );";
     94        if ( get_site_option( 'bp-xprofile-db-version' ) == '' ) {
     95                $sql[] = "INSERT INTO ". $bp['profile']['table_name_groups'] . " VALUES ( 1, '" . get_site_option( 'bp-xprofile-base-group-name' ) . "', '', 0 );";
     96       
     97                $sql[] = "INSERT INTO ". $bp['profile']['table_name_fields'] . " (
     98                                        id, group_id, parent_id, type, name, description, is_required, field_order, option_order, order_by, is_public, can_delete
     99                                  ) VALUES (
     100                                        1, 1, 0, 'textbox', '" . get_site_option( 'bp-xprofile-fullname-field-name' ) . "', '', 1, 1, 0, '', 1, 0
     101                                  );";
     102        }
    101103       
    102104        require_once( ABSPATH . 'wp-admin/upgrade-functions.php' );
Note: See TracChangeset for help on using the changeset viewer.