function picture_schema in Picture 7.2
Same name and namespace in other branches
- 7 picture.install \picture_schema()
Implements hook_schema().
File
- ./
picture.install, line 10 - Install/schema hooks for the picture module.
Code
function picture_schema() {
$schema = array();
$schema['picture_mapping'] = array(
'description' => 'Responsible images and styles mappings to breakpoints',
'fields' => array(
'id' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => 'The internal identifier for this mapping',
'no export' => TRUE,
),
'label' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The machine name of the mapping',
),
'machine_name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'description' => 'The machine name of the mapping',
),
'breakpoint_group' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'description' => 'The group this mapping belongs to',
),
'mapping' => array(
'type' => 'blob',
'not null' => TRUE,
'description' => 'The mappings linked to the breakpoints group',
'serialize' => TRUE,
),
),
'primary key' => array(
'id',
),
'export' => array(
'key' => 'machine_name',
'key name' => 'machine_name',
'primary key' => 'id',
'identifier' => 'picture_mapping',
'admin_title' => 'label',
'default hook' => 'default_picture_mapping',
'object factory' => 'picture_mapping_object_factory',
'create callback' => 'picture_mapping_create',
'save callback' => 'picture_mapping_save',
'export callback' => 'picture_mapping_export',
'api' => array(
'owner' => 'picture',
'api' => 'default_picture_mapping',
'minimum_version' => 2,
'current_version' => 2,
),
),
);
return $schema;
}