function upgrade_230() { global $wp_current_db_version,
$wpdb;
if ( $wp_current_db_version < 5200
) { populate_roles_230();
} // Convert categories to terms.
$tt_ids = array
();
$have_tags = false;
$categories =
$wpdb->
get_results( "SELECT * FROM
$wpdb->categories ORDER BY cat_ID"
);
foreach ( $categories as $category ) { $term_id =
(int) $category->cat_ID;
$name =
$category->cat_name;
$description =
$category->category_description;
$slug =
$category->category_nicename;