Update schema making it match the definition.

File

./advagg.install, line 560

Code

function advagg_update_7209(&$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('Database schema was adjusted to match what is listed in advagg_schema.');
}