function wp_get_db_schema( $scope = 'all',
$blog_id = null
) { global $wpdb;
$charset_collate =
$wpdb->
get_charset_collate();
if ( $blog_id &&
(int) $blog_id !==
$wpdb->blogid
) { $old_blog_id =
$wpdb->
set_blog_id( $blog_id );
} // Engage multisite if in the middle of turning it on from network.php.
$is_multisite =
is_multisite() || ( defined( 'WP_INSTALLING_NETWORK'
) && WP_INSTALLING_NETWORK
);
/*
* Indexes have a maximum size of 767 bytes. Historically, we haven't need to be concerned about that.
* As of 4.2, however, we moved to utf8mb4, which uses 4 bytes per character. This means that an index which
* used to have room for floor(767/3) = 255 characters, now only has room for floor(767/4) = 191 characters.
*/
$max_index_length = 191;