You are here

function cpn_update_7106 in Code per Node 7

Add the 'noscript' field to the {block} table.

File

./cpn.install, line 423
Installation, schema and update hook implementations.

Code

function cpn_update_7106() {
  $table = 'block';
  $field = 'noscript';
  if (!db_field_exists($table, $field)) {
    $spec = array(
      'type' => 'text',
      'not null' => FALSE,
      'size' => 'big',
    );
    db_add_field($table, $field, $spec);
    return t('Added the "noscript" field to the {block} table.');
  }
  else {
    return t('The "noscript" field already exists in the {block} table.');
  }
}