function update_add_cache_columns

Adds tags, checksum_invalidations, checksum_deletions to a cache table.

Parameters

string $table: Name of the cache table.

1 call to update_add_cache_columns()
update_prepare_d8_bootstrap in drupal/core/includes/update.inc
Performs extra steps required to bootstrap when using a Drupal 7 database.

File

drupal/core/includes/update.inc, line 1511
Drupal database update API.

Code

function update_add_cache_columns($table) {
  if (db_table_exists($table) && !db_field_exists($table, 'tags')) {
    db_add_field($table, 'tags', array(
      'description' => 'Space-separated list of cache tags for this entry.',
      'type' => 'text',
      'size' => 'big',
      'not null' => FALSE,
    ));
    db_add_field($table, 'checksum_invalidations', array(
      'description' => 'The tag invalidation sum when this entry was saved.',
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
    ));
    db_add_field($table, 'checksum_deletions', array(
      'description' => 'The tag deletion sum when this entry was saved.',
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
    ));
  }
}