function uc_option_image_schema in Ubercart Option Images 7
Implementation of hook_schema().
File
- ./
uc_option_image.install, line 9 - Provides install and uninstall hooks.
Code
function uc_option_image_schema() {
$schema = array();
$schema['uc_option_image'] = array(
'description' => 'Stores data for UC Option Image.',
'fields' => array(
'type' => array(
'description' => 'The object type of the data being stored - uc_attribute, uc_option, uc_product or uc_class',
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
),
'aid' => array(
'description' => 'The associated attribute id',
'type' => 'int',
'default' => 0,
),
'oid' => array(
'description' => 'The associated option id',
'type' => 'int',
'default' => 0,
),
'pid' => array(
'description' => 'The associated product id',
'type' => 'int',
'default' => 0,
),
'cid' => array(
'description' => 'The associated class id',
'type' => 'int',
'default' => 0,
),
'fid' => array(
'description' => 'The fid of the associated image',
'type' => 'int',
'default' => 0,
),
'inline_style' => array(
'description' => 'The image style of the image for the inline display mode.',
'type' => 'varchar',
'length' => 255,
'default' => NULL,
),
'inline_active' => array(
'description' => 'Whether inline is active or not',
'type' => 'int',
'default' => 0,
),
'selected_style' => array(
'description' => 'The image style of the image for the selected display mode.',
'type' => 'varchar',
'length' => 255,
'default' => NULL,
),
'selected_active' => array(
'description' => 'Whether selected is active or not',
'type' => 'int',
'default' => 1,
),
),
'indexes' => array(
'aid' => array(
'aid',
),
'aid_oid' => array(
'aid',
'oid',
),
'aid_oid_pid' => array(
'aid',
'oid',
'pid',
),
),
);
return $schema;
}