$iqueries =
apply_filters( 'dbdelta_insert_queries',
$iqueries );
$text_fields = array
( 'tinytext', 'text', 'mediumtext', 'longtext'
);
$blob_fields = array
( 'tinyblob', 'blob', 'mediumblob', 'longblob'
);
$int_fields = array
( 'tinyint', 'smallint', 'mediumint', 'int', 'integer', 'bigint'
);
$global_tables =
$wpdb->
tables( 'global'
);
$db_version =
$wpdb->
db_version();
$db_server_info =
$wpdb->
db_server_info();
foreach ( $cqueries as $table =>
$qry ) { // Upgrade global tables only for the main site. Don't upgrade at all if conditions are not optimal.
if ( in_array( $table,
$global_tables, true
) && !
wp_should_upgrade_global_tables() ) { unset( $cqueries[ $table ],
$for_update[ $table ] );
continue;
} // Fetch the table column structure from the database.
$suppress =
$wpdb->
suppress_errors();
$tablefields =
$wpdb->
get_results( "DESCRIBE {
$table};"
);