You are here

function imagecache_schema in ImageCache 6.2

File

./imagecache.install, line 47

Code

function imagecache_schema() {
  $schema['imagecache_preset'] = array(
    'fields' => array(
      'presetid' => array(
        'description' => t('The primary identifier for an imagecache_preset.'),
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'presetname' => array(
        'description' => t('The primary identifier for a node.'),
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'presetid',
    ),
  );
  $schema['imagecache_action'] = array(
    'fields' => array(
      'actionid' => array(
        'description' => t('The primary identifier for an imagecache_action.'),
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'presetid' => array(
        'description' => t('The primary identifier for an imagecache_preset.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'weight' => array(
        'description' => t('The weight of the action in the preset.'),
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'module' => array(
        'description' => t('The module that defined the action.'),
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'action' => array(
        'description' => t('The unique ID of the action to be executed.'),
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'data' => array(
        'description' => t('The configuration data for the action.'),
        'type' => 'text',
        'not null' => TRUE,
        'size' => 'big',
        'serialize' => TRUE,
      ),
    ),
    'primary key' => array(
      'actionid',
    ),
    'indexes' => array(
      'presetid' => array(
        'presetid',
      ),
    ),
  );
  return $schema;
}