You are here

function flexslider_picture_schema_alter in Picture 7

Same name and namespace in other branches
  1. 7.2 flexslider_picture/flexslider_picture.install \flexslider_picture_schema_alter()

Implements hook_schema_alter().

File

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

Code

function flexslider_picture_schema_alter(&$schema) {
  $schema['flexslider_optionset']['join']['flexslider_picture'] = array(
    'table' => 'flexslider_picture_optionset',
    'left_key' => 'name',
    'right_key' => 'flexslider_optionset',
    'callback' => 'flexslider_picture_join_callback',
    'load' => array(
      'imagestyle_type',
      'mapping',
    ),
    'fields' => array(
      '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,
      ),
    ),
  );
}