function entity_block_schema in Entity Blocks 7
Implements hook_schema().
File
- ./
entity_block.install, line 10 - Install hooks for entity_block.
Code
function entity_block_schema() {
$schema = array();
$schema['entity_block'] = array(
'description' => 'Base table for entity block.',
'fields' => array(
'entity_block_id' => array(
'description' => 'Primary key of an entity block.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'bundle' => array(
'description' => 'The entity bundle',
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
),
'title' => array(
'description' => 'The entity block title',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'target_entity_type' => array(
'description' => 'The target entity type',
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
),
'target_bundle' => array(
'description' => 'The target entity bundle',
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
),
'target_view_mode' => array(
'description' => 'The target entity view mode',
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
),
'target_entity_id' => array(
'description' => 'The target entity id',
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
'default' => NULL,
),
),
'primary key' => array(
'entity_block_id',
),
);
return $schema;
}