function textimage_schema in Textimage 7.3
Same name and namespace in other branches
- 6.2 textimage.install \textimage_schema()
- 7.2 textimage.install \textimage_schema()
Implements hook_schema().
File
- ./
textimage.install, line 66 - Textimage - Installation scripts.
Code
function textimage_schema() {
$schema = array();
// Pick the definition of the {cache_textimage} table from the standard
// {cache} table.
$schema['cache_textimage'] = drupal_get_schema_unprocessed('system', 'cache');
$schema['cache_textimage']['description'] = 'Cache table for Textimage module to store image URIs.';
// Define {textimage_store}.
$schema['textimage_store'] = array(
'description' => 'Metadata for stored Textimage images.',
'fields' => array(
'tiid' => array(
'description' => 'Primary key; MD5 hash of effects and image variables.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
'is_void' => array(
'description' => 'True if referenced file has been deleted.',
'type' => 'int',
'size' => 'tiny',
'default' => 0,
'not null' => TRUE,
),
'style_name' => array(
'description' => 'Image style name.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
),
'uri' => array(
'description' => 'Image URI.',
'type' => 'text',
'not null' => TRUE,
),
'effects_outline' => array(
'type' => 'blob',
'not null' => TRUE,
'serialize' => TRUE,
'description' => 'Effects metadata.',
),
'image_data' => array(
'type' => 'blob',
'not null' => TRUE,
'serialize' => TRUE,
'description' => 'Image data.',
),
'timer' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'Time in milliseconds that the image took to build.',
),
'timestamp' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'Timestamp of when the image was built.',
),
),
'primary key' => array(
'tiid',
),
);
return $schema;
}