function block_update_8001

Creates table {block_language} for language visibility settings per block.

Related topics

File

drupal/core/modules/block/block.install, line 53
Install, update and uninstall functions for the block module.

Code

function block_update_8001() {
  $schema = array(
    'description' => 'Sets up display criteria for blocks based on langcode.',
    'fields' => array(
      'module' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'description' => "The block's origin module, from {block}.module.",
      ),
      'delta' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'description' => "The block's unique delta within module, from {block}.delta.",
      ),
      'type' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'description' => "Language type name. Applied to filter the block by that type.",
      ),
      'langcode' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'description' => "The machine-readable name of this language from {language}.langcode.",
      ),
    ),
    'primary key' => array(
      'module',
      'delta',
      'type',
      'langcode',
    ),
  );
  db_create_table('block_language', $schema);
}