You are here

function media_crop_schema in Media crop 7

Implements hook_schema().

File

./media_crop.install, line 11
Contains install functions for Media crop.

Code

function media_crop_schema() {
  $schema = array();
  $schema['media_crop_instance'] = array(
    'description' => '',
    'fields' => array(
      'mciid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'fid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'unsigned' => TRUE,
      ),
      'image_style_name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'angle' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'crop_x' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'unsigned' => TRUE,
      ),
      'crop_y' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'unsigned' => TRUE,
      ),
      'crop_w' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'unsigned' => TRUE,
      ),
      'crop_h' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'unsigned' => TRUE,
      ),
      'crop_scale_w' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'unsigned' => TRUE,
      ),
      'crop_scale_h' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'unsigned' => TRUE,
      ),
    ),
    'primary key' => array(
      'mciid',
    ),
  );
  return $schema;
}