You are here

function flexslider_picture_schema in Picture 7.2

Same name and namespace in other branches
  1. 7 flexslider_picture/flexslider_picture.install \flexslider_picture_schema()

Implements hook_schema().

File

flexslider_picture/flexslider_picture.install, line 11
Install, update and schema hooks for the FlexSlider Picture module.

Code

function flexslider_picture_schema() {
  $schema = array();
  $schema['flexslider_picture_optionset'] = array(
    'description' => 'Saves which flexslider optionsets use picture mappings and which use image styles.',
    'export' => array(
      'key' => 'flexslider_optionset',
      'identifier' => 'flexslider_picture_optionset',
      'api' => array(
        'owner' => 'flexslider_picture',
        'api' => 'flexslider_picture_optionset',
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'The internal identifier.',
        'no export' => TRUE,
      ),
      'flexslider_optionset' => array(
        'description' => 'The machine-readable option set name.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'imagestyle_type' => array(
        'description' => 'One of image_style or picture_mapping.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'mapping' => array(
        'description' => 'The picture mapping for this optionset.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'fallback' => array(
        'description' => 'The style machine name.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'indexes' => array(
      'imagestyle_type' => array(
        'imagestyle_type',
      ),
    ),
  );
  return $schema;
}