function privatemsg_attachments_schema in Privatemsg 6.2
Implements hook_schema().
File
- privatemsg_attachments/
privatemsg_attachments.install, line 27 - Installation hooks for privatemsg_attachments
Code
function privatemsg_attachments_schema() {
$schema['pm_attachments'] = array(
'description' => t('Stores uploaded file information and table associations for private messages.'),
'fields' => array(
'fid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('Primary Key: The {files}.fid.'),
),
'mid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('The {pm_message}.mid associated with the uploaded file.'),
),
'description' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Description of the uploaded file.'),
),
'list' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => t('Whether the file should be visibly listed on the node: yes(1) or no(0).'),
),
'weight' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => t('Weight of this upload in relation to other uploads in this node.'),
),
),
'primary key' => array(
'mid',
'fid',
),
'indexes' => array(
'fid' => array(
'fid',
),
),
);
return $schema;
}