You are here

function boxes_schema in Boxes 7

Same name and namespace in other branches
  1. 6 boxes.install \boxes_schema()
  2. 7.2 boxes.install \boxes_schema()

Implemenation of hook_schema().

File

./boxes.install, line 13
Install, update and uninstall functions for the boxes module.

Code

function boxes_schema() {
  $schema = array();
  $schema['box'] = array(
    'description' => 'Stores contents of custom-made blocks.',
    'fields' => array(
      'delta' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'description' => "The block's {block}.delta.",
      ),
      'plugin_key' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'description' => "The plugin responsible for this block.",
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'description' => "Block title.",
      ),
      'description' => array(
        'type' => 'varchar',
        'length' => 255,
        'default' => '',
        'description' => 'Block description.',
      ),
      'options' => array(
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'big',
        'serialize' => TRUE,
        'description' => 'Block content configuration.',
      ),
    ),
    'primary key' => array(
      'delta',
    ),
    'export' => array(
      'key' => 'delta',
      'identifier' => 'box',
      'api' => array(
        'owner' => 'boxes',
        'api' => 'box',
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
  );
  return $schema;
}