You are here

function boxes_schema in Boxes 6

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

Implemenation of hook_schema().

File

./boxes.install, line 20

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 {blocks}.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;
}