You are here

function cpn_schema_alter in Code per Node 7

Same name and namespace in other branches
  1. 6 cpn.install \cpn_schema_alter()

Implements hook_schema_alter().

2 calls to cpn_schema_alter()
cpn_alter_block in ./cpn.install
Adds CPN fields to block table, as defined in cpn_schema_alter().
cpn_unalter_block in ./cpn.install
Drops CPN fields from block table, as defined in cpn_schema_alter().

File

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

Code

function cpn_schema_alter(&$schema) {

  // If block table exists, alter its schema. Use this instead of module_exists
  // because the Block module might be disabled.
  if (db_table_exists('block')) {
    $schema['block']['fields']['css'] = array(
      'type' => 'text',
      'not null' => FALSE,
      'size' => 'big',
    );
    $schema['block']['fields']['js'] = array(
      'type' => 'text',
      'not null' => FALSE,
      'size' => 'big',
    );
    $schema['block']['fields']['noscript'] = array(
      'type' => 'text',
      'not null' => FALSE,
      'size' => 'big',
    );
  }
}