diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-10-05 14:43:26 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-10-05 14:43:26 +0000 |
commit | 39706e3c51cf206ca6669bbb7a090d2f7d394591 (patch) | |
tree | 9286ccd302d526ea8a1de799081356fcc77c28a3 /modules/upload | |
parent | d568128b9f7a0181b31e9baa087022e892352ea7 (diff) | |
download | brdo-39706e3c51cf206ca6669bbb7a090d2f7d394591.tar.gz brdo-39706e3c51cf206ca6669bbb7a090d2f7d394591.tar.bz2 |
- Patch #150245 by webchick, bjaspan, ralf, Arancaytar et al: move the .schema files into .install files to prevent mistakes.
Diffstat (limited to 'modules/upload')
-rw-r--r-- | modules/upload/upload.install | 20 | ||||
-rw-r--r-- | modules/upload/upload.schema | 19 |
2 files changed, 20 insertions, 19 deletions
diff --git a/modules/upload/upload.install b/modules/upload/upload.install index 1c07a190d..3e6eb367d 100644 --- a/modules/upload/upload.install +++ b/modules/upload/upload.install @@ -16,3 +16,23 @@ function upload_uninstall() { // Remove tables. drupal_uninstall_schema('upload'); } + +/** + * 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; +} + diff --git a/modules/upload/upload.schema b/modules/upload/upload.schema deleted file mode 100644 index 09843b58f..000000000 --- a/modules/upload/upload.schema +++ /dev/null @@ -1,19 +0,0 @@ -<?php -// $Id$ - -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; -} - |