function fieldable_panels_panes_schema in Fieldable Panels Panes (FPP) 7
Implements hook_schema().
File
- ./
fieldable_panels_panes.install, line 49 - Fieldable Panels Panes install file.
Code
function fieldable_panels_panes_schema() {
$schema = array();
$schema['fieldable_panels_panes'] = array(
'description' => 'Entity table for panel pane content with fields.',
'fields' => array(
'fpid' => array(
'description' => 'The primary identifier for the entity.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'vid' => array(
'description' => 'The current version in use for this entity.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'bundle' => array(
'description' => 'The bundle of the entity.',
'type' => 'varchar',
'length' => 255,
),
'title' => array(
'description' => 'The title of the entity.',
'type' => 'varchar',
'length' => 255,
),
'link' => array(
'description' => 'Whether or not this entity title will link to another page.',
'type' => 'int',
'size' => 'tiny',
),
'path' => array(
'description' => 'The path the title should link to.',
'type' => 'varchar',
'length' => 255,
),
'reusable' => array(
'description' => 'Whether or not this entity will appear in the Add Content dialog.',
'type' => 'int',
'size' => 'tiny',
),
'admin_title' => array(
'description' => 'The title as it will appear in the Add Content dialog.',
'type' => 'varchar',
'length' => 255,
),
'admin_description' => array(
'description' => 'The description it will appear in the Add Content dialog with.',
'type' => 'text',
),
'category' => array(
'description' => 'The category under which it will appear in the Add Content dialog.',
'type' => 'text',
),
'view_access' => array(
'type' => 'text',
'size' => 'big',
'description' => 'Access rules to describe if the user has view access to this entity.',
'serialize' => TRUE,
'object default' => array(),
),
'edit_access' => array(
'type' => 'text',
'size' => 'big',
'description' => 'Access rules to describe if the user has view access to this entity.',
'serialize' => TRUE,
'object default' => array(),
),
'created' => array(
'description' => 'The Unix timestamp when the entity was created.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'changed' => array(
'description' => 'The Unix timestamp when the entity was most recently saved.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'uuid' => array(
'type' => 'char',
'length' => 36,
'default' => '',
'description' => 'The Universally Unique Identifier.',
),
'language' => array(
'description' => 'The {languages}.language of this entity.',
'type' => 'varchar',
'length' => 12,
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array(
'fpid',
),
'indexes' => array(
'reusable' => array(
'reusable',
),
),
);
$schema['fieldable_panels_panes_revision'] = array(
'description' => 'Entity revision table for panel pane content with fields.',
'fields' => array(
'fpid' => array(
'description' => 'The id this revision belongs to',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'vid' => array(
'description' => 'The primary identifier for this version.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'timestamp' => array(
'description' => 'The Unix timestamp when the revision was most recently saved.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'uid' => array(
'description' => 'The author of the revision.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'title' => array(
'description' => 'The title of the entity.',
'type' => 'varchar',
'length' => 255,
),
'log' => array(
'description' => 'A log message associated with the revision.',
'type' => 'text',
'size' => 'big',
),
'vuuid' => array(
'type' => 'char',
'length' => 36,
'default' => '',
'description' => 'The Universally Unique Identifier.',
),
),
'primary key' => array(
'vid',
),
'indexes' => array(
'fpid' => array(
'fpid',
'vid',
),
),
);
$schema['fieldable_panels_pane_type'] = array(
'description' => 'Entity bundle table for panel pane content.',
'fields' => array(
'name' => array(
'description' => 'The machine-readable name of this type.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'title' => array(
'description' => 'The human-readable name of this type.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'translatable' => TRUE,
),
'description' => array(
'description' => 'A brief description of this type.',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
),
'export' => array(
'admin_title' => 'title',
'admin_description' => 'description',
'api' => array(
'owner' => 'fieldable_panels_panes',
'api' => 'fieldable_panels_pane_type',
'minimum_version' => 1,
'current_version' => 1,
),
),
'primary key' => array(
'name',
),
);
// Optional cache table for entitycache support.
$schema['cache_entity_fieldable_panels_pane'] = drupal_get_schema_unprocessed('system', 'cache');
$schema['cache_entity_fieldable_panels_pane']['description'] = 'Cache table used to store fieldable_panels_pane entity records.';
return $schema;
}