Update schema making the varchar columns char. Change utf8_bin to ascii_bin.

Fichier

./advagg.install, line 518

Code

function advagg_update_7207(&$sandbox) {
    $tables = array(
        'advagg_aggregates' => array(
            'aggregate_filenames_hash',
            'filename_hash',
        ),
        'advagg_aggregates_versions' => array(
            'aggregate_filenames_hash',
            'aggregate_contents_hash',
        ),
        'advagg_files' => array(
            'filename_hash',
            'content_hash',
        ),
    );
    $schema = advagg_schema();
    foreach ($tables as $table => $fields) {
        foreach ($fields as $field) {
            // Change varchar to char.
            db_change_field($table, $field, $field, $schema[$table]['fields'][$field]);
        }
        // Change utf8_bin to ascii_bin.
        advagg_install_change_table_collation($table, $fields, 'ascii_bin', $schema[$table]['fields']);
    }
    return t('AdvAgg Tables converted from varchar to char and utf8_bin to ascii_bin.');
}