You are here

function imagefield_crop_schema in Imagefield Crop 7.3

Same name and namespace in other branches
  1. 7 imagefield_crop.install \imagefield_crop_schema()

Impplements hook_schema

Return value

array

1 call to imagefield_crop_schema()
imagefield_crop_update_7202 in ./imagefield_crop.install
Update to 7.x-3.0

File

./imagefield_crop.install, line 70
Module installation file.

Code

function imagefield_crop_schema() {
  $schema = array();
  $schema['imagefield_crop_preset'] = array(
    'fields' => array(
      'pid' => array(
        'description' => 'Imagefield crop preset id',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'name' => array(
        'description' => 'Imagefield crop preset name',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'data' => array(
        'description' => 'The configuration data for the preset.',
        'type' => 'blob',
        'not null' => TRUE,
        'size' => 'big',
        'serialize' => TRUE,
      ),
    ),
    'indexes' => array(
      'pid' => array(
        'pid',
      ),
    ),
    'primary key' => array(
      'pid',
    ),
  );
  $schema['imagefield_crop_variants'] = array(
    'fields' => array(
      'cvid' => array(
        'description' => 'Imagefield crop variant id',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'source_fid' => array(
        'description' => 'Source file id',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'pid' => array(
        'description' => 'Imagefield crop preset id',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'vid' => array(
        'description' => 'Revision id',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'fid' => array(
        'description' => 'Variant file id',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'data' => array(
        'description' => 'The configuration data for the variant.',
        'type' => 'blob',
        'not null' => TRUE,
        'size' => 'big',
        'serialize' => TRUE,
      ),
    ),
    'indexes' => array(
      'cvid' => array(
        'cvid',
      ),
    ),
    'primary key' => array(
      'cvid',
    ),
  );
  return $schema;
}