Mercurial > hg > digitalobjects
comparison 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 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:6f6e07baad80 |
|---|---|
| 1 <?php | |
| 2 /** | |
| 3 * @file | |
| 4 * Install, update, and uninstall functions for the field_example module. | |
| 5 */ | |
| 6 | |
| 7 /** | |
| 8 * Implements hook_field_schema(). | |
| 9 * | |
| 10 * Defines the database schema of the field, using the format used by the | |
| 11 * Schema API. | |
| 12 * | |
| 13 * | |
| 14 * All implementations of hook_field_schema() must be in the module's | |
| 15 * .install file. | |
| 16 * | |
| 17 * @see http://drupal.org/node/146939 | |
| 18 * @see schemaapi | |
| 19 * @see hook_field_schema() | |
| 20 * @ingroup field_example | |
| 21 */ | |
| 22 | |
| 23 function digitalobjects_field_schema($field) { | |
| 24 | |
| 25 $columns = array( | |
| 26 'objid' => array('type' => 'varchar', 'length' => 20, 'not null' => FALSE), //contains id for digitalobjects or collections | |
| 27 ); | |
| 28 $indexes = array( | |
| 29 'objid' => array('objid'), | |
| 30 ); | |
| 31 return array( | |
| 32 'columns' => $columns, | |
| 33 'indexes' => $indexes, | |
| 34 ); | |
| 35 } |
