function ocupload_schema in One Click Upload 7
Same name and namespace in other branches
- 7.2 ocupload.install \ocupload_schema()
Implements hook_schema().
File
- ./
ocupload.install, line 11 - Install/Uninstall functions
Code
function ocupload_schema() {
$shema['ocupload_templates'] = array(
'fields' => array(
'tid' => array(
'description' => 'Template ID',
'type' => 'serial',
'size' => 'tiny',
'unsigned' => TRUE,
'not null' => TRUE,
),
'mask' => array(
'description' => 'File mask',
'type' => 'varchar',
'length' => 200,
'not null' => TRUE,
'default' => '',
),
'path' => array(
'description' => 'Upload path',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'max_filesize' => array(
'description' => 'Max filesize in bytes',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'template' => array(
'description' => 'Template',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '<a href="!filepath">!filename</a>',
),
'template_select' => array(
'description' => 'Template for replace selected text',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '<a href="!filepath">!text</a>',
),
'image_style' => array(
'description' => 'Image style',
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
'default' => '',
),
'image_style_original' => array(
'description' => 'Image style for original image',
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
'default' => '',
),
'link_to_original' => array(
'description' => 'Wrap template link to original image',
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'link_template' => array(
'description' => 'Link template',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '<a href="!filepath" target="_blank">!image</a>',
),
'link_only_big' => array(
'description' => '1 - wrap template only big images, 0 - wrap all images',
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'max_dimensions' => array(
'description' => 'Maximum image resolution',
'type' => 'varchar',
'length' => 20,
'not null' => TRUE,
'default' => '',
),
'rename_file' => array(
'description' => '1 - change filename to unique number (datetime), 0 - not change',
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 1,
),
),
'primary key' => array(
'tid',
),
'description' => 'Module templates',
);
return $shema;
}