2007-05-30 08:08:59 +00:00
|
|
|
<?php
|
|
|
|
// $Id$
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implementation of hook_install().
|
|
|
|
*/
|
|
|
|
function upload_install() {
|
|
|
|
// Create tables.
|
|
|
|
drupal_install_schema('upload');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implementation of hook_uninstall().
|
|
|
|
*/
|
|
|
|
function upload_uninstall() {
|
|
|
|
// Remove tables.
|
|
|
|
drupal_uninstall_schema('upload');
|
|
|
|
}
|
2007-10-05 14:43:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Implementation of hook_schema().
|
|
|
|
*/
|
|
|
|
function upload_schema() {
|
|
|
|
$schema['upload'] = array(
|
|
|
|
'fields' => array(
|
|
|
|
'fid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
|
|
|
|
'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
|
|
|
|
'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
|
|
|
|
'description' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
|
|
|
|
'list' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
|
|
|
|
),
|
|
|
|
'primary key' => array('fid', 'vid'),
|
|
|
|
'indexes' => array('vid' => array('vid'), 'nid' => array('nid')),
|
|
|
|
);
|
|
|
|
|
|
|
|
return $schema;
|
|
|
|
}
|
|
|
|
|