function manualcrop_schema in Manual Crop 7
Implements hook_schema().
File
- ./
manualcrop.install, line 74 - Install, update and uninstall functions for the Manual Crop module.
Code
function manualcrop_schema() {
$schema['manualcrop'] = array(
'description' => 'Holds the crop-area position and size all cropped images.',
'fields' => array(
'fid' => array(
'description' => 'The {file_managed}.fid of the image file.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'vid' => array(
'description' => 'The {file_managed_revisions}.vid (if it exists) of the file.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'style_name' => array(
'description' => 'The machine name of the style.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'x' => array(
'description' => 'The x-position of the left top cropping-area corner.',
'type' => 'int',
'size' => 'small',
'unsigned' => TRUE,
'not null' => TRUE,
),
'y' => array(
'description' => 'The y-position of the left top cropping-area corner.',
'type' => 'int',
'size' => 'small',
'unsigned' => TRUE,
'not null' => TRUE,
),
'width' => array(
'description' => 'The width of the cropping-area.',
'type' => 'int',
'size' => 'small',
'unsigned' => TRUE,
'not null' => TRUE,
),
'height' => array(
'description' => 'The height of the cropping-area.',
'type' => 'int',
'size' => 'small',
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'foreign keys' => array(
'file' => array(
'table' => 'file_managed',
'columns' => array(
'fid' => 'fid',
),
),
),
'primary key' => array(
'fid',
'vid',
'style_name',
),
'indexes' => array(
'vid' => array(
'vid',
),
),
);
return $schema;
}