function boxes_schema in Boxes 7.2
Same name and namespace in other branches
- 6 boxes.install \boxes_schema()
- 7 boxes.install \boxes_schema()
Implements hook_schema().
File
- ./
boxes.install, line 11 - Boxes installation routines
Code
function boxes_schema() {
$schema['box'] = array(
'description' => 'Stores box items.',
'fields' => array(
'bid' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => 'Primary Key: Unique box item ID.',
),
'delta' => array(
'description' => "The box {block}.delta.",
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
'label' => array(
'description' => 'The Displays in the Admin page.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'title' => array(
'description' => 'The human-readable name of this box.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'type' => array(
'description' => 'The {box_type}.type of this box.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'view_mode' => array(
'description' => 'The View mode to use as the box.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => 'default',
),
'data' => array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
'description' => 'A serialized array of additional data related to this box.',
),
),
'foreign keys' => array(
'type' => array(
'table' => 'box_type',
'columns' => array(
'type' => 'type',
),
),
),
'primary key' => array(
'bid',
),
'unique keys' => array(
'delta' => array(
'delta',
),
),
);
return $schema;
}