Skip to:
Content

BuddyPress.org

Ticket #7500: 7500.02.patch

File 7500.02.patch, 2.2 KB (added by r-a-y, 8 years ago)
  • src/bp-core/admin/bp-core-admin-schema.php

     
    143143                                KEY type (type),
    144144                                KEY mptt_left (mptt_left),
    145145                                KEY mptt_right (mptt_right),
    146                                 KEY hide_sitewide (hide_sitewide),
    147                                 KEY is_spam (is_spam)
     146                                KEY component_type_user_id_date_recorded (component, type, user_id, date_recorded)
    148147                        ) {$charset_collate};";
    149148
    150149        $sql[] = "CREATE TABLE {$bp_prefix}bp_activity_meta (
  • src/bp-core/bp-core-update.php

     
    268268                if ( $raw_db_version < 11105 ) {
    269269                        bp_update_to_2_7();
    270270                }
     271
     272                // Version 2.9.0.
     273                if ( $raw_db_version < 11590 ) {
     274                        bp_update_to_2_9();
     275                }
    271276        }
    272277
    273278        /* All done! *************************************************************/
     
    313318                        }
    314319                }
    315320        }
     321
     322        // 2.9.0: Drop some activity indexes.
     323        if ( $raw_db_version < 11590 ) {
     324                $activity_db = bp_core_get_table_prefix() . 'bp_activity';
     325                $wpdb->hide_errors();
     326                if ( $wpdb->query( $wpdb->prepare( "SHOW TABLES LIKE %s", bp_esc_like( $activity_db ) ) ) ) {
     327                        $wpdb->query( "ALTER TABLE {$activity_db} DROP INDEX hide_sitewide" );
     328                        $wpdb->query( "ALTER TABLE {$activity_db} DROP INDEX is_spam" );
     329                }
     330                $wpdb->show_errors();
     331        }
    316332}
    317333
    318334/** Upgrade Routines **********************************************************/
     
    543559}
    544560
    545561/**
     562 * 2.9.0 update routine.
     563 *
     564 * - Add new index for activity DB table.
     565 *
     566 * @since 2.9.0
     567 */
     568function bp_update_to_2_9() {
     569        bp_core_install_activity_streams();
     570}
     571
     572/**
    546573 * Updates the component field for new_members type.
    547574 *
    548575 * @since 2.2.0
  • src/class-buddypress.php

     
    294294                /** Versions **********************************************************/
    295295
    296296                $this->version    = '2.9.0-alpha';
    297                 $this->db_version = 11105;
     297                $this->db_version = 11591;
    298298
    299299                /** Loading ***********************************************************/
    300300