diff options
Diffstat (limited to 'types/uploadfield/uploadfield.install')
-rw-r--r-- | types/uploadfield/uploadfield.install | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/types/uploadfield/uploadfield.install b/types/uploadfield/uploadfield.install index a2e1b65..9f43a6d 100644 --- a/types/uploadfield/uploadfield.install +++ b/types/uploadfield/uploadfield.install @@ -2,24 +2,26 @@ // $Id$ /** - * Implementation of hook_install(). + * Implements hook_field_schema(). */ -function uploadfield_install() { - drupal_load('module', 'content'); - content_notify('install', 'uploadfield'); -} - -function uploadfield_uninstall() { - drupal_load('module', 'content'); - content_notify('uninstall', 'uploadfield'); -} - -function uploadfield_enable() { - drupal_load('module', 'content'); - content_notify('enable', 'uploadfield'); -} - -function uploadfield_disable() { - drupal_load('module', 'content'); - content_notify('disable', 'uploadfield'); +function uploadfield_field_schema($field) { + return array( + 'columns' => array( + 'fid' => array( + 'description' => 'The {file_managed}.fid being referenced in this field.', + 'type' => 'int', + 'not null' => FALSE, + 'unsigned' => TRUE, + ), + ), + 'indexes' => array( + 'fid' => array('fid'), + ), + 'foreign keys' => array( + 'fid' => array( + 'table' => 'file_managed', + 'columns' => array('fid' => 'fid'), + ), + ), + ); }
\ No newline at end of file |