Mercurial > hg > digitalobjects
diff digitalobjects.install @ 0:6f6e07baad80 default tip
initial
author | Dirk Wintergruen <dwinter@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 02 Jun 2015 08:57:48 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/digitalobjects.install Tue Jun 02 08:57:48 2015 +0200 @@ -0,0 +1,35 @@ +<?php +/** + * @file + * Install, update, and uninstall functions for the field_example module. + */ + +/** + * Implements hook_field_schema(). + * + * Defines the database schema of the field, using the format used by the + * Schema API. + * + * + * All implementations of hook_field_schema() must be in the module's + * .install file. + * + * @see http://drupal.org/node/146939 + * @see schemaapi + * @see hook_field_schema() + * @ingroup field_example + */ + +function digitalobjects_field_schema($field) { + + $columns = array( + 'objid' => array('type' => 'varchar', 'length' => 20, 'not null' => FALSE), //contains id for digitalobjects or collections + ); + $indexes = array( + 'objid' => array('objid'), + ); + return array( + 'columns' => $columns, + 'indexes' => $indexes, + ); +} \ No newline at end of file