Mercurial > hg > MPIWG-drupal-modules
diff sites/all/modules/custom/mediathek/mediathek.install @ 0:015d06b10d37 default tip
initial
author | dwinter |
---|---|
date | Wed, 31 Jul 2013 13:49:13 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sites/all/modules/custom/mediathek/mediathek.install Wed Jul 31 13:49:13 2013 +0200 @@ -0,0 +1,38 @@ +<?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. + * + * The data we will store here is just one 7-character element, even + * though the widget presents the three portions separately. + * + * 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 mediathek_field_schema($field) { + + $columns = array( + 'url' => array('type' => 'varchar', 'length' => 600, 'not null' => FALSE), + 'width' => array('type' => 'varchar', 'length' => 10, 'not null' => FALSE), + 'height' => array('type' => 'varchar', 'length' => 10, 'not null' => FALSE), + ); + $indexes = array( + 'url' => array('url'), + ); + return array( + 'columns' => $columns, + 'indexes' => $indexes, + ); +}