You are here

function ddblock_schema in Dynamic display block 7

Same name and namespace in other branches
  1. 6 ddblock.install \ddblock_schema()

Implements hook_schema().

File

./ddblock.install, line 11
Installation file to implement the dynamic display block schema

Code

function ddblock_schema() {
  $schema['ddblock_block'] = array(
    'description' => 'The base tables for ddblocks.',
    'fields' => array(
      'delta' => array(
        'description' => 'Number of the block.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'title' => array(
        'description' => 'Title of the block.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'module' => array(
        'description' => 'The name of the module that provided the original block.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'delta_original' => array(
        'description' => 'The delta of the original block.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '0',
      ),
      'enabled' => array(
        'description' => 'Support for dynamic display block enabled.',
        'type' => 'int',
        'size' => 'tiny',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'delta',
    ),
  );
  return $schema;
}