You are here

function image_fupload_schema_1 in Image FUpload 6.3

Image FUpload's initial schema; separated for the purposes of updates.

2 calls to image_fupload_schema_1()
image_fupload_schema in ./image_fupload.install
Implementation of hook_schema().
image_fupload_update_6300 in ./image_fupload.install

File

./image_fupload.install, line 82

Code

function image_fupload_schema_1() {
  $schema['fupload_previewlist'] = array(
    'description' => t('Caches images for image preview list.'),
    'fields' => array(
      'fieldname' => array(
        'type' => 'varchar',
        'length' => '32',
        'default' => '',
        'not null' => TRUE,
        'description' => t('Stores name of our image field depending on used node type.'),
        'no export' => TRUE,
      ),
      'uid' => array(
        'type' => 'int',
        'default' => 0,
        'not null' => TRUE,
        'description' => t('Stores user id.'),
        'no export' => TRUE,
      ),
      'nid' => array(
        'type' => 'int',
        'default' => 0,
        'not null' => TRUE,
        'description' => t('Stores node id.'),
        'no export' => TRUE,
      ),
      'fid' => array(
        'type' => 'int',
        'default' => 0,
        'not null' => FALSE,
        'description' => t('Stores file id of uploaded image.'),
        'no export' => TRUE,
      ),
      'created' => array(
        'type' => 'int',
        'default' => 0,
        'not null' => TRUE,
        'description' => t('Stores creation time to do some clean up by cron.'),
        'no export' => TRUE,
      ),
    ),
    'indexes' => array(
      'fieldname' => array(
        'fieldname',
      ),
      'uid' => array(
        'uid',
      ),
    ),
    'primary key' => array(
      'fid',
    ),
  );
  return $schema;
}